6.3 Separation of variables
The d’Alembert picture from 6.2 is the right way to think about wave propagation on an unbounded domain — a single pulse, characteristics streaking off to infinity. But many of the systems we care about — a guitar string clamped at both ends, an organ pipe with closed bottom and open top, the acoustic field inside a rectangular room — live on bounded domains where characteristics reflect off the boundaries repeatedly. After a few bounces the d’Alembert picture becomes a tangle of overlapping left-going and right-going pieces, and a different decomposition becomes more useful.
The alternative is separation of variables, a technique that decomposes the solution into a product of functions, each of which depends on only one of the independent variables. The result is a factorised solution that turns one PDE into two (or more) ODEs — and on a bounded domain, the boundary conditions select a discrete family of allowed factorisations called modes. The mode catalogue is the subject of 6.5; the boundary-condition rules that select the catalogue are the subject of 6.4. This lesson is about the technique itself.
The technique in four steps
Given a linear PDE on a bounded domain with linear, homogeneous boundary conditions:
- Assume a product solution. Substitute the ansatz into the PDE and divide through by .
- Separate. Rearrange so one side depends only on and the other only on . Since the two sides depend on independent variables, both must equal a common constant — the separation constant. Calling it (the sign and form are conventional, and we’ll see why below) produces an -ODE and a -ODE.
- Apply the spatial boundary conditions. They translate directly into boundary conditions on . Only for a discrete set of separation constants does a non-trivial solution exist. Each comes paired with a spatial mode shape .
- Build the general solution. Superpose all the allowed modes: , with each a solution of its time ODE. Match initial conditions by projecting onto the basis.
This is the entire algorithm. Below, we work it out on the canonical example.
Worked example: the clamped string
▶ Worked example: every step, no shortcuts
The problem. A string of length is held fixed at both ends. Its transverse displacement obeys the 1-D wave equation
with boundary conditions for all (the ends are clamped), and initial conditions (the initial shape) and (the string starts at rest).
Step 1 — Substitute the product ansatz. Try
The partial derivatives separate cleanly:
Substituting into the wave equation:
Step 2 — Divide by and separate.
The left side depends only on . The right side depends only on . For two functions of independent variables to be equal at all values of those variables, both must equal the same constant. Call that constant :
(The sign is a convention. Choosing rather than anticipates that the bounded-domain problem will produce oscillating spatial solutions, not exponentially growing or decaying ones. If we got the sign wrong we would discover it later — the boundary conditions would force only the trivial solution. We will see that below.)
The PDE has decoupled into two ODEs:
Both are second-order linear ODEs with constant coefficients — exactly the equations we learned to solve in 5.3.
Step 3 — Solve the spatial ODE with its boundary conditions. The spatial ODE has the general solution
Apply the left boundary condition (the value forces for all , so unless is identically zero we need ):
so and . Apply the right boundary condition :
We don’t want (that gives the trivial ). So we need , which forces
This is the quantisation condition. The boundary conditions have selected a discrete set of allowed values:
with corresponding mode shapes
The amplitude is absorbed into the time-dependent coefficient at the end. Each integer labels one mode: is the half-wavelength fundamental, has a node at the centre, and so on. We get infinitely many modes, indexed by .
Quick check on the sign of the separation constant. If we had chosen instead of , the spatial ODE would be with solution — exponentials, not sinusoids. The boundary conditions would force . Only the sign that gives sinusoids produces non-trivial modes. The boundary conditions chose the sign for us.
Step 4 — Solve the time ODE for each mode. For each the time ODE is
with . The general solution is the simple-harmonic motion we know from 5.3:
Step 5 — Build the general solution. Each solves the PDE and the boundary conditions. By linearity, any sum of them also solves the PDE and the boundary conditions. The general solution is the superposition:
We have two coefficient sets, and — one set per piece of initial data, just as a second-order ODE in time needs two initial pieces.
Step 6 — Apply the initial conditions. From :
This is a Fourier sine series expansion of on . The coefficients are extracted by projection onto the mode basis, a step we develop properly in 6.5 — Modes once we have the orthogonality relations in hand.
From :
Step 7 — Final answer.
with the Fourier sine-series coefficients of the initial shape .
Step 8 — Sanity-check.
- Boundary conditions. Every term has , which vanishes at and . ✓
- Initial shape. At , every cosine is 1 and the formula reduces to , the Fourier series of . ✓
- Initial velocity. Differentiate in and evaluate at . Every term picks up a factor of . So . ✓
- PDE. For each , and . Since , the term satisfies . ✓
What just happened, in two sentences
The PDE separated cleanly into two second-order ODEs because the wave equation is linear and the unknown’s -dependence and -dependence enter through different terms. Bounded-domain boundary conditions on then quantised the separation constant, producing a discrete ladder of modes whose superposition is the general solution.
The technique is mechanical, but two things in the algorithm carry real physical content and deserve to be unpacked: how the boundary conditions are chosen (next lesson, 6.4), and what the resulting modes really are — their orthogonality, completeness, and how to project initial data onto them (6.5).