Boundary-Value Problems and Eigenfunctions
On the previous page, separating a PDE handed us a spatial equation
X'' + \lambda X = 0 together with conditions at the ends of the rod, and
something remarkable happened: only a discrete ladder of constants
\lambda_n gave a non-zero answer, each with its own shape
X_n. That was no accident of the heat equation. It is a completely general
phenomenon with a name straight out of linear algebra: a boundary-value problem is an
eigenvalue problem in disguise. The special constants are eigenvalues, and
the special shapes are eigenfunctions — the vibrating patterns a system is willing
to hold.
This page is about that single, unifying idea: differential operators, with boundary
conditions attached, behave exactly like symmetric matrices — they have real eigenvalues, orthogonal
eigenfunctions, and a complete basis you can expand any field in. We will meet the
Sturm–Liouville form that guarantees all of this, see why orthogonality makes
finding coefficients almost trivial, and understand what "completeness" promises. Once you see a
vibrating string as the eigenvectors of an operator, Fourier series stop being a trick and become
just "diagonalising in the right basis."
From "solve for u" to "find the eigenpairs"
Compare two problems side by side. In linear algebra you meet
A\,\mathbf{v} = \lambda\,\mathbf{v},
and ask: for which numbers \lambda does the matrix
A merely stretch a vector \mathbf{v}
rather than rotate it? Those are the eigenvalues, and the surviving directions are the
eigenvectors. Now write the differential operator \mathcal{L} = -\dfrac{d^2}{dx^2}.
The spatial equation from separation of variables is
\mathcal{L}\,X = \lambda\,X, \qquad X(0) = X(L) = 0.
It is the same question: for which \lambda does the operator
\mathcal{L} just scale a function X (subject to
the boundary conditions) instead of reshaping it? A boundary-value problem is a
differential equation plus conditions pinned at the edges of the domain — unlike an initial
value problem, where everything is fixed at one starting instant. And pinning the edges is precisely
what turns a continuum of possibilities into a discrete spectrum.
-
An eigenvalue \lambda_n is a value of the separation
constant for which the boundary-value problem has a non-trivial solution.
-
The corresponding eigenfunction X_n is that
non-trivial solution — the natural mode shape.
-
For the clamped string, \lambda_n = (n\pi/L)^2 and
X_n(x) = \sin(n\pi x/L), with
n = 1, 2, 3, \dots
Orthogonality: the eigenfunctions don't overlap
Here is the property that makes eigenfunctions genuinely useful. Just as the eigenvectors of a
symmetric matrix point in mutually perpendicular directions, the eigenfunctions of a nice
boundary-value problem are orthogonal — but orthogonality of functions is measured
by an integral inner product, not a dot of components:
\langle X_m, X_n\rangle = \int_0^L X_m(x)\,X_n(x)\,dx.
For the string modes this integral is zero whenever
m \neq n:
\int_0^L \sin\!\left(\frac{m\pi x}{L}\right)\sin\!\left(\frac{n\pi x}{L}\right)dx
= \begin{cases} 0, & m \neq n,\\[2pt] L/2, & m = n. \end{cases}
Two different modes are "perpendicular functions": positive and negative lobes overlap and cancel
exactly. The interactive below plots any two modes and their product
X_m X_n; watch the shaded product region: for different
m, n the positive and negative areas balance to zero, but for
m = n the product \sin^2 sits entirely above the
axis and integrates to L/2.
Why orthogonality is a gift: reading off coefficients
Suppose you want to write some profile f(x) as a superposition of modes,
f(x) = \sum_{n=1}^{\infty} b_n\,X_n(x).
Without orthogonality, finding the b_n would mean solving an infinite
coupled system. With it, the coefficients fall out one at a time. Take the inner product of both
sides with a single mode X_m. On the right, orthogonality wipes out
every term except n = m:
\langle f, X_m\rangle = \sum_n b_n \langle X_n, X_m\rangle
= b_m \langle X_m, X_m\rangle.
So each coefficient is just a ratio of two integrals — a projection, exactly like
reading off a vector's component along a basis direction:
b_m = \frac{\langle f, X_m\rangle}{\langle X_m, X_m\rangle}
= \frac{2}{L}\int_0^L f(x)\,\sin\!\left(\frac{m\pi x}{L}\right)dx.
That is the Fourier coefficient formula from the previous page — and now you see why it
works. It is not a special integral trick; it is the same projection you use to find
\mathbf{v}\cdot\hat{\mathbf{e}}_i in ordinary geometry, just with an
integral inner product. Orthogonal basis functions are what make the coefficients decouple.
Sturm–Liouville: the reason it always works
Why should a differential operator behave so beautifully — real eigenvalues, orthogonal
eigenfunctions — like a symmetric matrix? The answer is that a huge class of the operators physics
throws up can be massaged into one universal template, the Sturm–Liouville form:
\frac{d}{dx}\!\left[p(x)\,\frac{dX}{dx}\right] + q(x)\,X
+ \lambda\,w(x)\,X = 0,
with p, w > 0 on the interval and suitable boundary conditions at the
ends. Our simple X'' + \lambda X = 0 is the plainest case
(p = w = 1, q = 0). But the same frame holds
Bessel's equation (drum modes on a disk), Legendre's equation (fields on a sphere), the quantum
harmonic oscillator, and many more. The magic is that a Sturm–Liouville operator is
self-adjoint — the continuous analogue of a symmetric matrix
(A = A^{T}) — and self-adjointness is exactly what guarantees the good
behaviour.
-
Real spectrum. The eigenvalues \lambda_n are all
real, and form an increasing sequence \lambda_1 < \lambda_2 < \dots \to \infty.
-
Orthogonality. Eigenfunctions for different eigenvalues are orthogonal with
respect to the weight w:
\int_a^b X_m X_n\, w\,dx = 0 for m \neq n.
-
Completeness. The eigenfunctions form a complete set: any
well-behaved function on the interval can be expanded in them.
Notice the weight w(x) sneaking into the inner product — for the plain
string it is 1, but for Bessel or Legendre problems it is what makes the
modes orthogonal. The general lesson: each boundary-value problem comes with its own natural
inner product, and its eigenfunctions are orthogonal in that one.
Completeness: the promise that you can build anything
Orthogonality tells you the modes don't overlap; completeness tells you they leave
nothing out. It is the promise that the eigenfunction expansion
\sum_n b_n X_n can reproduce any reasonable function on the
interval — that your basis is big enough to span the whole space of possible profiles, with no
"missing directions."
This is what lets separation of variables actually solve the physics: whatever weird initial
temperature or plucked-string shape you start with, completeness guarantees it can be written as a
sum of modes, and then each mode evolves on its own. Completeness is the difference between a basis
and a mere orthogonal set. (Formally it means the expansion converges to f
in the mean-square sense — Parseval's theorem is the energy bookkeeping that goes with it — but the
headline is simply: the modes are enough.)
Exactly the right question — orthogonality is meaningless without saying "perpendicular with
respect to what?" For ordinary vectors the answer is the dot product
\mathbf{u}\cdot\mathbf{v} = \sum_i u_i v_i. For functions it is the same
idea with the sum promoted to an integral: \langle f,g\rangle = \int_a^b f\,g\,w\,dx.
Think of a function as a vector with infinitely many components — one for each point
x — and the integral as the limit of the componentwise sum. Everything
from finite-dimensional geometry carries over: length is
\|f\| = \sqrt{\langle f,f\rangle}, "angle" between functions makes sense,
projecting onto a basis is the same operation. This is the whole point of Hilbert space:
it lets you do geometry with functions. A Fourier series is nothing but resolving a vector into
perpendicular components — the components just happen to be sine waves.
Orthogonality depends on the boundary conditions and the weight — it is not a property of
the functions alone. A common mistake is to declare "sines are orthogonal, cosines are
orthogonal" as if it were a fixed fact about those curves. It is not. The integral
\int_0^L \sin(m\pi x/L)\sin(n\pi x/L)\,dx = 0 holds because those
particular sines are the eigenfunctions of -d^2/dx^2 with
Dirichlet ends X(0)=X(L)=0. Change the boundary conditions —
say to insulated (Neumann) ends X'(0)=X'(L)=0 — and the orthogonal set
becomes cosines, including the constant mode. Mix and match a sine from one problem with a
cosine from another and the integral generally is not zero.
And for Bessel or Legendre problems the modes are orthogonal only once you insert the correct weight
w(x) — forget it and your coefficient integrals come out wrong. Always ask:
orthogonal with respect to which inner product, under which boundary conditions?
Checking orthogonality numerically
Do not take the vanishing integral on faith — integrate it. This midpoint-rule sum estimates
\int_0^\pi \sin(mx)\sin(nx)\,dx for a couple of mode pairs on
[0,\pi] (where L=\pi), and you can watch the
off-diagonal pair collapse to zero while the diagonal pair lands on
\pi/2 \approx 1.571:
function overlap(m: number, n: number): number {
const N = 2000, dx = Math.PI / N;
let sum = 0;
for (let i = 0; i < N; i++) {
const x = (i + 0.5) * dx; // midpoint
sum += Math.sin(m * x) * Math.sin(n * x) * dx;
}
return sum;
}
console.log(` = ${overlap(2, 3).toFixed(4)} (different modes → 0)`);
console.log(` = ${overlap(3, 3).toFixed(4)} (same mode → L/2 = π/2)`);
Different modes annihilate; a mode with itself gives the norm. That single fact — orthogonality — is
the engine under every Fourier series you will ever write.