From an Orthogonal Basis of Numbers to an Orthogonal Basis of Functions
In the previous guide, Sturm-Liouville theory gave you a gift you may not have fully unwrapped yet: the eigenfunctions phi_1(x), phi_2(x), phi_3(x), ... of a regular Sturm-Liouville problem are mutually orthogonal — but orthogonal in a special, weighted sense. Two of them, phi_n and phi_m with n not equal to m, satisfy the integral of w(x) phi_n(x) phi_m(x) dx over the interval [a, b] equals zero, where w(x) is the weight function baked into the equation. That integral is not decoration; it is an *inner product*, the function-world version of the dot product of two vectors. Orthogonality here means exactly what perpendicularity means for arrows: these functions point in genuinely independent directions.
Now recall what an orthogonal basis buys you for ordinary vectors. If e_1, e_2, e_3 are perpendicular unit vectors, any vector v can be written v = c_1 e_1 + c_2 e_2 + c_3 e_3, and you find each coefficient by *projecting*: c_k is the dot product of v with e_k. You never solve a messy simultaneous system; each coordinate decouples because the cross terms vanish by orthogonality. The whole point of an [[eigenfunction-expansion|eigenfunction expansion]] is to do the identical thing one dimension higher — to treat a function f(x) as a 'vector' and the eigenfunctions as the perpendicular axes, then read off its coordinates one projection at a time.
The One Formula That Does All the Work
Here is the move that makes the whole subject tick. Suppose we believe we can write f(x) = c_1 phi_1(x) + c_2 phi_2(x) + c_3 phi_3(x) + ... as an infinite sum of eigenfunctions. To find a particular coefficient — say c_k — multiply both sides by w(x) phi_k(x) and integrate over [a, b]. On the right, *every single term dies* except the k-th, because the integral of w phi_n phi_k is zero whenever n is not k. Orthogonality is a machine that knocks out all the cross terms at once. What survives on the right is just c_k times the integral of w phi_k^2, and you solve for c_k directly. No linear system, no elimination — one projection.
Assume: f(x) = c_1 phi_1(x) + c_2 phi_2(x) + c_3 phi_3(x) + ...
Project onto phi_k : multiply by w(x) phi_k(x), integrate over [a, b]
integral_a^b w f phi_k dx = sum_n c_n * integral_a^b w phi_n phi_k dx
= c_k * integral_a^b w phi_k^2 dx (all n != k vanish)
Solve:
integral_a^b w(x) f(x) phi_k(x) dx
c_k = ----------------------------------------
integral_a^b w(x) phi_k(x)^2 dx
Classic Fourier sine case ( w = 1 , phi_k = sin(k pi x / L) on [0, L] ):
c_k = (2/L) * integral_0^L f(x) sin(k pi x / L) dxWhen the eigenfunctions are the family sin(k pi x / L) on [0, L] — the eigenfunctions of the simplest eigenvalue problem y'' + lambda y = 0 with y = 0 at both ends — this projection formula is literally the Fourier sine coefficient formula you may have seen dropped from the sky. It never came from the sky; it is exactly the integral above with w = 1 and the denominator computed once and for all as L/2. The general Sturm-Liouville case just replaces sin(k pi x / L) by whatever eigenfunctions your particular boundary value problem produced, and restores the weight. Same idea, wider reach: the same machinery generates Bessel-function series, Legendre-polynomial series, and more, the moment the problem demands those eigenfunctions instead of sines.
Building the Expansion, Step by Step
It helps to see the whole procedure laid out, because in practice the hardest part is bookkeeping, not insight. You already produced the eigenfunctions and eigenvalues in the earlier guides of this rung; the expansion is what you *do* with them. Here is the routine from start to finish.
- Solve the Sturm-Liouville boundary value problem for its eigenfunctions phi_k(x) and note the weight w(x) from the equation's self-adjoint form. (This is the work of the previous guides — here it is just the input.)
- Compute the normalization integral N_k = integral_a^b w(x) phi_k(x)^2 dx once for each k. This is the squared 'length' of the k-th axis and becomes the denominator.
- For the target function f(x), compute the projection integral integral_a^b w(x) f(x) phi_k(x) dx. This is the numerator — f's overlap with the k-th axis.
- Form the coefficient c_k = (numerator)/(denominator). Each c_k is independent of all the others — that decoupling is the entire payoff of orthogonality.
- Assemble f(x) = sum over k of c_k phi_k(x). Truncate after N terms when you need a numerical approximation, and remember the tail is what controls the error.
Notice how cheaply this scales. If you decide you want one more term for better accuracy, you compute one new coefficient and *every coefficient you already had stays exactly the same*. Compare that with fitting a polynomial through points, where adding one more node forces you to redo the whole fit. This stability under refinement — that adding detail never disturbs the coarse structure — is one of the deepest practical reasons orthogonal expansions are everywhere in physics and engineering.
What 'Equals' Honestly Means: Convergence and Its Edges
We wrote f(x) = sum of c_k phi_k(x) with an equals sign, but honesty demands we slow down on that sign. The expansion does not always converge to f at every single point, and pretending it does is the classic beginner trap here. The clean, dependable statement is mean-square convergence: the integral of w times (f minus the partial sum)^2 goes to zero as you keep more terms. In plain terms, the *energy* of the error shrinks to nothing — the series matches f in an averaged sense, the same sense in which orthogonality was defined. That is the natural notion of 'equals' in this whole theory, and it almost never fails for functions with finite energy.
Pointwise convergence — the series equalling f at each individual x — is a stronger and more fragile demand. For a reasonably smooth f it does hold, and at a jump discontinuity the series politely converges to the *average* of the left and right values, the midpoint of the gap. But right beside a jump, the partial sums overshoot by a fixed percentage that never shrinks no matter how many terms you add — the famous Gibbs phenomenon, a roughly nine-percent overshoot that merely gets narrower, not shorter. This is not a bug to be fixed; it is an honest consequence of trying to build a discontinuous wall out of smooth waves. Knowing it exists keeps you from misreading the wiggles near an edge as an error in your arithmetic.
Completeness: Why Nothing Is Left Over
There is one more thing the projection formula quietly assumes, and it deserves to be named. Having an orthogonal family is not enough — you also need *enough* of them. Imagine using only the perpendicular axes e_1 and e_2 in three-dimensional space: every projection is still legitimate, but you can never reconstruct a vector that pokes out along e_3. The eigenfunctions could, in principle, have the same defect: orthogonal, but missing some direction that f needs. [[ode-completeness-of-eigenfunctions|Completeness]] is precisely the guarantee that this never happens — that the eigenfunctions of a regular Sturm-Liouville problem span the entire space, so the mean-square error really does go all the way to zero with nothing left over.
This is the deep payoff of Sturm-Liouville theory and the reason it sits at the heart of so much applied mathematics: the theory does not merely produce an orthogonal family, it produces a *complete* one. That completeness is what turns the expansion from a clever approximation into a genuine representation. It is also what gives the family its other name, the [[ode-generalized-fourier-series|generalized Fourier series]] — 'generalized' precisely because the classical sine-and-cosine Fourier series is the single most famous complete orthogonal system, and Sturm-Liouville theory shows it was never special, just first.
Why does any of this matter beyond tidy theory? Because this is the [[bridge-to-separation-of-variables|bridge to separation of variables]] waiting in partial differential equations. When you solve the heat equation or the wave equation on an interval, separation of variables hands you exactly a Sturm-Liouville eigenvalue problem in the spatial variable, and the initial condition is a function you must match. Matching it means expanding it in these eigenfunctions — this very projection, this very completeness. The eigenfunction expansion is not a side-topic; it is the engine that converts an impossible-looking PDE into an infinite stack of simple, decoupled ODEs you already know how to solve, one for each coefficient.