I have added some points here which is related to your question. I think this will be useful for you.

In physics, you can examine how much potential and kinetic energy is stored in a spring when you compress or stretch it. The work you do compressing or stretching the spring must go into the energy stored in the spring. That energy is called

*elastic potential energy* and is equal to the force,

* F, *times the distance,

*s:* *W* =

*Fs*
As you stretch or compress a spring, the force varies, but it varies in a linear way (because in Hooke’s law, force is proportional to the displacement).

therefore W = Fs

The distance (or displacement),

* s,* is just the difference in position,

*x**f* –

*x**i*, and the average force is (1/2)(

*F**f* +

*F**i*). Therefore, you can rewrite the equation as follows:

For example, suppose a spring is elastic and has a spring constant,

*k,* of

and you compress the spring by 10.0 centimeters. You store the following amount of energy in it:

You can also note that when you let the spring go with a mass on the end of it, the mechanical energy (the sum of potential and kinetic energy) is conserved:

*PE*1 +

*KE*1 =

*PE*2 +

*KE*2

When the moving mass reaches the equilibrium point and no force from the spring is acting on the mass, you have maximum velocity and therefore maximum kinetic energy — at that point, the kinetic energy is

by the conservation of mechanical energy.