Time period of mass-spring system
We know that for a mass-spring system,
Similarly, if a body is executing SHM, the relation of its acceleration and displacement is given by,
The two equations must be same as the motion of mass-spring system is SHM.
Cancel negative sign and displacement x on both sides and simplify,
Take reciprocals on both sides,
This is the expression of time period of a spring mass system.
Frequency of spring mass system
Since f = 1/T, therefore, frequency can be calculated just by taking the reciprocal of time period.