The above simulation of the simple harmonic motion involving a pendulum shows how the potential energy, PE and kinetic energy, KE, change with the position of the pendulum, provided that the latter swings through a small angle. As you can see the total energy of the system remains the same: the loss of KE turns into PE and vice versa. In order to practise this interactively, along with a few related simulations under the SHM, please follow the link below: A comprehensive and interactive tutorial on the SHM is here .