where v (x) is the speed of the oscillator as a function of its position. (Note that because speed is a scalar, v (x) is the same for both half periods.) At this point, all that is needed is to provide a function v (x) to obtain P (x). For systems subject to conservative forces, this is done by relating speed to energy. Since kinetic energy K is 1 ⁄ 2 mv and the total energy E = K + U, where U (x) is the potential energy of the system, the speed can be written as