Separation of Variables & Fourier Series

the Fourier sine series

Suppose you only want to build a shape out of sine waves — no cosines, no constant term. Every sine sin(n pi x / L) is zero at both ends of the interval 0 to L, so a sum of them is automatically pinned to zero at the ends. That makes the sine series the perfect match for a problem with Dirichlet boundary conditions, where the unknown must vanish on the boundary, like a string clamped at both ends or a bar whose ends are held at zero temperature.

The Fourier sine series of a function f on 0 to L is f(x) = sum over n >= 1 of b_n sin(n pi x / L), with coefficients b_n = (2/L) times the integral from 0 to L of f(x) sin(n pi x / L) dx. The factor 2/L and the integral come straight from orthogonality: multiply both sides by a particular sine and integrate, and every term but one cancels, leaving you the single coefficient. Each b_n measures how much of that sine shape is hidden inside f.

Geometrically, expanding f on 0 to L in sines is the same as taking the ODD extension of f to the interval -L to L and then its full Fourier series — odd functions have only sine terms. This is why the sine series naturally produces a function that is zero (and odd) at the ends: it matches Dirichlet data. In separation of variables you reach for the sine series exactly when the spatial eigenfunctions came out as sines, that is, whenever the boundary conditions hold the solution at zero on the edges.

Expand f(x) = 1 (the constant 1) on 0 < x < L in a sine series. The coefficients are b_n = (2/L) integral from 0 to L of sin(n pi x / L) dx = (2/(n pi))(1 - cos(n pi)), which is 4/(n pi) for odd n and 0 for even n. So 1 = (4/pi)[ sin(pi x/L) + (1/3) sin(3 pi x/L) + ... ] inside the interval — even though the sum is forced to zero exactly at x = 0 and x = L.

A sine series of a function that isn't zero at the ends still nails it to zero there — a built-in mismatch that fuels the Gibbs overshoot.

Use the sine series only for Dirichlet (zero-at-the-ends) boundary conditions. If the function is genuinely nonzero at an end, the sine series converges to zero there, not to the function's value — a discrepancy that produces a jump in the odd extension and the accompanying Gibbs overshoot.

Also called
sine series正弦級數傅立葉正弦展開