Differential equations are used for various applications. When a mass on a vertical spring is released, the governing equation is:

\( \sum F = ma = m \cfrac{dx^2}{dt^2} = F_g + F_s + F_d + F(t) \)

\( m \cfrac{dx^2}{dt^2} = mg - k(s + x) -\beta \cfrac{dx}{dt} + F(t)\)

Where \(k\) is the spring constant, \(s\) is the distance the spring moves when the mass is applied and \(\beta\) is a damping constant.
When the spring is at the equilibrium position \( mg - ks = 0 \).

There are different scenarios which will lead us to use different strategies to solve the DEs.

**Free motion** occurs when there is no external force \(F(t)\).

**Undamped motion** occurs when \( \beta = 0 \).

## Free Undamped Motion

For **free undamped motion** the DE is:

\( m \cfrac{dx^2}{dt^2} = mg - k(s + x) = mg -ks -kx\)

\( m \cfrac{dx^2}{dt^2} + kx = 0\)

This is a homogeneous linear DE with constant coefficients that can be solved using by solving a characteristic equation.

\( m r^2 + k = 0 \)

\( r = \sqrt{-\frac{k}{m}} = \sqrt{\frac{k}{m}} i\)

The general solution is:

\( x(t) = c_1 \sin {\sqrt{\frac{k}{m}} t} + c_1 \cos {\sqrt{\frac{k}{m}} t} \)

It is common to let \( \omega ^2 = \frac{k}{m} \):

\( x(t) = c_1 \sin {\omega t} + c_1 \cos {\omega t} \)

## Free Damped Motion

For **free motion** the DE is:

\( m \cfrac{dx^2}{dt^2} + \beta \cfrac{dx}{dt} + kx = 0\)

This is also homogeneous linear DE with constant coefficients that can be solved using by solving a characteristic equation.
There are 3 different cases:

Roots |
Scenario |
Determinant |
Solution |

2 Real Roots |
Overdamping |
\(\beta ^2 - 4mk > 0\) |
\( x (t) = e^{\frac{\beta}{2m}t} (c_1 e^{\sqrt{(\frac{\beta}{2m})^2 -\frac{k}{m}t}} + c_2 e^{-\sqrt{(\frac{\beta}{2m})^2 -\frac{k}{m}t}}) \) |

Repeated Real Roots |
Critical Damping |
\(\beta ^2 - 4mk = 0\) |
\( x (t) = e^{\frac{\beta}{2m}t} (c_1 + c_2 t) \) |

Complex Roots |
Underdamping |
\(\beta ^2 - 4mk < 0\) |
\( x (t) = e^{\frac{\beta}{2m}t} (c_1 \cos {\sqrt{\frac{k}{m}t - (\frac{\beta}{2m})^2}} + c_2 \sin {\sqrt{\frac{k}{m}t - (\frac{\beta}{2m})^2 }})\) |

## Driven Motion

For **driven motion** the DE is:

\( m \cfrac{dx^2}{dt^2} + \beta \cfrac{dx}{dt} + kx = F(t)\)

Here, we can solve the homogeneous equation (complementary solution) and then find the particular solution
using variation of parameter method.