Full energy of spring-mass system is W=Wp+Wk ;
Wp=2kx2− Potential energy
Wk=2mV2 - kinetic energy
x - displacement of mass;
K - constant factor characteristic of the spring, its stiffness.
m-mass;
V-velocity of mass;
If equation of oscillation is x=Acos(wt±φ) or x=Asin(wt±φ) , we have
Wp=2k((Acos(wt±φ))2=2kA2cos2(wt±φ)
V=x′(t) - derivative from x(t)
x′(t)=(Asin(wt±φ))′=A⋅w⋅cos(wt±φ)
Wk=2mV2=2m⋅A2⋅w2⋅sin2(wt±φ)
W=2m⋅A2⋅w2⋅sin2(wt±φ)+2kA2cos2(wt±φ)
Where w=k/m
