For an undamped block-spring oscillator, the total energy remains constant throughout and is equal to This energy moves back and forth between the kinetic and spring potential energies: where is the displacement of the block, and the velocity, at a given time .