Hint: Apply the formulae of PE and KE in SHM.
Step 1: Find the potential energy of SHM.
The potential energy (PE) of a simple harmonic oscillator is
Where k=force constant
When PE is plotted against displacement x, we will obtain a parabola.
When x =0, PE =0
When = maximum
Step 2: Find the KE of SHM.
KE of a simple harmonic oscillator=
This is also a parabola if plot KE against displacement x.
i.e.,
and
Step 3: Find the total energy of SHM.
Now, the total energy of the simple harmonic oscillator = PE+KE [using Eqs. (I) and (ii)]
Which is constant and does not depend on x.
Plotting under the above guidelines KE, PE and TE versus displacement x-graph as follows: