TExcelTAD
Home › Differential Equations › Mechanical Vibrations

Mechanical Vibrations

A mass on a spring with friction is the model problem for everything that oscillates: car suspensions, buildings in earthquakes, a guitar string, a camera that follows a player smoothly. Newton's second law gives

mx′′+cx′+kx=F(t),m x'' + c x' + k x = F(t),

with mass m>0m > 0, damping coefficient c≥0c \ge 0, spring constant k>0k > 0 and external force FF. This lesson studies free vibrations (F=0F = 0); forced ones are in Forced Oscillations and Resonance.

Undamped motion

With c=0c = 0: x′′+ω02x=0x'' + \omega_0^2x = 0, where ω0=k/m\omega_0 = \sqrt{k/m} is the natural angular frequency. Solutions are x=Rcos⁡(ω0t−δ)x = R\cos(\omega_0t - \delta): simple harmonic motion with period T=2π/ω0T = 2\pi/\omega_0 and frequency f=ω0/2πf = \omega_0/2\pi. A stiffer spring or a lighter mass oscillates faster.

Damped motion: three regimes

The characteristic equation mr2+cr+k=0mr^2 + cr + k = 0 has roots r=−c±c2−4mk2mr = \frac{-c \pm \sqrt{c^2 - 4mk}}{2m}. The critical damping ccr=2mkc_{\text{cr}} = 2\sqrt{mk} separates three cases:

Case Condition Roots Motion
Overdamped c>ccrc > c_{\text{cr}} two negative reals returns slowly, no oscillation
Critically damped c=ccrc = c_{\text{cr}} double root −c2m-\frac{c}{2m} fastest return without overshoot
Underdamped c<ccrc < c_{\text{cr}} −c2m±iω1-\frac{c}{2m} \pm i\omega_1 decaying oscillation with ω1=ω02−c24m2\omega_1 = \sqrt{\omega_0^2 - \frac{c^2}{4m^2}}

Engineers often use the damping ratio ζ=c/ccr\zeta = c / c_{\text{cr}}: ζ<1\zeta < 1 underdamped, ζ=1\zeta = 1 critical, ζ>1\zeta > 1 overdamped.

python · try it yourself
import numpy as np
from scipy.integrate import solve_ivp

m, k = 1.0, 4.0                       # omega_0 = 2, critical damping c = 4
t_eval = np.array([0.5, 1.0, 2.0, 3.0])
for c in (1.0, 4.0, 10.0):
    sol = solve_ivp(lambda t, Y: [Y[1], -(c * Y[1] + k * Y[0]) / m], (0, 3), [1.0, 0.0],
                    t_eval=t_eval, rtol=1e-10, atol=1e-12)
    zeta = c / (2 * np.sqrt(m * k))
    print(f"c = {c:4}: zeta = {zeta:.2f}  x =", np.round(sol.y[0], 4))
c =  1.0: zeta = 0.25  x = [ 0.6071 -0.0706 -0.3372  0.1723]
c =  4.0: zeta = 1.00  x = [0.7358 0.406  0.0916 0.0174]
c = 10.0: zeta = 2.50  x = [0.8482 0.6887 0.4537 0.2989]

The underdamped mass (ζ=0.25\zeta = 0.25) overshoots below zero; the critically damped one is closest to 0 at t=3t = 3; the overdamped one creeps back.

Energy

For the undamped spring, the total energy E=12mx′2+12kx2E = \frac{1}{2}mx'^2 + \frac{1}{2}kx^2 is constant (differentiate it and use the equation). With damping, E′=−cx′2≤0E' = -cx'^2 \le 0: friction removes energy. This energy argument is the prototype of the stability methods in Conservative Systems and the Pendulum.

python · try it yourself
import numpy as np
from scipy.integrate import solve_ivp

m, k = 1.0, 4.0
E = lambda x, v: 0.5 * m * v**2 + 0.5 * k * x**2
for c in (0.0, 0.5):
    sol = solve_ivp(lambda t, Y: [Y[1], -(c * Y[1] + k * Y[0]) / m], (0, 10), [1.0, 0.0],
                    t_eval=[0, 5, 10], rtol=1e-10, atol=1e-12)
    print(f"c = {c}: energy at t = 0, 5, 10:", np.round(E(sol.y[0], sol.y[1]), 6))
c = 0.0: energy at t = 0, 5, 10: [2. 2. 2.]
c = 0.5: energy at t = 0, 5, 10: [2.       0.182686 0.015329]

In software

  • Game engines and UI frameworks implement "springs" with exactly these parameters. A critically damped spring is the standard way to make a camera follow a target smoothly; Unity's SmoothDamp and many tweening libraries are built on it.
  • Car suspension design, earthquake engineering and hard-disk head positioning choose ζ\zeta deliberately: around 0.7 is a common compromise between speed and overshoot.

Exercises

Exercise 1: Period

A 0.5 kg mass hangs on a spring with k=50k = 50 N/m. Find ω0\omega_0 and the period.

Answer

ω0=10\omega_0 = 10 rad/s, period π5≈0.628\frac{\pi}{5} \approx 0.628 s.

Solution

ω0=50/0.5=10\omega_0 = \sqrt{50/0.5} = 10 and T=2π/10T = 2\pi/10.

Exercise 2: Critical damping

For m=2m = 2 and k=18k = 18, what damping is critical? Write the critically damped solution with x(0)=1x(0) = 1, x′(0)=0x'(0) = 0.

Answer

c=12c = 12; x=(1+3t)e−3tx = (1 + 3t)e^{-3t}.

Solution

ccr=236=12c_{\text{cr}} = 2\sqrt{36} = 12. The double root is −124=−3-\frac{12}{4} = -3, so x=(c1+c2t)e−3tx = (c_1 + c_2t)e^{-3t} with c1=1c_1 = 1 and x′(0)=c2−3=0x'(0) = c_2 - 3 = 0.

Exercise 3: Damped frequency (code)

For x′′+0.6x′+9x=0x'' + 0.6x' + 9x = 0, compute the damped angular frequency ω1\omega_1 and the ratio between successive maxima (the decay per period).

Answer

ω1=8.91≈2.985\omega_1 = \sqrt{8.91} \approx 2.985; ratio e−0.3⋅2π/ω1≈0.532e^{-0.3 \cdot 2\pi/\omega_1} \approx 0.532.

Solution

The roots are −0.3±i9−0.09-0.3 \pm i\sqrt{9 - 0.09}. Successive maxima are one period 2π/ω12\pi/\omega_1 apart, and the envelope e−0.3te^{-0.3t} shrinks by e−0.3⋅2π/ω1e^{-0.3 \cdot 2\pi/\omega_1} over it.

python · try it yourself
import numpy as np
w1 = np.sqrt(9 - 0.3**2)
print(round(w1, 4), round(np.exp(-0.3 * 2 * np.pi / w1), 4))
2.985 0.5318

Test yourself

The natural angular frequency of mx′′+kx=0mx'' + kx = 0 is…

  1. k/mk/m
  2. k/m\sqrt{k/m}
  3. m/k\sqrt{m/k}
  4. 2πk2\pi k

A system with damping ratio ζ=1\zeta = 1 is…

  1. undamped
  2. underdamped
  3. critically damped
  4. overdamped

Which regime oscillates?

  1. Overdamped
  2. Critically damped
  3. Underdamped
  4. None of them