- Introduced by
- Steven Orszag
- Year
- 1969
- Type
- Global polynomial approximation
- Family
- High-Order Projection
What does it do?
Spectral methods solve differential equations by approximating the solution with global expansions in orthogonal functions, such as Fourier series or Legendre and Chebyshev polynomials, rather than with piecewise polynomials on small elements.
Steven Orszag's 1969 paper on turbulence simulation described FFT-based schemes for the Navier–Stokes equations, and Gottlieb and Orszag (1977) later gave a mathematical analysis of spectral methods. For smooth solutions the error can decay exponentially as the number of modes N grows, which is why the approach is preferred when the solution is regular. This page covers spectral discretization of differential equations; it does not cover spectral clustering or the eigendecomposition-based spectral methods of machine learning.
The intuition behind the method
A finite element method approximates the solution with low-degree polynomials on many small elements, so accuracy is usually improved by refining the mesh. A spectral method instead uses one expansion across the whole domain and raises the degree to improve accuracy. If the solution is smooth, the expansion coefficients decay rapidly, so a relatively small number of basis functions captures most of the solution. Orthogonal families such as Fourier, Legendre and Chebyshev polynomials help control ill-conditioning, although high-degree matrices still need care. The cost of the global basis is poor adaptation to features that are localized in space.
History
Steven Orszag's 1969 paper on simulating turbulent flow described two schemes for the Navier–Stokes equations built on the fast Fourier transform. One used discrete Fourier transforms to evaluate the convolution sums without aliasing; the other used the fast Fourier transform to solve for pressure. Gottlieb and Orszag (1977) gave a mathematical analysis of why spectral methods work for mixed initial-boundary value problems. The book by Canuto, Hussaini, Quarteroni and Zang (2006) covers the fundamentals of spectral methods in single domains and is cited here as general background.
When to use it
Choose a spectral method when the solution is smooth, free of shocks and sharp internal layers, and the domain has a simple shape. Fourier bases suit periodic problems, while Legendre or Chebyshev bases suit bounded intervals and domains with smooth data. The approach is well suited to initial value problems and eigenvalue computations on such domains. Avoid it when the solution has discontinuities or steep localized gradients, or when the geometry is irregular and cannot be mapped smoothly, because local methods such as finite elements usually adapt better in those cases.
Limitations and considerations
- Near discontinuities the truncated expansion produces Gibbs oscillations, and accuracy degrades substantially in the affected region.
- The global basis is tied to the domain shape; curved or irregular boundaries usually require coordinate mappings, and the basis must be rebuilt when the domain changes.
- Spectral matrices are dense, so direct solvers cost on the order of N³ operations and storage grows with N²; this limits scalability compared with sparse finite element systems.
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- For smooth solutions the error can decay exponentially with the number of modes N, so high accuracy can be reached with comparatively few unknowns.
- For smooth solutions on simple geometries, and when high accuracy is required, a spectral discretization generally needs fewer unknowns than a low-order finite element discretization. This advantage does not hold for non-smooth solutions or irregular domains, where finite elements are usually preferable.
- On structured domains with suitable bases, fast transforms (FFT) make the switch between physical and spectral space efficient.
- The expansion represents derivatives accurately, which is useful when higher-order derivatives appear in the governing equations.
Applications
- Direct numerical simulation (DNS) of turbulent flow, the setting for which Orszag's FFT-based schemes were developed
- Numerical weather prediction, where spectral methods have been applied (Gottlieb and Orszag, 1977)
- Seismic wave propagation: spectral element methods on unstructured hexahedral meshes
- Quantum mechanics: solving the Schrödinger equation with Fourier or Hermite bases for atomic and molecular systems
- Plasma physics: spectral discretizations in gyrokinetic simulations of plasma turbulence
How it works
How it works
Choose a spectral basis (Fourier, Legendre, Chebyshev, Hermite) appropriate to domain geometry and boundary conditions; discretize spatial domain at collocation points or quadrature nodes.
Expand approximate solution as u(x) = Σ c_k φ_k(x); form stiffness and mass matrices by evaluating basis functions and derivatives at nodes; assemble linear or nonlinear system.
Solve for expansion coefficients c_k via direct factorization or iterative methods; reconstruct solution u(x) at any point from the spectral expansion. For initial value problems, advance the coefficients in time with a standard ODE integrator. Explicit time stepping is subject to a stability limit on the time step that becomes more restrictive as N increases, so stiff linear terms are often treated implicitly. Products of expansions in nonlinear terms generate modes beyond the resolved range, and this aliasing must be controlled, for example by evaluating the products on a finer grid or by filtering; otherwise the results are unreliable.
Estimate error from the decay of the expansion coefficients: plot |c_k| against k on a logarithmic scale. Rapid, roughly exponential decay indicates that the truncated expansion captures the solution. Recompute the solution with N and 2N modes, and stop increasing N once the difference between the two is within the accuracy required. If the coefficients decay only algebraically, the solution is probably not smooth enough for the spectral approach; in that case refine the mesh locally (h-refinement), use a spectral element method, or choose a different method.
Common pitfalls
- Using a Fourier basis for a non-periodic problem: the mismatch at the boundaries produces spurious oscillations. Use Legendre or Chebyshev bases on bounded intervals.
- Applying a smooth-solution spectral method to shocks or kinks, where the convergence advantage is lost. Shock-capturing techniques such as WENO or artificial viscosity are normally needed.
- Expecting the Gibbs overshoot to vanish as N grows: near a discontinuity the overshoot stays at about 9% even as N increases. Filtering reduces the oscillations at the cost of resolution.
- Ignoring conditioning: high-degree polynomial matrices are ill-conditioned, so the choice of solver and preconditioner matters. Spectral element methods, which use several lower-degree spectral patches, are an alternative when conditioning or geometry becomes a problem.
Frequently asked questions
Why is Fourier best for periodic problems but Chebyshev/Legendre for bounded domains?
Fourier basis assumes 2π periodicity; non-periodic data causes Gibbs oscillations. Chebyshev/Legendre polynomials are orthogonal on [-1,1] with natural boundary behavior; no periodicity required. Domain transformation maps any interval [a,b] to [-1,1].
What is the Gibbs phenomenon and can I eliminate it?
At discontinuities, spectral series overshoot by ~9%, even as degree N→∞. Exact elimination is impossible, but high-order filtering (Fourier or modal) reduces oscillations. Alternatively, use hybrid FEM-spectral or shock-capturing methods.
How many degrees of freedom do I need?
There is no universal number; it depends on how smooth the solution is and how many oscillations it contains. Start with a modest N, increase it, and check that the result stops changing. For smooth solutions the error should fall roughly exponentially when plotted on a logarithmic scale against N; if it falls only algebraically, the solution is probably not smooth enough for the spectral approach.
Are spectral methods faster than FEM?
For smooth solutions on regular domains, a spectral method can reach a given accuracy with far fewer unknowns than a low-order finite element method. However, spectral matrices are dense (storage grows with N², direct solves cost about N³), whereas finite element matrices are sparse. Finite elements are usually preferable for irregular geometry or non-smooth solutions. Spectral element methods combine spectral accuracy within each element with sparse coupling between elements.
Related methods
Sources
Orszag, S. A. (1969). Numerical methods for the simulation of turbulence. Physics of Fluids Supplements, 12(12), 250–257.
Open DOI referenceGottlieb, D., & Orzag, S. A. (1977). Numerical Analysis of Spectral Methods: Theory and Applications. SIAM.
Open DOI referenceCanuto, C., Hussaini, M. Y., Quarteroni, A., & Zang, T. A. (2006). Spectral Methods: Fundamentals in Single Domains. Springer.
Open DOI reference