Separation of Variables & Fourier Series

the Fourier cosine series

The cosine series is the mirror image of the sine series. Every cosine cos(n pi x / L) has zero SLOPE at both ends of the interval 0 to L — its derivative vanishes there — so a sum of cosines automatically has a flat tangent at the ends. That makes the cosine series the natural match for Neumann boundary conditions, where it is the derivative (the flux) that must be zero on the boundary, like an insulated bar through whose ends no heat can flow.

The Fourier cosine series of f on 0 to L is f(x) = a_0/2 + sum over n >= 1 of a_n cos(n pi x / L), with a_n = (2/L) times the integral from 0 to L of f(x) cos(n pi x / L) dx. Note the extra a_0/2 term that the sine series lacks: it is the AVERAGE value of f over the interval, the n = 0 mode (a flat, constant shape). This constant cannot be dropped — for an insulated bar it is precisely the conserved average temperature that everything eventually settles to.

Geometrically, the cosine series of f on 0 to L is the full Fourier series of the EVEN extension of f to -L to L; even functions have only cosine terms. Because the even extension does not introduce a jump at x = 0 (it folds smoothly across the axis), a cosine series of a continuous f often converges faster and more gracefully than a sine series of the same f, which usually forces an artificial jump at the ends. In separation of variables you use the cosine series whenever the spatial eigenfunctions come out as cosines — i.e. whenever the ends are insulated (Neumann).

Expand f(x) = x on 0 < x < L in a cosine series. The average term is a_0/2 = L/2, and a_n = (2/L) integral from 0 to L of x cos(n pi x / L) dx = (2L/(n pi)^2)(cos(n pi) - 1), which is -4L/(n pi)^2 for odd n and 0 for even n. The coefficients fall off like 1/n^2 — faster than a sine series — because the even extension of x has no jump, only a corner.

The cosine series keeps the average term a_0/2 — for an insulated bar this is the conserved mean temperature.

The a_0/2 term is essential and easy to forget. For a Neumann (insulated) heat problem it is the long-time steady value the bar relaxes to, since no heat escapes. Drop it and your solution will be missing its average.

Also called
cosine series餘弦級數傅立葉餘弦展開