Total energy in shm
ET = KE + PE = constant
lets assume, at an instance particle is present at mean position and no additional energy is provided to the particle externally.
ET = 1/2 mw2A2 + 0;
∵ KEmax = 1/2 mw2A2(at mean position) & PE = 0(at mean position)
ET = 1/2 mw2A2 = constant
(this energy remains constant through the motion, assuming medium is ideal)
Energy curve for ideal situation