Solution of vibration problems by Energy Methods
For a spring-mass system,
or,
This is the differential equation.
For finding the natural frequency, let us assume,