Well I was going through class lecture notes and my professor wrote this
When x = A(the maximum value), v=0: E=1/2kA^2
When v = wA, x=0: E=1/2mw^2A^2
where w = omega, A = amplitude, k = spring constant, m = mass, v = velocity
and apparently both equations are equal, i would like to...