Let us consider the block- spring system (also a simple pendulum having the same frequency and amplitude as the block-spring system) as shown below in the physlet. Press the button start the animation. There are two energies, one is potential and associated with the spring and the other is kinetic and associated with the block of mass .
The potential energy of the spring is:
The kinetic energy of the block is:
The mechanical energy of the mass-spring system is:
We see that the total energy of the system does not depend on time and is therefore CONSTANT.
The above physlet shows variation of K, U and E as a function of position. The particle is moving between and .
Note that although both K and U changes. the total energy E = K+U has always the same value for all positions of the mass.