Separation of Variables for the Wave Equation
How does a guitar string, clamped at both ends, know how to vibrate? This concrete question drives everything here. Pluck a string and release it: the resulting motion looks complicated. Yet it is secretly a superposition of pure tones. These are simple standing-wave shapes, each oscillating at its own natural frequency. Separation of variables is the technique that finds these pure tones. It also assembles them into a formula for the general motion. The idea matters because it converts an intractable partial differential equation in two variables into two ordinary differential equations. Each of these is solvable by elementary methods. This is the same strategy used across mathematical physics. Heat flow, quantum wavefunctions, and electromagnetic cavities are all attacked this way. First, one finds the "normal modes" of a linear system. Then one expands an arbitrary state in that mode basis. The wave equation on a finite string is the cleanest possible testing ground for this idea. Mastering it here pays dividends everywhere else. The big picture is this: the wave equation is linear, so solutions can be added together. Suppose we can find enough special solutions of the separated form . These must also satisfy the boundary conditions. Then a Fourier series built from these building blocks solves the full initial-boundary value problem. Its coefficients are chosen to match the initial position and velocity of the string. This is not a heuristic. It is a theorem with precise hypotheses, and we prove it in full. This article delivers the complete separation-of-variables machinery for the vibrating string. It includes the derivation of the standing-wave modes and the natural (angular) frequencies. It includes the theorem asserting that the Fourier sine series solves the problem, with a full proof. It also includes worked examples with genuinely asymmetric data. There is a counterexample showing why the boundary conditions cannot be dropped. Finally, it surveys where these ideas resurface in modern mathematics and physics.
- The wave equation on with fixed ends has special "standing wave" solutions .
- The natural (angular) frequencies are , forming a discrete harmonic sequence
- Separation of variables reduces the PDE to two linear ODEs: a spatial eigenvalue problem and a temporal oscillator equation.
- The general solution satisfying the initial position and initial velocity is a Fourier sine series with coefficients given by explicit integral (Euler) formulas.
- Superposition (linearity) is what allows infinitely many standing waves to be summed into one solution matching arbitrary initial data.
- Key idea: every vibration of a clamped string is a sum of pure sinusoidal standing waves, each with its own fixed spatial shape and its own single frequency of oscillation in time.
Where this lives today
The eigenfunction-decomposition idea generalizes far beyond the single vibrating string. In musical acoustics and instrument design, the natural frequencies explain why plucked strings produce harmonic overtones in integer ratios, directly shaping the design of pianos, guitars, and violins. In structural engineering, the same separation technique computes the resonant frequencies of beams, bridges, and building facades, which is essential for avoiding catastrophic resonance under periodic loads such as wind or foot traffic. In quantum mechanics, the time-independent Schrödinger equation is derived by an identical separation-of-variables argument applied to the time-dependent Schrödinger equation, and the resulting discrete energy eigenvalues are the direct mathematical descendants of the found here. In numerical analysis and computer graphics, modal sound synthesis and physically based animation of cloth and strings use truncated versions of exactly this Fourier mode expansion to simulate vibration efficiently. In signal processing, the discrete Fourier transform and its fast algorithms are the computational engine that extracts the coefficients from sampled data, connecting this 18th-century string problem directly to modern audio compression and spectral analysis.
Ask the tutor: How does this same separation technique change when one end of the string is free instead of fixed?
Let and be constants. The vibrating string problem asks for a function , defined for and , satisfying:
(the wave equation), together with the boundary conditions (fixed ends)
and the initial conditions
where are given functions describing the initial shape and initial velocity of the string, with for compatibility with the boundary conditions. A separated (standing-wave) solution is a nonzero solution of the wave equation of the special product form
where depends only on and only on .
Intuition
Picture a taut string clamped at and . Among all its possible motions, some are especially simple: the whole string oscillates up and down while keeping the same spatial shape at every instant, only rescaled in amplitude. These are the standing waves. The shape itself must vanish at both ends (since the ends are pinned), and it turns out only very specific shapes — sine curves for a positive integer — are geometrically compatible with being stretched by a pure oscillation in time without changing form. Each such shape has its own drumbeat: a single frequency at which that particular mode rings. The separation-of-variables method is the algebraic engine that discovers this fact. We guess a product solution , substitute into the PDE, and watch the two variables decouple: one side of the resulting equation depends only on , the other only on . Since and vary independently, both sides must equal one common constant — the separation constant. This single observation converts a two-variable PDE into a pair of one-variable ODEs, each of which we already know how to solve from ordinary differential equations and from the theory of Fourier series boundary value problems. The physical picture is that any actual vibration — plucked, struck, bowed — is a superposition of infinitely many of these standing waves, each vibrating at its own frequency , with amplitudes determined by how much of that mode's shape is present in the initial displacement and velocity. Fourier's insight, applied here, is that the sine functions form a complete orthogonal basis for functions vanishing at and , so any admissible initial shape can be decomposed exactly into these modes.
Let , . Suppose and satisfy the compatibility conditions
and let and have Fourier sine series on
with coefficients given by the Euler formulas
Define and . Then
is, under the additional assumption that this series and its termwise second derivatives in and converge uniformly on , the unique solution of the initial-boundary value problem of The Wave Equation and Vibrating Strings with fixed ends, initial position , and initial velocity . Moreover every separated solution of the wave equation satisfying for all has the form
for some integer and constants , with .
We proceed in four stages: (1) derive the separated ODEs, (2) solve the spatial eigenvalue problem, (3) solve the temporal equation and assemble the modes, (4) superpose the modes via Fourier series and prove the sum solves the original problem, then (5) prove uniqueness.
Step 1: Separation. Suppose is a nonzero solution of with twice differentiable. Substituting,
Since , there is a point with and ; in fact by continuity is not identically zero and is not identically zero (if or then ). Where , divide both sides by :
The left side is a function of alone; the right side is a function of alone. They are equal on an open set of where both are defined, and each is continuous, so fixing any and varying shows the right side is constant, and likewise the left side is constant. Call this common constant (the sign is chosen for later convenience). Thus
This is the decoupling promised by the method: two linear, constant-coefficient ODEs linked only by the shared constant .
Step 2: Spatial eigenvalue problem. The boundary conditions for all force and for all . Since (else ), there exists with ; evaluating at gives . So solves the boundary value problem
We claim the only values of admitting a nontrivial solution are , , with corresponding up to scalar multiples. This is exactly the eigenvalue analysis carried out in Fourier Series Solutions of Boundary Value Problems; we repeat the argument for completeness.
- If , write with . The general solution is . The condition gives , so . Then . Since , , forcing and hence : no nontrivial solution.
- If , the general solution is . Then and forces : again only the trivial solution.
- If , write with . The general solution is . Then , so . The condition requires, for a nontrivial solution (), that , i.e. for some positive integer (positive since ). Hence and , with (taking as a normalization).
This proves the claim: the eigenvalues are exactly for , each with one-dimensional eigenspace spanned by .
Step 3: Temporal equation and the modes. With , the temporal equation becomes
This is the simple harmonic oscillator equation; its general solution (a standard result on constant-coefficient linear ODEs) is
for arbitrary constants . Combining with , every separated solution satisfying the boundary conditions is a constant multiple, for some , of
which proves the "moreover" clause of the theorem: Steps 1–3 show that every separated solution vanishing at arises this way, since the derivation used no property of beyond separability and the boundary/nontriviality conditions.
Step 4: Superposition solves the full problem. The wave equation and the boundary conditions are linear and homogeneous, so any finite linear combination of the again solves them; we must justify passing to the infinite sum
By hypothesis this series, and the series obtained by differentiating it termwise twice in and twice in , converge uniformly on . A standard theorem of analysis (termwise differentiation of uniformly convergent series of differentiable functions with uniformly convergent derivative series) then permits differentiating under the summation sign, so
using that each solves the wave equation exactly (Step 3). Uniform convergence also justifies evaluating boundary and initial values termwise:
since for all . For the initial conditions,
by hypothesis (this is precisely the Fourier sine series of , which converges to pointwise on under the stated smoothness of , by the Fourier convergence theorem established in Fourier Series Solutions of Boundary Value Problems). Differentiating termwise in (justified by uniform convergence of the differentiated series) and setting ,
using by definition of , and again the Fourier convergence theorem applied to . Thus satisfies the wave equation, the boundary conditions, and both initial conditions: solves the problem.
Step 5: Uniqueness. Suppose both solve the initial-boundary value problem with the same , and suppose both possess the continuous second partial derivatives needed to justify the energy computation below. Let . Then solves the wave equation with , , . Define the energy
Differentiating under the integral sign (justified since is ) and using the wave equation :
where the last equality is the product rule run in reverse: , matching the integrand above term for term. By the Fundamental Theorem of Calculus,
But for all implies, upon differentiating these identities in , that for all . Hence for all , so is constant. At : for all implies (differentiate in ), and by hypothesis, so . Therefore . Since the integrand is continuous and nonnegative and integrates to over for every , it must vanish identically: and for all , . Thus is constant in both and , i.e. . So , proving uniqueness.
∎Worked examples
Example 1 — asymmetric plucked-and-flicked string. Take , , so . Suppose the string starts at rest shape
(note , , and is not symmetric about the midpoint , since while ), with initial velocity . Since , all , hence all . We need
Expand . We use the standard antiderivative reduction (integration by parts, three times, or the general formula ) with , . Rather than a generic formula, we integrate directly. Let with . Using repeated integration by parts:
Since : and . So
The boundary term is . For :
using , so . Thus
Boundary term: . For :
So . Now assemble:
Sum the terms: . Sum the terms: . Hence
So
Check : . Check : . These are positive and decreasing, consistent with a smooth bump-shaped . The solution is
Every term decays like , so the series (and its termwise - and -derivatives up to order 2, which introduce at most a factor ) converge absolutely and uniformly — consistent with the hypothesis of the theorem, because with matching boundary values conditions ensuring rapid Fourier decay.
Example 2 — nonzero initial velocity, asymmetric. Keep , now with and initial velocity
Here , , matching compatibility, and is already exhibited as a finite sine series in the eigenfunctions : comparing to the mode, and to the mode, we read off directly
(No integration is needed precisely because was chosen as a finite combination of eigenfunctions — a useful shortcut whenever the data is already "modal.") With : , . Then and . Since , all . The solution is exactly
a finite sum, exhibiting exactly two modes ringing simultaneously at incommensurate-looking but actually rational-ratio frequencies and (ratio ), producing an audibly non-periodic-looking but genuinely periodic beat pattern with period (since terms would repeat every -type combination; here the overall motion is periodic in with period the least common period of and , namely ).
The theorem requires the fixed-end boundary conditions to force the discrete spectrum and hence the countable set of natural frequencies . Drop this hypothesis — consider the same wave equation on but with no boundary condition imposed — and the separated spatial problem becomes merely
with no side conditions at all. For every real (positive, negative, or zero), this equation has nontrivial solutions: for ; for ; and for . There is no quantization of , hence no discrete set of natural frequencies, and no orthogonal eigenfunction basis to expand and in. Concretely, solves the wave equation for any real , so the family of separated solutions is a continuum, not a countable ladder. The Fourier-series solution formula in the theorem — a sum over integers — is meaningless without the boundary conditions supplying exactly the integers as the admissible mode indices. This is precisely why the boundary value problem, not the bare PDE, is the object whose spectrum produces the discrete musical harmonics of a real string.
Scope, edge cases & common traps
| Situation | What happens |
|---|---|
| or merely continuous, not | Fourier series may converge to only in or pointwise a.e.; termwise differentiation may fail, so solves the PDE only in a weak/distributional sense |
| or | Incompatible with fixed-end boundary conditions; no classical solution of the stated problem exists |
| Free or mixed boundary conditions (e.g. ) | Eigenfunctions become cosines or mixed sine/cosine; still discrete spectrum, different |
| All ; motion is purely "cosine in time," i.e. the string returns to its exact initial shape periodically | |
| All ; motion is purely "sine in time," starting flat but moving | |
| Infinite string () | Spectrum becomes continuous; sums become Fourier integrals/transforms, not series |
The mathematician behind it
Origins · 1 minJean-Baptiste Joseph Fourier and how this was discovered
Fourier developed the technique of expanding arbitrary functions in trigonometric series while studying heat conduction, in his 1822 treatise Théorie analytique de la chaleur. Although d'Alembert, Euler, and Daniel Bernoulli had already debated whether an arbitrary vibrating-string shape could be represented by a sine series decades earlier, it was Fourier's systematic machinery — the integral formulas for the coefficients, and the conviction that "arbitrary" functions could be so expanded — that turned the standing-wave decomposition into the general-purpose analytic tool used throughout this article.
Why does the separation constant have to be the same for both the -equation and the -equation?
Because separation of variables produces the equation , valid on an open set of pairs where . The left side depends only on , the right side only on . If you fix and let vary, the left side is a fixed number while the right side, a continuous function of , must equal that fixed number for all in an interval — so the right side is constant. The same argument run the other way shows the left side is that same constant. There is no freedom for the two sides to differ; equality of a function of alone and a function of alone, holding on a two-dimensional region, forces both to be one shared constant.
Why must the spatial eigenvalues be positive, ruling out ?
This is not assumed but proved directly by exhausting all three cases. For the general solution is built from and , which are strictly monotonic (for ) or always positive (for ) on for positive argument, so requiring and simultaneously forces every coefficient to zero. For the general solution is affine, , and the two zero boundary conditions again force both constants to zero. Only for does the oscillatory solution have the freedom to return to zero at a second point without being identically zero, provided is an integer multiple of .
What physically is the difference between the coefficients and ?
measures how much of the -th standing-wave shape is present in the initial displacement ; it multiplies the term, so a mode excited purely through initial displacement starts at its full modal amplitude and oscillates like a cosine, momentarily at rest at . measures how much of the -th mode's shape is present in the initial velocity , but it is rescaled by (via ) because integrating an initial velocity into a displacement amplitude for an oscillator with frequency divides by that frequency. High-frequency modes are therefore excited less efficiently by a given raw velocity Fourier coefficient than low-frequency modes.
Does this method work if the string has variable density or tension?
Not directly in the form given here, but the same strategy generalizes. If the wave equation has variable coefficients, such as , separation of variables still splits the PDE into a temporal harmonic oscillator and a spatial ODE, but the spatial ODE becomes a general Sturm–Liouville eigenvalue problem instead of the constant-coefficient studied here. The eigenfunctions are no longer plain sines, but Sturm–Liouville theory guarantees they still form a complete orthogonal basis, so the Fourier-series expansion and superposition argument carry over essentially unchanged, foreshadowing the broader theory of Eigenfunction Expansions.
Why is uniform convergence needed in the theorem, rather than just pointwise convergence?
Pointwise convergence of a series to a function says nothing about whether the derivative of the sum equals the sum of the derivatives; differentiating a convergent series termwise can produce a divergent or wrong-limit series. To legitimately swap the operations "sum over " and "take or ," analysis requires that the differentiated series also converge, and uniformly, on the domain of interest. Without this, the formal computation "" is unjustified, and the claim that the infinite sum satisfies the PDE at all would be an unproved leap, not a proof.
What happens to the solution formula if the string is released from rest but plucked asymmetrically, as in Example 1?
Nothing special breaks; the formula applies exactly as stated, with for all since , and computed by the Euler integral against the asymmetric shape . The resulting motion is a sum of standing waves each scaled by cosine in time, so the string momentarily returns to its exact original (asymmetric) shape at times where all the relevant cosines simultaneously realign — which happens periodically if the frequencies are commensurate, exactly as in Example 1 where all are integer multiples of .
Is the natural frequency the same as the ordinary (cyclic) frequency you'd hear as pitch?
No; as defined here is the angular frequency, in radians per unit time, appearing inside and . The ordinary frequency in cycles per unit time (hertz, if time is in seconds) is . It is this , not directly, that corresponds to the pitch you would perceive, and the ratio is exactly why the overtones of a string are integer multiples of the fundamental pitch.