# Simple harmonic motion equations derivation?

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 know how and why

Related Introductory Physics Homework Help News on Phys.org
If there is no friction or dissipation,kinetic and potential energy are alternately transformed into each other in SHM,but the total mechanical energy E=K+U is conserved.

Consider a spring with one end attached to the wall and other end having a block,going through its cycle of oscillation.

Total energy E = (1/2)mv2 + (1/2)kx2

At any position x, E = (1/2)mvx2 + (1/2)kx2

At the extreme position ,i.e at x=A the block has only potential energy ,so E = (1/2)kA2

At the equilibrium position ,at x=0 the block has only kinetic energy ,so E = (1/2)mvmax2

Now we know,vmax = ωA ,so at x=0 E=(1/2)mω2A2