The ratio of the kinetic energy Ek and potential energy of a particle executing SHM, at a distance x from mean position will be
KEPE=0.5mv20.5kx2
=ma2ω2cos2ωtmω2.a2.sin2ωt=cos2ωtsin2ωt=1−sin2ωtsin2ωtNow, sinωt=x/aThus, KEPE=1−x2/a2x2/a2=a2−x2x2