The Fast Fourier Transform & Spectral Methods

a spectral method

Finite-difference and finite-element methods approximate the solution of a differential equation by connecting many little local pieces — a fine mesh of points or small elements. A spectral method takes the opposite, global view: it represents the entire solution as a single sum of smooth, globally-defined basis functions (sine and cosine waves, or Chebyshev polynomials) and adjusts their coefficients to satisfy the equation. For smooth problems this global representation pays off with extraordinary accuracy.

Here is the idea in plain steps for a periodic problem. Write the unknown solution u as a truncated Fourier series, u(x) = sum of c_k * e^(i*k*x) over the lowest N frequencies. Because differentiation in this basis is just multiplication by i*k (spectral differentiation), the differential equation turns into a set of algebraic relations among the coefficients c_k, which you solve. For nonlinear or variable-coefficient problems the pseudospectral approach is common: compute derivatives in frequency space (multiply by i*k, via FFT) but evaluate nonlinear products in physical space (on the grid), flipping back and forth with the FFT each step. The headline reward is spectral accuracy: for a smooth solution the error shrinks faster than any power of N, so a spectral method can reach with 32 points an accuracy a finite-difference scheme needs thousands of points to match.

Spectral methods dominate where the geometry is simple and the solution is smooth: turbulence simulations in a periodic box, global weather and climate models, and quantum and wave problems. Their honest limitations are equally sharp. They demand smoothness — a shock or discontinuity destroys the accuracy and triggers Gibbs oscillations — and the global basis fits naturally only on simple domains (a box, a disk, a sphere); complicated geometry is far easier for finite elements. The plain Fourier version needs periodicity; non-periodic problems use the Chebyshev variant. And because each basis function is global, the resulting linear systems are typically dense rather than sparse, though the FFT often restores fast solvers.

Solve the periodic heat equation u_t = u_xx by spectral method. In Fourier space each coefficient obeys c_k'(t) = -k^2 * c_k, a tiny independent ODE with solution c_k(t) = c_k(0) * e^(-k^2 * t). One FFT in, exact time evolution coefficient by coefficient, one inverse FFT out — and the spatial accuracy is essentially exact for the smooth solution.

Represent the whole solution in a wave basis — derivatives become multiplication.

Spectral accuracy is conditional on smoothness and simple geometry; shocks, discontinuities, or complicated domains erase the advantage, where finite elements or finite volumes are the better tool. Global basis functions also make the linear systems dense.

Also called
Fourier spectral methodglobal expansion method頻譜方法全域展開法