Numerical Methods for PDEs

a spectral method

Finite differences and finite elements approximate a solution with many simple, local pieces — little hats or short Taylor stencils — and pay for accuracy by using more and more of them. Spectral methods take the opposite philosophy: represent the solution as a sum of a FEW very smooth global basis functions that each span the whole domain — sines and cosines, or Chebyshev polynomials — and let those globally-aware functions do the work. For smooth problems the reward is spectacular: the error falls faster than any power of the mesh size.

Here is how it works for a periodic problem. Write the unknown as a truncated Fourier series, u(x) = sum of c_k e^(i k x) over wavenumbers k. Differentiation becomes trivial in this representation — d/dx just multiplies the coefficient c_k by (i k), so a derivative of any order is exact on the basis, with no truncation error from the differentiation itself. You then enforce the PDE either by requiring the residual to be orthogonal to the basis (the Galerkin spectral method) or by demanding the equation hold exactly at a set of collocation points (the pseudo-spectral method), and the fast Fourier transform (FFT) ferries data between physical-space values and spectral coefficients in O(N log N) operations. The accuracy claim is the headline: for an INFINITELY smooth (analytic) solution, the error decays exponentially in the number of modes N — so-called spectral accuracy — vastly outpacing the algebraic h^2 or h^p of difference and element methods. A handful of modes can match what thousands of grid points give.

The catch is exactly where the magic comes from: spectral accuracy requires SMOOTHNESS. If the solution has a discontinuity or a sharp front, the global Fourier basis cannot represent it cleanly — you get Gibbs oscillations that ring across the whole domain and the exponential convergence collapses to a feeble first order. Spectral methods are therefore the tool of choice for smooth problems (turbulence simulation of smooth flows, weather and climate models on the sphere, smooth wave propagation) and a poor fit for shocks unless specially filtered or combined with shock-capturing. They also tie the whole domain together (dense, globally-coupled systems and a need for simple geometry), trading the locality and geometric flexibility of FEM for unbeatable accuracy on smooth, simple-geometry problems.

Solve u_t = u_xx on a periodic interval spectrally: each Fourier mode c_k evolves by the simple ODE dc_k/dt = -k^2 c_k, so c_k(t) = c_k(0) e^(-k^2 t). The PDE has decoupled into independent, exactly-solvable modes — and for smooth initial data a dozen modes already match a finite-difference grid of hundreds of points.

Global smooth basis plus the FFT gives exponential accuracy for smooth solutions.

Spectral accuracy is a smoothness premium, not a guarantee: a single discontinuity destroys the exponential convergence and triggers domain-wide Gibbs oscillations. For shock problems, finite volume schemes usually beat spectral methods despite their lower formal order.

Also called
pseudo-spectral methodFourier collocation method偽譜方法傅立葉配置法