When a spring is compressed, work is done on the spring by the external agent exerting the force. Suppose that this work is done by a moving object which strikes and sticks to a spring initially in its equilibrium position [position A] so that as the moving object loses kinetic energy (eventually coming to rest) it does work on the spring to compress it [position B]. We will not at this time continue our examination into when the spring later rebounds. Numerically we would therefore set the magnitude of the kinetic energy lost by the object equal to the elastic potential energy gained by the spring. This will allow us to either solve for the maximum compression distance in the spring; or vice versa, if given the compression produced in the spring, solve for the original velocity of the colliding mass. Horizontally Oscillating Springs
Now suppose that a spring is initially compressed and then released on a frictionless surface. It then oscillates with one end firmly attached to a base of support and a mass attached to its free end. As the mass vibrates back and forth, the energy in the system transforms between PE_{e} (at the endpoints of the oscillation) and KE (as the mass passes through equilibrium). Since the surface is frictionless no mechanical energy is lost to thermal energy as the mass slides back and forth over the surface.
The maximum kinetic energy occurs as the mass passes through equilibrium.
When a spring has been set into oscillatory motion, the equation used to calculate its period is
Remember that frequency and period are reciprocals: f = 1/T. The unit to measure frequency is hertz, or vibrations per second; while the unit to measure period is seconds, or seconds per vibration.
