Partial Differential Equations

Wave Equation

∂²u/∂t² = c²∇²u — the canonical hyperbolic PDE behind light, sound, and strings

The wave equation ∂²u/∂t² = c²∇²u is the canonical linear hyperbolic PDE — it governs light, sound, vibrating strings, and seismic waves. d'Alembert's solution u = f(x − ct) + g(x + ct) decomposes every 1D wave into right- and left-travelling shapes.

  • Equation∂²u/∂t² = c²∇²u
  • d'Alembert (1D)u(x,t) = f(x−ct) + g(x+ct)
  • ClassificationLinear hyperbolic, second-order
  • Speed (string)c = √(T/μ)
  • Speed (EM vacuum)c = 1/√(μ₀ε₀) ≈ 3×10⁸ m/s
  • CausalityFinite propagation speed, light cones

Watch the 60-second explainer

A condensed visual walkthrough — narrated, captioned, under a minute.

The equation

The wave equation in n spatial dimensions is

∂²u/∂t² = c² ∇²u

Here u(x, t) is the wave amplitude (string displacement, pressure perturbation, electric field component, ...), c is the propagation speed, and ∇² is the Laplacian in space. Both sides involve second derivatives — second in time on the left, second in space on the right, balanced by c² to make units match.

The equation is linear (superposition holds), second-order (two derivatives in each variable), and hyperbolic (the wave-type classification). It is the prototype of all classical wave motion, and a Lorentz-invariant equation in 3+1 dimensions — making it the first relativistic wave equation Maxwell wrote down, before relativity itself was named.

d'Alembert's solution in 1D

For one spatial dimension, ∂²u/∂t² = c² ∂²u/∂x². Jean le Rond d'Alembert showed in 1747 that the general solution is

u(x, t) = f(x − ct) + g(x + ct)

for arbitrary (twice-differentiable) functions f and g. The first term is a right-travelling shape: at time t, it equals f shifted by ct to the right. The second is a left-travelling shape: g shifted by ct to the left. Both move rigidly at speed c. Every solution of the 1D wave equation is exactly a superposition of a right-mover and a left-mover.

Verification. Let v = x − ct, w = x + ct. Then ∂_t u = −c f'(v) + c g'(w), ∂²_t u = c² f''(v) + c² g''(w). And ∂_x u = f'(v) + g'(w), ∂²_x u = f''(v) + g''(w). So c² ∂²_x u = c² f''(v) + c² g''(w) = ∂²_t u. ✓

Given initial conditions u(x, 0) = φ(x) (initial shape) and ∂u/∂t(x, 0) = ψ(x) (initial velocity), the answer is the explicit formula

u(x, t) = (1/2) [φ(x − ct) + φ(x + ct)] + (1/(2c)) ∫_{x − ct}^{x + ct} ψ(s) ds

The first term is the average of the initial shape at the two endpoints of the past light cone. The second is the integrated initial velocity over that interval. Together they reconstruct the solution exactly. d'Alembert's formula is one of the cleanest "explicit solutions of a PDE" in all of analysis.

Characteristics and light cones

The lines x = x₀ + ct and x = x₀ − ct in the (x, t) plane are called characteristics. Along them, the function u behaves like an ODE: u is constant along a right-characteristic if it has only a right-moving component, and similarly for left. The wave equation factors as

(∂_t − c ∂_x)(∂_t + c ∂_x) u = 0

so any solution is a sum of solutions to ∂_t − c ∂_x = 0 (right-movers) and ∂_t + c ∂_x = 0 (left-movers).

The geometric consequence: u(x, t) depends only on the initial data in the interval [x − ct, x + ct] — the past light cone of (x, t). Information travels at speed c, no faster. This is finite propagation speed, a hallmark of hyperbolic PDEs.

Contrast with the heat equation (parabolic), where any change in initial data is felt instantly everywhere — infinite propagation speed. The wave equation respects causality; the heat equation does not.

Worked example — vibrating string

A guitar string of length L = 0.6 m, mass μ = 1.0 g/m, tension T = 100 N. The wave speed is

c = √(T/μ) = √(100 / 0.001) = √(100000) ≈ 316 m/s

The fundamental frequency (lowest standing-wave mode) on a string with fixed ends is f_1 = c/(2L) = 316/1.2 ≈ 264 Hz — close to middle C. Higher harmonics: f_n = n f_1, so n = 2 gives ≈ 528 Hz, n = 3 gives ≈ 792 Hz. Pluck the string, and it vibrates in a superposition of these standing modes, the relative amplitudes depending on where and how you plucked.

The standing wave with fixed ends is a separation-of-variables solution: u(x, t) = sin(nπx/L) cos(nπc·t/L). Verify: ∂²u/∂t² = −(nπc/L)² · u, and c² ∂²u/∂x² = −c²(nπ/L)² · u — they match. The boundary conditions u(0, t) = u(L, t) = 0 are satisfied automatically by the sine choice. Each mode oscillates at angular frequency ω_n = nπc/L.

Plucking the string and letting it go, the resulting motion is a Fourier series of these standing modes — the connection between PDEs and Fourier analysis runs through here.

How the wave equation differs in 1D, 2D, and 3D

1D — d'Alembert

Sharp solutions. A localised pulse travels rigidly without distortion. The signal passes a point and the point returns instantly to rest.

3D — Kirchhoff's formula, Huygens' principle

For spherical symmetry, u(r, t) = (1/r) f(r − ct) + (1/r) g(r + ct). The general 3D Kirchhoff formula gives u as a surface integral of initial data over the sphere |y − x| = ct centred at x. A localised initial perturbation generates a clean spherical shell that propagates outward without leaving a trail — Huygens' principle in its strong form. A clap dies sharply.

2D — tail, no strong Huygens

The 2D solution involves a 2D integral over the disk of radius ct, including a weight that decays as 1/√(c²t² − |y − x|²). Result: after a sharp pulse passes a point, the disturbance does not return cleanly to zero — it has a slowly decaying tail. A stone dropped in a pond leaves persistent ripples. Huygens' principle holds in odd spatial dimensions ≥ 3 and fails in even dimensions.

Physical speeds in different media

Wave typeSpeed formulaTypical value
String (transverse)c = √(T/μ)≈ 100–500 m/s for instruments
Sound in air (20°C)c = √(γRT/M)343 m/s
Sound in waterc = √(K/ρ)1480 m/s
Sound in steelc = √(E/ρ)5100 m/s
Light in vacuumc = 1/√(μ₀ε₀)2.998 × 10⁸ m/s
Seismic P-wave (crust)c = √((K + 4G/3)/ρ)5–8 km/s
Seismic S-wavec = √(G/ρ)3–5 km/s
Tsunami (shallow water)c = √(g h)200 m/s in 4 km ocean

String, sound, and seismic waves all have c² proportional to "stiffness over density" — Young's modulus, bulk modulus, or shear modulus over mass density. Electromagnetic waves have c² = 1/(μ₀ε₀) involving the magnetic permeability and electric permittivity of vacuum. The unifying observation: c² = stiffness/inertia, in every case.

Maxwell's equations and the speed of light

Start with the source-free Maxwell equations in vacuum:

∇·E = 0       ∇·B = 0
∇×E = −∂B/∂t  ∇×B = μ₀ε₀ ∂E/∂t

Take ∇× of Faraday's law:

∇×(∇×E) = −∂/∂t (∇×B) = −μ₀ε₀ ∂²E/∂t²

Apply the vector identity ∇×(∇×E) = ∇(∇·E) − ∇²E. Since ∇·E = 0, the first term vanishes:

∇²E = μ₀ε₀ ∂²E/∂t²

That is the wave equation, component by component, with c² = 1/(μ₀ε₀). Plugging numbers: c = 1/√(4π·10⁻⁷ · 8.854·10⁻¹²) ≈ 2.998 × 10⁸ m/s. Maxwell published this calculation in 1865 and concluded that light is an electromagnetic wave — one of the great unifications in physics.

Energy conservation

The wave equation has a conserved energy. Define the energy density

e(x, t) = (1/2) (∂u/∂t)² + (c²/2) |∇u|²

The first term is kinetic, the second potential. The total energy E(t) = ∫ e dV satisfies dE/dt = 0 — energy is conserved exactly (in the continuum limit, on infinite or periodic domains; on bounded domains with Neumann/Dirichlet boundaries the energy can still flux across edges).

The proof is integration by parts: d/dt ∫ (1/2) u_t² dV = ∫ u_t u_{tt} dV = ∫ u_t · c² ∇²u dV (by the PDE) = −∫ c² ∇u_t · ∇u dV (by parts) = −d/dt ∫ (c²/2) |∇u|² dV. The two terms cancel. Energy conservation is rigorous.

For a vibrating string with tension T and density μ, the energy is E = ∫ ((μ/2) u_t² + (T/2) u_x²) dx — kinetic plus elastic-potential, with c² = T/μ ensuring the two terms balance dimensionally.

Solving the wave equation numerically

The standard explicit scheme is leapfrog:

u_{i, n+1} = 2 u_{i,n} − u_{i, n−1} + (c Δt / Δx)² (u_{i+1,n} − 2 u_{i,n} + u_{i−1,n})

The factor C = c Δt/Δx is the Courant number. The CFL stability condition is C ≤ 1: the numerical domain of dependence must contain the analytic one. Violate CFL and the simulation blows up exponentially. The CFL constraint was identified in 1928 by Courant, Friedrichs, and Lewy and applies to every explicit hyperbolic solver.

Production wave-equation codes use higher-order spatial stencils, perfectly matched layers (PMLs) to absorb outgoing waves at the domain edge, and either implicit or explicit time-stepping depending on stiffness. Spectral element methods, finite-element methods, and discontinuous Galerkin schemes all compete for high-accuracy seismic and electromagnetic simulation.

WaveHeatLaplace
Equationu_tt = c² ∇²uu_t = α ∇²u∇²u = 0
TypeHyperbolicParabolicElliptic
Time orderSecond (needs u, u_t)First (needs u only)None (static)
Propagation speedFinite (= c)InfiniteInstantaneous (static)
CharacteristicsReal (x = x₀ ± ct)None (t = const)Complex (no real)
Reversible in time?Yes (time-symmetric)No (irreversible)
Conserved energyYesNo (dissipated)
Physical exampleLight, sound, stringsDiffusion, conductionEquilibrium temperature

The wave equation is fundamentally different from the heat equation — they look superficially similar (both have ∇² on the right) but the time-derivative order changes everything. Reversibility, energy conservation, finite propagation speed, characteristics — all flow from the second time derivative.

Common mistakes

  • Confusing the wave equation with the heat equation. The single most common conceptual error. u_t = ∇²u (parabolic, dissipative, irreversible) is fundamentally different from u_tt = ∇²u (hyperbolic, conservative, reversible). The first time derivative versus the second changes the entire mathematical character.
  • Violating CFL. In numerical wave codes, c Δt/Δx ≤ 1 is non-negotiable. Practitioners often use 0.9 or so to be safe; pushing past 1 gives nan within a few steps.
  • Missing the second initial condition. The wave equation is second-order in time, so it needs both u(x, 0) (position) and ∂u/∂t(x, 0) (velocity). Specifying only one leaves the solution underdetermined.
  • Assuming Huygens' principle in 2D. Huygens holds in odd spatial dimensions ≥ 3, not in 2D. A 2D pulse leaves a tail. Acoustic codes for 2D pond surfaces need to account for this.
  • Using d'Alembert's formula on a finite domain. The formula assumes infinite extent. On a finite domain with boundaries, the formula must be modified to include reflections from the boundaries — the method of images is one way to do this for fixed/free ends.
  • Mistaking superposition for interference. Wave solutions superpose linearly (the equation is linear), but the visible "interference patterns" come from the geometry of the superposition — adding two solutions does not modify either component; we just see the sum.
  • Forgetting boundary conditions matter. The same wave equation produces standing modes on a finite string (sin(nπx/L)), travelling waves on an infinite string, and a mix on a half-infinite string with one fixed end. The PDE alone is not enough — boundaries shape the solution.

Frequently asked questions

What is d'Alembert's solution to the 1D wave equation?

d'Alembert (1747) showed that every solution of ∂²u/∂t² = c² ∂²u/∂x² on the real line has the form u(x, t) = f(x − ct) + g(x + ct), where f and g are arbitrary twice-differentiable functions. The first term is a right-travelling shape (rigidly shifted to the right at speed c), the second is left-travelling. Initial position u(x, 0) = φ(x) and initial velocity ∂u/∂t(x, 0) = ψ(x) uniquely determine f and g via the formula u(x, t) = (1/2)[φ(x − ct) + φ(x + ct)] + (1/(2c)) ∫_{x−ct}^{x+ct} ψ(s) ds — a clean explicit answer.

Why is the wave equation hyperbolic?

Second-order linear PDEs are classified by the discriminant b² − ac of their principal symbol. For ∂²u/∂t² − c² ∂²u/∂x² = 0, the discriminant is 0 − (1)(−c²) = c² > 0, so the equation is hyperbolic. The characteristic lines x = x₀ ± ct organise the causal structure: information travels along them at speed c, and the value of u at (x, t) depends only on the 'past light cone' — the interval [x − ct, x + ct] on the initial data. Hyperbolic equations have finite propagation speed, in contrast to parabolic (heat) which has infinite speed.

What is the speed of light derivation from the wave equation?

Take the curl of Faraday's law ∇×E = −∂B/∂t in vacuum, apply the vector identity ∇×(∇×E) = ∇(∇·E) − ∇²E, use ∇·E = 0 (no charges) to drop the first term, and use Ampère's law ∇×B = μ₀ε₀ ∂E/∂t on the right to get ∇²E = μ₀ε₀ ∂²E/∂t². That is the wave equation with c = 1/√(μ₀ε₀) ≈ 2.998 × 10⁸ m/s — the speed of light. Maxwell did this derivation in 1865 and concluded that light is electromagnetic radiation. Einstein's 1905 special relativity took c as the universal speed limit and the wave equation as Lorentz-covariant.

What speeds c appear in different physical waves?

Vibrating string: c = √(T/μ), where T is tension and μ is mass per unit length. A guitar string under 100 N tension and 1 g/m mass has c ≈ 316 m/s. Sound in air: c = √(γRT/M) ≈ 343 m/s at 20°C. Sound in water: ≈ 1480 m/s. Sound in steel: ≈ 5100 m/s. Electromagnetic in vacuum: c = 1/√(μ₀ε₀) ≈ 3 × 10⁸ m/s. Seismic P-waves: 5–8 km/s in the crust. Seismic S-waves: 60% of P-wave speed. Surface gravity waves on shallow water: c = √(gh) — long-wavelength tsunami in 4 km ocean has c ≈ 200 m/s ≈ 720 km/h.

How does the wave equation behave differently in 1D, 2D, and 3D?

1D: d'Alembert's formula gives clean, sharp solutions. A localised pulse travels rigidly. 3D (with spherical symmetry): u(r, t) = (1/r) f(r − ct) — Huygens' principle holds. A spherical pulse remains a clean spherical shell of the same width. 2D: solutions have a 'tail' — even after a sharp pulse passes a point, the disturbance lingers (logarithmically). Huygens' principle holds in odd spatial dimensions ≥ 3 but fails in even dimensions, including 2D. This is why a stone dropped in a pond leaves persistent ripples while a clap in 3D air dies sharply.

What is the energy of a wave solution?

For ∂²u/∂t² = c² ∇²u, the conserved energy density is e = (1/2)(∂u/∂t)² + (c²/2)|∇u|², and the total energy E = ∫ e dV is conserved in time. The first term is kinetic (rate of change), the second is potential (gradient stretching). For a string with tension T and density μ, E = ∫ ((μ/2)(∂u/∂t)² + (T/2)(∂u/∂x)²) dx. Verifying energy conservation is one of the cleanest applications of integration by parts: differentiate E in t, integrate by parts on the gradient term, use the wave equation to substitute ∂²u/∂t², and the terms cancel.

How is the wave equation discretised numerically?

The simplest scheme is leapfrog: u_{i,n+1} = 2 u_{i,n} − u_{i,n−1} + (c Δt/Δx)² (u_{i+1,n} − 2 u_{i,n} + u_{i−1,n}). Stable when the Courant–Friedrichs–Lewy (CFL) condition c Δt/Δx ≤ 1 holds — the numerical domain of dependence must include the analytic one. The factor c Δt/Δx is the Courant number, and CFL says it must be ≤ 1. Most production codes use higher-order spatial discretisations (4th- to 6th-order finite differences, or spectral methods), and absorbing boundary conditions (PMLs) to avoid spurious reflections from the edge of the computational domain.