**Simple Harmonic motion of spring Mass system when spring is horizontal :**

If x is a small extension or compression in the spring from the equilibrium state the restoring force produced is given by

F = − k x

Where k is called force constant or spring factor.

∴ Equation of motion of the mass M is given by

$ \displaystyle M\frac{d^2 x}{dt^2} = -kx $

$ \displaystyle \frac{d^2 x}{dt^2} = -\frac{k}{M}x $

This represents an S.H.M. its angular frequency ω is

$ \displaystyle \omega = \sqrt{\frac{k}{M}} $

and the period of oscillation is

$ \displaystyle T = 2\pi \sqrt{\frac{M}{k}} $

Exercise : A spring is cut into two equal parts. What will be the difference in time period of the spring pendulum thus formed from the original spring pendulum ?

__SHM of Spring Mass System (spring is vertical)__

Simple Harmonic motion of Spring Mass System spring is vertical :

The weight Mg of the body produces an initial elongation, such that Mg − k y_{o} = 0.

If y is the displacement from this equilibrium position the total restoring force will be

Mg − k(y_{o} + y) = − ky

Again we get,

$ \displaystyle T = 2\pi \sqrt{\frac{M}{k}} $

Note that the gravity has no effect on the time period of oscillations.

In general , time period of a spring mass system depends only on spring and mass and it is independent of external forces provided that external forces are constant and acts throughout the motion.