Skip to content
Educora
University30 min40 / 44

Oscillations and waves: the differential equations

Study the differential equation of simple harmonic motion, damped and driven oscillations, resonance, the wave equation and standing waves, with derivations.

Check yourself
In this lesson you will learn
  • Set up the SHM equation and verify its solution
  • Calculate amplitude decay from the damping coefficient
  • Analyse the amplitude of driven oscillations and resonance
  • Use the wave equation to find wave speed and harmonics on a string

A mass on a spring, a clock pendulum, a guitar string, the tuning circuit of a radio, even atoms in a molecule — all are described by the same differential equation. Understand it once, and you can treat dozens of phenomena, from mechanics to electronics, in the same way.

The equation of simple harmonic motion

A body of mass m on a spring feels a force F = −kx (Hooke's law). Newton's second law gives m · d²x/dt² = −kx, that is d²x/dt² + ω₀²x = 0 with ω₀² = k/m. Try x(t) = A cos(ω₀t + φ₀): differentiating twice gives −ω₀²A cos(ω₀t + φ₀), so the equation is satisfied. A and φ₀ come from the initial conditions.

d²x/dt² + ω₀² · x = 0, x(t) = A · cos(ω₀t + φ₀), ω₀ = √(k/m), T = 2π√(m/k)d²x/dt² + ω₀² · x = 0, x(t) = A · cos(ω₀t + φ₀), ω₀ = √(k/m), T = 2π√(m/k)
where:
  • ω₀natural angular frequency, in rad/s
  • Aamplitude, in m
  • φ₀initial phase, in rad
  • kspring constant, in N/m

Velocity v = −Aω₀ sin(ω₀t + φ₀), acceleration a = −ω₀²x; the total energy E = kA²/2 is constant.

Example 1: a spring oscillator

A 0.5 kg mass hangs on a spring with k = 200 N/m. It is pulled 4 cm from equilibrium and released. Find ω₀, T, the maximum speed, the maximum acceleration and the total energy.

Show solution
ω₀ = √(200 / 0.5) = 20 rad/s, T = 2π / 20 ≈ 0.314 s (f ≈ 3.18 Hz).
vmax = Aω₀ = 0.04 · 20 = 0.8 m/s, amax = ω₀²A = 400 · 0.04 = 16 m/s².
E = kA² / 2 = 200 · 0.04² / 2 = 0.16 J.
Check: mvmax² / 2 = 0.5 · 0.64 / 2 = 0.16 J — the energies agree.

For a simple pendulum, along the tangent m · l · d²θ/dt² = −mg sin θ. For small angles sin θ ≈ θ (in radians), so d²θ/dt² + (g/l)θ = 0 — the same equation again, with ω₀ = √(g/l) and T = 2π√(l/g).

Interactive
Loading simulation…
For l = 1 m, T = 2π√(1 / 9.8) ≈ 2.0 s. Make the length 4 times longer — the period doubles; change g (for example 1.6 m/s² on the Moon).

Damped oscillations

Real systems have a resistive force, at low speeds F = −b · v. The equation becomes d²x/dt² + 2β · dx/dt + ω₀²x = 0 with β = b / (2m). For weak damping (β < ω₀) the solution is a cosine whose amplitude decays exponentially. At β = ω₀ we get critical damping: the system returns to equilibrium fastest without oscillating — car shock absorbers are designed close to this.

x(t) = A₀ · e^(−βt) · cos(ωt + φ₀), ω = √(ω₀² − β²), Q ≈ ω₀ / (2β)x(t) = A₀ · e^(−βt) · cos(ωt + φ₀), ω = √(ω₀² − β²), Q ≈ ω₀ / (2β)
where:
  • βdamping coefficient, in s⁻¹
  • ωangular frequency of the damped motion, in rad/s (slightly below ω₀)
  • Qquality factor: the larger it is, the weaker the damping
Example 2: when does the amplitude halve?

A pendulum has a damping coefficient β = 0.1 s⁻¹. After how many seconds is the amplitude halved? When is the energy halved?

Show solution
e^(−βt) = 1/2 → t = ln 2 / β = 0.693 / 0.1 ≈ 6.9 s.
Energy is proportional to amplitude squared: E ∝ e^(−2βt), so t = ln 2 / (2β) ≈ 3.5 s.
Interactive
Loading simulation…
A damped oscillation and its envelopes ±e^(−βt) (b = β, ω ≈ 6 rad/s). Increase β and the oscillations die out faster.

Driven oscillations and resonance

If a periodic force F₀ cos ωt acts on the system, the transient dies out after a while and the system oscillates at the driving frequency. Substituting x = A cos(ωt − δ) into d²x/dt² + 2β dx/dt + ω₀²x = (F₀/m) cos ωt and matching the cos and sin terms gives the amplitude below.

A(ω) = (F₀/m) / √((ω₀² − ω²)² + 4β²ω²)A(ω) = (F₀/m) / √((ω₀² − ω²)² + 4β²ω²)
where:
  • F₀amplitude of the driving force, in N
  • ωangular frequency of the driving force, in rad/s

The maximum is at ωres = √(ω₀² − 2β²) ≈ ω₀; for weak damping Amax ≈ F₀ / (2mβω₀), which is Q times the static displacement.

Interactive
Loading simulation…
Resonance curve: x = ω / ω₀, y is the amplitude divided by the static displacement, b = β / ω₀. Reduce the damping: the peak grows (≈ 1 / (2b)) and gets narrower.
Example 3: amplification at resonance

ω₀ = 10 rad/s, β = 0.5 s⁻¹, F₀/m = 2 N/kg. Find the amplitude at ω = ω₀ and for a very slow drive (ω → 0).

Show solution
ω = ω₀: A = 2 / √(0 + 4 · 0.25 · 100) = 2 / 10 = 0.2 m.
ω → 0: A = (F₀/m) / ω₀² = 2 / 100 = 0.02 m.
The amplification is 10, which matches Q = ω₀ / (2β) = 10.

The wave equation and standing waves

Consider a small piece dx of a string with linear density μ under tension F. The difference between the vertical components of the tension at its ends is F · (∂²y/∂x²) dx, and its mass is μ dx. Newton's second law gives the wave equation. Any function f(x − vt) satisfies it — a wave travelling at speed v without changing shape.

∂²y/∂t² = v² · ∂²y/∂x², v = √(F/μ), y = A · sin(kx − ωt), v = ω/k = λ · f∂²y/∂t² = v² · ∂²y/∂x², v = √(F/μ), y = A · sin(kx − ωt), v = ω/k = λ · f
where:
  • Ftension in the string, in N
  • μlinear density (mass per unit length), in kg/m
  • kwave number, k = 2π/λ, in rad/m

Two identical waves running in opposite directions add up to a standing wave: y = 2A sin kx · cos ωt. On a string fixed at both ends the ends must be nodes, so a whole number of half-wavelengths fits into the length: λₙ = 2L/n and fₙ = n · v / (2L), n = 1, 2, 3, …

Example 4: a guitar string

A string 0.65 m long is under a tension of 70 N and has a linear density of 1.0 g/m. Find the wave speed, the fundamental frequency and the second harmonic.

Show solution
μ = 1.0 · 10⁻³ kg/m.
v = √(70 / 10⁻³) ≈ 265 m/s.
f₁ = v / (2L) = 264.6 / 1.3 ≈ 204 Hz, f₂ = 2f₁ ≈ 407 Hz.
Quadrupling the tension would double every frequency (one octave up).
Interactive
Loading simulation…
A travelling wave y = A sin(kx − ωt). Change the frequency and wavelength: the speed is v = λ · f.

Key points

  • SHM: d²x/dt² + ω₀²x = 0, x = A cos(ω₀t + φ₀); ω₀ = √(k/m) for a spring, √(g/l) for a pendulum.
  • In damped motion the amplitude falls as e^(−βt) and halves in ln 2 / β.
  • At resonance the amplitude is about Q = ω₀/(2β) times the static displacement.
  • Wave equation ∂²y/∂t² = v² ∂²y/∂x²; on a string v = √(F/μ) and harmonics fₙ = n · v / (2L).

Check yourself

10 questions. Every correct answer earns XP.

1 / 10
A 2 kg mass oscillates on a spring with k = 50 N/m. What is the period?