The P.E. of a particle executing S.H.M. is given by:
\(E_P=\frac{1}{2}m\omega^2y^2.\)
EP is maximum when y = r = amplitude of vibration, i.e., the particle is passing from the extreme position and is minimum when y = 0, i.e., the particle is passing from the mean position.
The K.E. of a particle executing S.H.M. is given by;
\(E_k=\frac{1}{2}m\omega^2(r^2\,-\,y^2)\)
EK is maximum when y = 0, i.e., the particle is passing from the mean position and EK is minimum when y = r, i.e., the particle is passing from the extreme position.