Energy is conserved for SHM; the sum of the potential and kinetic energies is constant.
The potential energy is: U = ½ k x2 = ½ k A2 cos2 (ω t)
The kinetic energy is: K = ½ m v2 = ½ m ω2 A2 sin2 (ω t)
The total energy E = K + U is:
½ k A2 cos2 (ω t) + ½ m ω2 A2 sin2 (ω t)
Using k = m ω2, we find
E = ½ k A2 cos2 (ω t) + ½ k A2 sin2 (ω t) = ½ k A2
Notice that E also equals the maximum potential energy:
Umax = ½ kA2
E also equals the maximum kinetic energy:
Kmax = ½ m vmax2 = ½ mA2 ω2 = ½ k A2
The potential and kinetic energies go through two cycles for each amplitude cycle.
The first set of graphs is for ω = 1 rad/s. The second set is for ω = 0.8 rad/s. This change of ω is accomplished either by decreasing the spring constant or increasing the mass. Which change was made?