The total energy of simple harmonic motion

Satisfying the principle of conservation of energy requires that the total energy of simple harmonic motion remains the same.

PE + KE = Constant

For any SHM the force-displacement graph is a straight line through the origin. Potential energy as a consequence of position is given by....

PE = 1/2ky2

Remembering that y = A sinw t and v = Aw cosw t 

PE + KE = 1/2k[A sinw t]2 + 1/2m[Aw cosw t]2

= 1/2kA2[sin2w t + cos2w t]

... At once ......... PE + KE = 1/2kA2

... which is constant

The total energy is constant, equal to the maximum PE and/or the maximum KE.