Waves & the Wave Equation

4 hours ~9 min read

Waves & the Wave Equation

Before quantum mechanics was mechanics, it was wave mechanics — and every wave idea Schrödinger needed was already a century old. Superposition, interference, and frequencies quantized by boundary conditions all live on an ordinary stretched string. Master the classical wave equation now, and the "weird" quantum features of Term 1 turn out to be old friends wearing new collars.

Learning Objectives

After this lesson you will be able to:

  1. Define a mechanical wave and derive the one-dimensional wave equation from Newton's second law applied to a stretched string.
  2. Prove and apply d'Alembert's solution f(xvt)+g(x+vt)f(x-vt) + g(x+vt), reading off propagation speed and direction.
  3. Describe harmonic waves via amplitude, wavenumber kk, angular frequency ω\omega, and the dispersion relation ω=vk\omega = vk, in real and complex-exponential form.
  4. Predict constructive/destructive interference from path difference, and derive the beat envelope of two nearby frequencies.
  5. Derive the normal modes of a string with fixed ends and explain quantization by boundary conditions — the classical ancestor of quantum energy levels.

Intuition

Drop a pebble in a pond, or flick the end of a rope: a pattern travels while the medium only jiggles locally. That is a wave — a propagating disturbance carrying energy and momentum without transporting matter. Every water molecule (and every fan in a stadium wave) returns to where it started; the shape moves on.

Three structural facts about the wave equation matter more than any single solution. It is linear, so solutions add — superposition and interference. It is second order in time, so initial shape and initial velocity must be supplied. And confining a wave — pinning a string at both ends — turns a continuum of possible frequencies into a discrete ladder. Replace "string displacement" by "wavefunction" and these become quantum superposition, quantum dynamics, and quantized energy levels. This lesson is Term 1 in disguise.


Theory

The wave equation from Newton's second law

A mechanical wave is a disturbance of a deformable medium that propagates through it, driven by the medium's inertia (it overshoots equilibrium) and its restoring force (it gets pulled back). On a string the disturbance is the transverse displacement y(x,t)y(x,t): each point moves perpendicular to the propagation direction (sound in air is longitudinal; the math is the same). The state of the medium is a whole function y(x,t)y(x,t) — our first infinite-dimensional system.

Take a string of uniform linear mass density μ\mu (kg/m) under uniform tension TT (N), displaced slightly from the xx-axis. The element between xx and x+Δxx+\Delta x has mass μΔx\mu\,\Delta x. Tension pulls tangentially at both ends, so with θ(x)\theta(x) the local angle to the horizontal, the net transverse force is Fy=Tsinθ(x+Δx)Tsinθ(x)F_y = T\sin\theta(x{+}\Delta x) - T\sin\theta(x). For small slopes (y/x1|\partial y/\partial x| \ll 1) we set $\sin\theta \approx \tan\theta = \partial y/\partial x$, and the horizontal components cancel to first order (tension stays uniform; no horizontal acceleration). Then, by the definition of the derivative of y/x\partial y/\partial x,

FyT[yxx+Δxyxx]T2yx2Δx. F_y \approx T\left[\frac{\partial y}{\partial x}\bigg|_{x+\Delta x} - \frac{\partial y}{\partial x}\bigg|_{x}\right] \approx T\,\frac{\partial^2 y}{\partial x^2}\,\Delta x .

Newton's second law Fy=(μΔx)2y/t2F_y = (\mu\,\Delta x)\,\partial^2y/\partial t^2 gives, cancelling Δx\Delta x,

  2yt2=Tμ2yx2=v22yx2,v=T/μ   \boxed{\;\frac{\partial^2 y}{\partial t^2} = \frac{T}{\mu}\frac{\partial^2 y}{\partial x^2} = v^2\,\frac{\partial^2 y}{\partial x^2}, \qquad v = \sqrt{T/\mu}\;}

— the 1D wave equation. The speed is set entirely by the medium: stiffer restoring force (larger TT) means faster; more inertia (larger μ\mu) means slower.

d'Alembert's general solution

Claim: y=f(xvt)+g(x+vt)y = f(x-vt) + g(x+vt) solves the wave equation for any twice-differentiable f,gf,g, and every solution has this form. Direct check: with u=xvtu = x-vt, the chain rule gives t2f(u)=v2f(u)\partial_t^2 f(u) = v^2f''(u) and x2f(u)=f(u)\partial_x^2 f(u) = f''(u), so t2f=v2x2f\partial_t^2 f = v^2\partial_x^2 f ✓ (same for gg; linearity lets us add). Generality: in the variables u=xvtu = x-vt, w=x+vtw = x+vt one has x=u+w\partial_x = \partial_u + \partial_w and t=vu+vw\partial_t = -v\partial_u + v\partial_w, so

t2yv2x2y=v2(uw)2yv2(u+w)2y=4v22yuw=0, \partial_t^2 y - v^2\partial_x^2 y = v^2(\partial_u - \partial_w)^2 y - v^2(\partial_u + \partial_w)^2 y = -4v^2\,\frac{\partial^2 y}{\partial u\,\partial w} = 0 ,

whence y/u\partial y/\partial u is independent of ww; integrating, y=f(u)+g(w)y = f(u) + g(w). The graph of f(xvt)f(x-vt) is the fixed shape f(x)f(x) translated rigidly rightward at speed vv (its argument is constant along x=vt+constx = vt + \text{const}); g(x+vt)g(x+vt) moves left.

Harmonic waves, dispersion, and phase vs group velocity

The workhorse solution is the harmonic wave y=Acos(kxωt+φ)y = A\cos(kx - \omega t + \varphi): amplitude AA, wavenumber k=2π/λk = 2\pi/\lambda (wavelength λ\lambda), angular frequency ω=2πν=2π/τ\omega = 2\pi\nu = 2\pi/\tau (frequency ν\nu, period τ\tau), phase constant φ\varphi. It has the form f(xvt)f(x-vt) only if kxωt=k(xvt)kx - \omega t = k(x - vt), i.e. ω=vk\omega = vk, equivalently λν=v\lambda\nu = v. A relation ω(k)\omega(k) is a dispersion relation; the string's is linear, so all harmonic waves share one speed and arbitrary shapes propagate undistorted.

In a dispersive medium ω(k)\omega(k) is nonlinear: crests move at the phase velocity vp=ω/kv_p = \omega/k while a localized packet (and its energy) moves at the group velocity vg=dω/dkv_g = d\omega/dk, and packets spread. Matter waves will prove maximally dispersive (ωk2\omega \propto k^2) — full treatment in P.4.3.

The complex representation

Following 0.3.1, write y=Re[A~ei(kxωt)]y = \operatorname{Re}[\tilde A\,e^{i(kx-\omega t)}], the complex amplitude A~=Aeiφ\tilde A = Ae^{i\varphi} packaging amplitude and phase. Derivatives become multiplications (xik\partial_x \to ik, tiω\partial_t \to -i\omega) and adding waves becomes adding complex numbers. Because the wave equation is linear with real coefficients, we may compute with ei(kxωt)e^{i(kx-\omega t)} throughout and take the real part at the end. For the string this is bookkeeping; in quantum mechanics the complex exponential becomes the physical object itself — no real part taken (P.4.1).

Superposition and interference

The operator L=t2v2x2\mathcal L = \partial_t^2 - v^2\partial_x^2 is linear: Ly1=Ly2=0\mathcal Ly_1 = \mathcal Ly_2 = 0 implies L(αy1+βy2)=0\mathcal L(\alpha y_1 + \beta y_2) = 0. Any linear combination of solutions is a solution — the superposition principle. Superposing two equal-amplitude waves that differ by a phase δ\delta gives, by the sum-to-product identity,

Acos(kxωt)+Acos(kxωt+δ)=2Acosδ2cos ⁣(kxωt+δ2). A\cos(kx - \omega t) + A\cos(kx - \omega t + \delta) = 2A\cos\tfrac{\delta}{2}\,\cos\!\big(kx - \omega t + \tfrac{\delta}{2}\big).

The resultant amplitude 2Acos(δ/2)2A|\cos(\delta/2)| ranges from 2A2A (constructive, δ=2mπ\delta = 2m\pi) to 00 (destructive, δ=(2m+1)π\delta = (2m{+}1)\pi). When the offset comes from two in-phase sources at different distances, δ=kΔ=2πΔ/λ\delta = k\Delta = 2\pi\Delta/\lambda with Δ\Delta the path difference: constructive at Δ=mλ\Delta = m\lambda, destructive at Δ=(m+12)λ\Delta = (m+\tfrac12)\lambda. This classical superposition of waves is the direct ancestor of the quantum superposition of states in the State Postulate: the same linearity, with amplitudes reinterpreted as probability amplitudes. In three dimensions the same sum acquires a direction, and interference becomes a pattern painted across space rather than a value at a point — that generalization, and the diffraction and grating physics it unlocks, is P.1.2.

Caution. Superposition adds amplitudes, never intensities. Intensity goes as amplitude squared: two equal in-phase waves give 4I04I_0, not 2I02I_0; out of phase they give 00. The cross term 2A1A2cosδ2A_1A_2\cos\delta redistributes energy from dark fringes to bright ones — the fringe-averaged intensity is still 2I02I_0. The same "add amplitudes, then square" rule governs quantum probability amplitudes, where forgetting it erases every interference effect.

Beats

Superpose equal amplitudes at slightly different frequencies, at a fixed point:

y(t)=Acosω1t+Acosω2t=2Acos ⁣(ω1ω22t)cos ⁣(ω1+ω22t). y(t) = A\cos\omega_1 t + A\cos\omega_2 t = 2A\cos\!\Big(\frac{\omega_1 - \omega_2}{2}t\Big)\cos\!\Big(\frac{\omega_1 + \omega_2}{2}t\Big).

The second factor oscillates fast at the mean frequency; the first is a slow envelope 2Acos(Δωt/2)2A\cos(\Delta\omega\,t/2). A detector senses intensity cos2(Δωt/2)\propto \cos^2(\Delta\omega\,t/2), which peaks twice per envelope period — loudness pulses at the beat frequency νbeat=ν1ν2\nu_{\text{beat}} = |\nu_1 - \nu_2|.

Standing waves: quantization by boundary conditions

Pin the string at both ends: y(0,t)=y(L,t)=0y(0,t) = y(L,t) = 0. Seek normal modes — motions where every point oscillates at one common frequency — with the separation ansatz y=X(x)ϕ(t)y = X(x)\phi(t). Substituting and dividing by XϕX\phi gives ϕ¨/(v2ϕ)=X/X\ddot\phi/(v^2\phi) = X''/X; a function of tt alone equals a function of xx alone, so both equal a constant, written k2-k^2 (a positive constant gives real exponentials that cannot vanish at both ends). Then X=asinkx+bcoskxX = a\sin kx + b\cos kx; the condition X(0)=0X(0) = 0 kills bb, and X(L)=0X(L) = 0 forces sinkL=0\sin kL = 0:

kn=nπL,  νn=ωn2π=nv2L  n=1,2,3, k_n = \frac{n\pi}{L}, \qquad \boxed{\;\nu_n = \frac{\omega_n}{2\pi} = \frac{nv}{2L}\;} \qquad n = 1, 2, 3, \dots

Each mode is yn=sin(knx)[Ancosωnt+Bnsinωnt]y_n = \sin(k_nx)[A_n\cos\omega_nt + B_n\sin\omega_nt] with ωn=vkn\omega_n = vk_n; the general motion is the superposition y=nyny = \sum_n y_n, coefficients fixed by initial shape and velocity via Fourier analysis (0.3.2). Equivalently a standing wave is two counter-propagating travelers: Asin(kxωt)+Asin(kx+ωt)=2AsinkxcosωtA\sin(kx - \omega t) + A\sin(kx + \omega t) = 2A\sin kx\cos\omega t.

This is the most important idea of the lesson: boundary conditions quantize frequencies — nothing quantum happened; a pinned string simply cannot vibrate at arbitrary frequencies. When de Broglie turns electrons into waves, fitting a whole number of wavelengths around an orbit quantizes the atom (P.3.2), and confining a matter wave in a box quantizes its energy — the infinite square well of P.5.2 is this calculation with a new dispersion relation. Moreover, each classical normal mode — a frozen spatial shape at a single frequency — is the direct ancestor of a quantum stationary state ψn(x)eiEnt/\psi_n(x)\,e^{-iE_nt/\hbar} with En=ωnE_n = \hbar\omega_n (P.4.2).


Worked Examples

Example 1 — Tuning a guitar string

A guitar's A-string has L=0.650L = 0.650 m and μ=4.00\mu = 4.00 g/m =4.00×103= 4.00\times10^{-3} kg/m. What tension tunes its fundamental to ν1=110\nu_1 = 110 Hz? From ν1=v/2L\nu_1 = v/2L: v=2Lν1=2(0.650)(110)=143v = 2L\nu_1 = 2(0.650)(110) = 143 m/s, so T=μv2=(4.00×103)(143)281.8T = \mu v^2 = (4.00\times10^{-3})(143)^2 \approx 81.8 N. The overtones sit at $\nu_2 = 220Hz, Hz, \nu_3 = 330Hz,with Hz, … with \lambda_n = 2L/n = 1.30,\ 0.650,\ 0.433$ m — an evenly spaced frequency ladder, courtesy of the linear dispersion relation. ✓

Example 2 — Two speakers and a path difference

Two speakers driven in phase emit ν=686\nu = 686 Hz in air (v=343v = 343 m/s), so $\lambda = v/\nu = 0.500m.Alistenerstands m. A listener stands r_1 = 3.00mfromonespeaker, m from one speaker, r_2 = 3.75$ m from the other. Path difference Δ=0.75\Delta = 0.75 m =1.5λ= 1.5\lambda: destructive — a dead spot. Stepping sideways to Δ=0.50\Delta = 0.50 m =1.0λ= 1.0\lambda: constructive, intensity 4I04I_0. At an intermediate point with Δ=0.125\Delta = 0.125 m, δ=2πΔ/λ=π/2\delta = 2\pi\Delta/\lambda = \pi/2, so the amplitude is 2Acos(π/4)=2A2A\cos(\pi/4) = \sqrt2\,A and I=2I0I = 2I_0 — checking the energy bookkeeping of the Caution above.


Hands-on (Python)

import numpy as np
import matplotlib.pyplot as plt

# --- 1. Two-wave interference (snapshots) and beats ---
x = np.linspace(0, 4, 1000)                        # metres
A, k = 1.0, 2*np.pi                                # lambda = 1 m
fig, ax = plt.subplots(2, 1, figsize=(8, 6))
for delta in (0.0, np.pi/2, np.pi):
    ax[0].plot(x, A*np.cos(k*x) + A*np.cos(k*x + delta), label=f"delta={delta:.2f}")
ax[0].set(title="Two equal waves, t = 0", xlabel="x (m)"); ax[0].legend()
# Expected: amplitudes 2, 1.41, ~0  ->  matches 2A|cos(delta/2)|

t = np.linspace(0, 2, 4000)                        # seconds
nu1, nu2 = 220.0, 224.0                            # Hz -> 4 Hz beat
y   = np.cos(2*np.pi*nu1*t) + np.cos(2*np.pi*nu2*t)
env = 2*np.cos(np.pi*(nu1 - nu2)*t)                # slow envelope
ax[1].plot(t, y, lw=0.5); ax[1].plot(t, env, "r", t, -env, "r")
ax[1].set(title="Beats: 220 Hz + 224 Hz", xlabel="t (s)")
plt.tight_layout(); plt.show()
# Expected: 8 loudness pulses in 2 s = |nu1 - nu2| = 4 Hz beat frequency.
import numpy as np
import matplotlib.pyplot as plt

# --- 2. Standing wave from counter-propagating travelers ---
L, v, n = 1.0, 1.0, 3
k = n*np.pi/L; w = v*k; tau = 2*np.pi/w            # mode-3 parameters
x = np.linspace(0, L, 500)
for frac in np.arange(0, 1.0, 0.125):              # 8 snapshots over one period
    t = frac*tau
    plt.plot(x, np.sin(k*x - w*t) + np.sin(k*x + w*t), label=f"t={frac:.3f} tau")
plt.title("n = 3 standing wave: nodes never move")
plt.xlabel("x (m)"); plt.legend(fontsize=7); plt.show()
# Expected: every snapshot vanishes at x = 0, 1/3, 2/3, 1 (fixed nodes);
# the profile 2A sin(kx) cos(wt) breathes in place -- no travel survives.
import numpy as np
import matplotlib.pyplot as plt

# --- 3. Fourier synthesis: evolving a plucked (triangular) string ---
L, v, a, h, N = 1.0, 1.0, 0.30, 0.05, 60           # pluck at x=a, height h, N modes
x  = np.linspace(0, L, 1000)
y0 = np.where(x < a, h*x/a, h*(L - x)/(L - a))     # initial triangle, released at rest
n  = np.arange(1, N + 1)
# b_n = (2/L) * integral y0(x) sin(n pi x/L) dx   (np.trapz on NumPy < 2.0):
b  = np.array([2/L*np.trapezoid(y0*np.sin(m*np.pi*x/L), x) for m in n])

def y(t):  # y(x,t) = sum_n b_n sin(k_n x) cos(w_n t)
    return np.sin(np.pi*np.outer(x, n)/L) @ (b*np.cos(n*np.pi*v*t/L))

tau = 2*L/v                                        # fundamental period
for frac in (0.0, 0.1, 0.2, 0.3, 0.4, 0.5):
    plt.plot(x, y(frac*tau), label=f"t = {frac:.1f} tau")
plt.title("Plucked string via normal-mode expansion")
plt.xlabel("x (m)"); plt.ylabel("y (m)"); plt.legend(fontsize=8); plt.show()
# Expected: the kink splits into two counter-propagating kinks; at t = 0.5 tau
# the shape is the initial triangle inverted & mirrored; it recurs at t = tau.

Exercises

E1 (easy). A wave on a string is y(x,t)=0.020sin(4πx200πt)y(x,t) = 0.020\sin(4\pi x - 200\pi t) (SI). Find the amplitude, wavelength, frequency, speed, and direction of travel.

Solution

A=0.020A = 0.020 m; k=4πk = 4\pi m1^{-1} so λ=2π/k=0.50\lambda = 2\pi/k = 0.50 m; ω=200π\omega = 200\pi s1^{-1} so ν=100\nu = 100 Hz; v=ω/k=50v = \omega/k = 50 m/s; the combination kxωtkx - \omega t moves in +x+x.

E2 (easy). Show directly (chain rule) that y=g(x+vt)y = g(x + vt) solves the wave equation for any twice-differentiable gg, and give its direction of motion.

Solution

With w=x+vtw = x + vt: ty=vg(w)\partial_t y = vg'(w), t2y=v2g(w)\partial_t^2 y = v^2g''(w), x2y=g(w)\partial_x^2 y = g''(w), so t2y=v2x2y\partial_t^2 y = v^2\partial_x^2 y ✓. The argument is constant along x=vt+constx = -vt + \text{const}: the shape moves in the x-x direction at speed vv.

E3 (medium). Using complex exponentials, re-derive the resultant amplitude of Acos(kxωt)+Acos(kxωt+δ)A\cos(kx-\omega t) + A\cos(kx-\omega t+\delta), then show the intensity averaged over all δ\delta is 2I02I_0.

Solution

Add phasors: $A + Ae^{i\delta} = Ae^{i\delta/2}(e^{-i\delta/2} + e^{i\delta/2}) = 2A\cos(\delta/2),e^{i\delta/2},ofmodulus, of modulus 2A|\cos(\delta/2)|$ — matching sum-to-product. Intensity I=4I0cos2(δ/2)=2I0(1+cosδ)I = 4I_0\cos^2(\delta/2) = 2I_0(1 + \cos\delta); cosδ\cos\delta averages to zero over [0,2π][0, 2\pi], so I=2I0\langle I\rangle = 2I_0: interference redistributes energy but conserves it.

E4 (medium). A string is fixed at x=0x = 0, but its end at x=Lx = L rides a frictionless massless ring on a rod, enforcing y/x(L,t)=0\partial y/\partial x\,(L,t) = 0 (a "free" end). Find the allowed frequencies.

Solution

X=asinkxX = a\sin kx from X(0)=0X(0) = 0; now X(L)=akcoskL=0X'(L) = ak\cos kL = 0 requires kL=(2n1)π/2kL = (2n-1)\pi/2, so νn=(2n1)v/4L\nu_n = (2n-1)v/4L: only odd multiples of a (lower) fundamental v/4Lv/4L. Different boundary conditions, different quantized spectrum — the spectrum encodes the boundary conditions.

E5 (hard). Compute the total energy of a string vibrating in one mode yn=Ansin(knx)cos(ωnt)y_n = A_n\sin(k_nx)\cos(\omega_nt), using kinetic density 12μ(ty)2\tfrac12\mu(\partial_ty)^2 and potential density 12T(xy)2\tfrac12T(\partial_xy)^2. Show it is constant in time.

Solution

tyn=ωnAnsin(knx)sin(ωnt)\partial_ty_n = -\omega_nA_n\sin(k_nx)\sin(\omega_nt) and xyn=knAncos(knx)cos(ωnt)\partial_xy_n = k_nA_n\cos(k_nx)\cos(\omega_nt). Using 0Lsin2(knx)dx=0Lcos2(knx)dx=L/2\int_0^L\sin^2(k_nx)\,dx = \int_0^L\cos^2(k_nx)\,dx = L/2: K=14μLωn2An2sin2ωntK = \tfrac14\mu L\omega_n^2A_n^2\sin^2\omega_nt and U=14TLkn2An2cos2ωntU = \tfrac14TLk_n^2A_n^2\cos^2\omega_nt. But Tkn2=μv2kn2=μωn2Tk_n^2 = \mu v^2k_n^2 = \mu\omega_n^2, so $E_n = K + U = \tfrac14\mu L\omega_n^2A_n^2 = \text{const}$: energy sloshes between kinetic and potential — each normal mode is an independent harmonic oscillator of frequency ωn\omega_n. Classical physics then hands every mode an average thermal energy kBTk_BT; counting cavity modes this way leads straight to the ultraviolet catastrophe of P.2.1.


Checkpoint

  1. What physical assumptions produce t2y=(T/μ)x2y\partial_t^2y = (T/\mu)\,\partial_x^2y for a string?
  2. Why does f(xvt)f(x - vt) describe a rigidly right-moving shape, and what property of the dispersion relation keeps shapes rigid?
  3. Two equal in-phase waves overlap. What is the intensity relative to one wave alone, and why is energy still conserved?
  4. Why do fixed ends allow only νn=nv/2L\nu_n = nv/2L? What plays the analogous role for a quantum particle in a box?
  5. Distinguish phase velocity from group velocity. For which media do they coincide?
Answers
  1. Small transverse displacements (xy1|\partial_xy| \ll 1), uniform tension and density, purely transverse motion, no gravity or damping; Newton's law on an element μΔx\mu\,\Delta x does the rest.
  2. Its argument is constant along x=vt+constx = vt + \text{const}, so the graph translates rigidly at vv. Rigidity holds because ω=vk\omega = vk is linear — all Fourier components share one speed.
  3. 4I04I_0: amplitudes add to 2A2A and intensity is amplitude squared. Averaged over a fringe pattern the intensity is 2I02I_0 — interference only redistributes energy.
  4. y(0)=y(L)=0y(0) = y(L) = 0 forces sinkL=0\sin kL = 0, so kn=nπ/Lk_n = n\pi/L and νn=vkn/2π=nv/2L\nu_n = vk_n/2\pi = nv/2L. For a quantum particle, the wavefunction vanishing at the box walls quantizes kk and hence the energy (P.5.2).
  5. vp=ω/kv_p = \omega/k moves crests; vg=dω/dkv_g = d\omega/dk moves packets and energy. They coincide exactly when ωk\omega \propto k — nondispersive media like the ideal string.

Further Reading

  • [Gold] Goldstein, Poole & Safko, Ch. 13 — the string's wave equation re-derived from a Lagrangian density; classical field theory in embryo.
  • [Gri] Griffiths & Schroeter, §2.4 — wave packets and phase vs group velocity, in their quantum habitat.
  • [ER] Eisberg & Resnick, §3.1–3.2 — how the classical wave toolkit is reused for de Broglie's matter waves.

← Prev: Pre-Term Overview · Up: Pre-Term · Next: Wave Propagation, Diffraction & Gratings

Ready to measure your state?

5 exercises · 10 checkpoint questions

Start the quiz