5.3 Second-order linear ODEs

Add one more derivative and the world changes. With x¨\ddot x in play the system has inertia — once it starts moving it tends to keep moving — and inertia is what lets a system oscillate. Almost every system in this bookshelf that vibrates, rings, resonates, or oscillates is described by a second-order linear ODE. Mass on a spring, pendulum, tuning fork, LC circuit, every acoustic mode, the cochlear filter at each place on the basilar membrane — the same equation, different labels.

The characteristic-equation trick from 5.2 carries through with one extra subtlety: the polynomial is now quadratic, so there are two roots, and the interplay between them sets the character of the motion.

The general form

A second-order linear ODE with constant coefficients looks like

ax¨  +  bx˙  +  cx  =  f(t),a\, \ddot x \;+\; b\, \dot x \;+\; c\, x \;=\; f(t),

with constants a,b,ca, b, c and an external forcing f(t)f(t). In physical problems each of the three constants always means something — inertia, friction, restoring stiffness — and we’ll see them under several different names as the lesson goes on.

We’ll build up the story in three stages:

  1. Undamped (b=0b = 0, f=0f = 0) — pure sinusoidal motion forever. Simple harmonic motion.
  2. Damped (b>0b > 0, f=0f = 0) — decay and four distinct regimes.
  3. Forced (f(t)f(t) a sinusoid) — resonance: dramatic amplification when the drive matches the natural frequency.

Each stage adds one feature at a time. By the end you’ll have the full damped-driven-oscillator equation, which is one of the most useful equations in all of physics and engineering.

Stage 1 — Simple harmonic motion

Set b=0b = 0 (no friction) and f=0f = 0 (no forcing). Rename constants to their physical meanings: a=ma = m (mass), c=kc = k (spring stiffness). Newton’s second law for a mass on a frictionless spring is

mx¨  +  kx  =  0,or equivalentlyx¨  +  ω02x  =  0,m\, \ddot x \;+\; k\, x \;=\; 0, \qquad \text{or equivalently} \qquad \ddot x \;+\; \omega_0^2\, x \;=\; 0,

with the natural frequency ω0k/m\omega_0 \equiv \sqrt{k/m}. Try the trick. Substitute x=eλtx = e^{\lambda t}:

λ2eλt  +  ω02eλt  =  0λ2  =  ω02λ  =  ±iω0.\lambda^2\, e^{\lambda t} \;+\; \omega_0^2\, e^{\lambda t} \;=\; 0 \quad\Longrightarrow\quad \lambda^2 \;=\; -\omega_0^2 \quad\Longrightarrow\quad \lambda \;=\; \pm i\, \omega_0.

The two characteristic roots are pure imaginary. By Euler’s formula (refresher →), eiω0t=cos(ω0t)+isin(ω0t)e^{i \omega_0 t} = \cos(\omega_0 t) + i \sin(\omega_0 t). The real-valued general solution is the linear combination

x(t)  =  Acos(ω0t)  +  Bsin(ω0t),x(t) \;=\; A \cos(\omega_0 t) \;+\; B \sin(\omega_0 t),

with constants AA and BB fixed by the initial position x(0)x(0) and initial velocity x˙(0)\dot x(0). The motion is purely sinusoidal at ω0\omega_0 — no decay, no drift. The oscillator runs forever.

x = 0spring–massx = 1.00T = 2π/ω₀ = 4.19x(t) = x₀ cos(ω₀ t) + (v₀/ω₀) sin(ω₀ t)
Pure sinusoid forever. Period T = 2π/ω₀; amplitude set by initial conditions.

On the left, a mass slides back and forth on a spring; on the right, the same motion appears as a sine curve in time. Slide ω0\omega_0 and the period T=2π/ω0T = 2\pi/\omega_0 shrinks. Set x0x_0 to start the mass displaced; set v0v_0 to give it an initial kick. The two pieces of initial data uniquely fix the curve.

The mass and the curve are the same thing seen two ways: the mass’s position at time tt is the value of x(t)x(t) on the right.

Stage 2 — Add damping

Real oscillators lose energy. Air viscosity drags on a tuning fork; mechanical friction warms a shock absorber; electrical resistance dissipates current in an RLC circuit. We model the loss with a force proportional to velocity, opposing the motion:

x¨  +  2γx˙  +  ω02x  =  0.\ddot x \;+\; 2\gamma\, \dot x \;+\; \omega_0^2\, x \;=\; 0.

The coefficient γ>0\gamma > 0 is the damping rate. (The factor of 2 makes downstream formulas tidier.) Apply the same trick — substitute x=eλtx = e^{\lambda t}:

λ2  +  2γλ  +  ω02  =  0λ  =  γ  ±  γ2ω02.\lambda^2 \;+\; 2\gamma\, \lambda \;+\; \omega_0^2 \;=\; 0 \quad\Longrightarrow\quad \lambda \;=\; -\gamma \;\pm\; \sqrt{\gamma^2 - \omega_0^2}.

This is just the quadratic formula. Now look at what happens as we crank γ\gamma up from zero. The character of λ\lambda — and hence of x(t)x(t) — depends on the sign of the discriminant γ2ω02\gamma^2 - \omega_0^2. Four regimes:

t →x(t)regime: underdamped
Slide γ from 0 up past ω₀ to walk through all four regimes.

Slide γ\gamma from 0 up through and beyond ω0\omega_0. At low damping you get slow ringdown — a sinusoid inside a slowly-shrinking envelope (the dashed lines trace ±eγt\pm e^{-\gamma t}). At critical damping the oscillation just barely doesn’t happen. At high damping the curve sags back to zero without crossing it.

You can also vary x0x_0 and v0v_0 — the two pieces of data a second-order ODE always demands.

Why each regime matters

Each regime is the right answer for a different engineering problem. Engineers spend a lot of time deliberately choosing damping to land in one of these zones.

The characteristic roots in the complex plane

The four regimes correspond to four configurations of λ±\lambda_\pm in the complex plane. This is the most important picture in the chapter — once you see it the four-regime story becomes a single geometric statement.

complex plane: λ₊, λ₋Re λIm λ← stableunstable →λ₊λ₋solution x(t)T = 2π/|Im λ|t →
▮ Re(λ) sets the decay rate of the envelope.   ▮ Im(λ) sets the oscillation rate — period equals 2π divided by the imaginary part.

regime: underdamped

λ₊ = -0.30 + 0.95i  ·  λ₋ = -0.30 − 0.95i

Two synchronised pictures. On the left, the roots’ positions in the complex plane. On the right, the resulting time-domain x(t)x(t) from unit initial conditions. Two coloured rules tie them together:

Slide γ\gamma from 0 upward and watch both panels move together. The roots start on the imaginary axis (undamped — pure oscillation, no envelope), slide together along a semicircle into the left half-plane (underdamped — oscillation inside a shrinking envelope), meet on the real axis at γ=ω0\gamma = \omega_0 (critically damped — envelope collapses, no oscillation), and then walk apart along the real axis (overdamped — two decay rates, no oscillation).

Stable systems — ones that decay to equilibrium rather than blow up — live in the left half of the complex plane: Reλ<0\mathrm{Re}\,\lambda < 0. Unstable systems live in the right half. The imaginary axis is the stability boundary. The central question of control theory and circuit design is keeping the eigenvalues of a closed-loop system on the stable side of that axis.

Stage 3 — Force it

Now turn on the forcing. The simplest case is a sinusoidal drive at some frequency ω\omega:

x¨  +  2γx˙  +  ω02x  =  F0mcos(ωt).\ddot x \;+\; 2\gamma\, \dot x \;+\; \omega_0^2\, x \;=\; \frac{F_0}{m}\, \cos(\omega t).

The full solution is a sum of two parts: a transient (the homogeneous solution we just worked out, decaying with γ\gamma) plus a particular solution at the driving frequency ω\omega. After the transient dies out, only the steady-state response remains. Using the complex-exponential trick (refresher →), the steady-state amplitude as a function of drive frequency is

X~(ω)  =  F0/m(ω02ω2)  +  2iγω.\tilde X(\omega) \;=\; \frac{F_0 / m}{(\omega_0^2 - \omega^2) \;+\; 2 i \gamma \omega}.

The magnitude is maximised when ωω0\omega \approx \omega_0 — this is resonance. The peak height grows like 1/γ1/\gamma (so the peak diverges as damping vanishes); the peak width is γ\sim \gamma (so the peak narrows as damping vanishes). The quality factor Q=ω0/(2γ)Q = \omega_0/(2\gamma) captures both: high QQ means tall and narrow.

100 Hz1 kHz10 kHz0.010.1110100f₀ = 1 kHzdriving frequency f|H(f)| / |H(0)|
kbmP(t) = cos(ω t)
ReIm|H|=1inputresponse
input: cos(ω t)response: η(t)time → (4 cycles of the driving frequency)
700 Hz
10.0
f / f₀
0.700
|H(f)| / |H(0)|
1.94
phase lag
-7.8°

Slide the drive frequency past the natural frequency and watch the amplitude peak rise and fall. The phasor diagram on the side shows the phase of the response relative to the drive — exactly 90°90° behind at resonance, in phase well below, 180°180° out of phase well above. That 90°90° lag at resonance is a universal signature; it appears in every resonant system ever built.

Why resonance matters

Resonance is what makes acoustics, music, and hearing work — and what occasionally breaks bridges and shatters wine glasses. A small sample of real systems described by exactly the equation above:

Every one of those systems is described by the equation at the top of this section, with different physical meanings for ω0\omega_0 and γ\gamma but identical mathematics.

The history — From Newton's spring to the bandpass filter

The equation mx¨+kx=0m \ddot x + k x = 0 for simple harmonic motion appears as Proposition 38, Book I, of Newton’s 1687 Principia, in his analysis of a body oscillating on a “perfectly elastic” spring. Newton already knew that the solution was sinusoidal and that the period depended only on m/k\sqrt{m/k} — independent of amplitude. The same equation governs the small-angle pendulum (his Proposition 52), which is where the more famous SHM derivation lives.

Damping was added gradually through the 18th and 19th centuries; Lord Rayleigh’s Theory of Sound (1877) gives the equation mx¨+bx˙+kx=0m \ddot x + b \dot x + k x = 0 in the modern form. The classification of regimes — overdamped, underdamped, critically damped — comes from late-19th-century galvanometer design, where engineers cared about getting the needle to settle as quickly as possible without ringing. The optimum is critical damping, and “critical damping” is a term of art that crossed over from galvanometers into acoustics, mechanical engineering, and circuit design wholesale.

The complex-impedance approach to forced oscillators (X~=F0/[(kmω2)+ibω]\tilde X = F_0 / [(k - m\omega^2) + ib\omega] written as one line of algebra) was systematised by Charles Steinmetz for AC circuits in the 1890s — see also the Complex Exponentials chapter. The same algebra of impedances ties together acoustic, electrical, and mechanical filters; the bandpass filter of every audio EQ and every radio tuner is exactly this driven-oscillator equation, with different physical meanings for the symbols.

A pause before lesson 4

We’ve now done the canonical second-order story: SHM → damping → forcing. The same characteristic-equation trick handled all three. In the final lesson — 5.4 — Phase plane and classification — we step back and look at the geometric view, in which the same motion becomes a curve in (x,x˙)(x, \dot x) space, and meet the classification of equilibria that organises every 2-D linear system on a single map.