Spectral Methods
Spectral methods approximate a function by a global expansion in basis functions. In favorable smooth problems, the error can decrease much faster than any fixed-order finite-difference method as the number of modes increases.
The word “spectral” here means a numerical approximation by global modes, such as Fourier or Chebyshev modes. It is not the same topic as the Hilbert-space spectral theorem, although both use expansions in functions or vectors.
Why Quantum Mechanics Needs Them
Section titled “Why Quantum Mechanics Needs Them”Spectral methods are useful when wavefunctions and potentials are smooth enough that a global basis captures the solution efficiently. They appear in:
- Fourier-grid methods for periodic or large-box wave packets;
- pseudospectral differentiation in time-dependent Schrödinger equations;
- harmonic-oscillator basis truncations;
- Chebyshev approximations on finite intervals;
- smooth bound-state eigenvalue problems;
- split-operator and kinetic-energy calculations in momentum space;
- benchmark calculations where high accuracy is desired.
They are powerful, but not magic. A discontinuity, cusp, sharp boundary, or unresolved phase oscillation can destroy fast convergence.
Global Expansion
Section titled “Global Expansion”A spectral approximation writes
where the basis functions are chosen to match the domain and boundary behavior.
Common choices include:
- Fourier modes for periodic intervals;
- Chebyshev polynomials for finite nonperiodic intervals;
- Hermite functions for oscillator-like problems on the line;
- spherical harmonics for angular variables;
- problem-specific eigenfunctions when a solvable part of the Hamiltonian is known.
The approximation is global: changing one coefficient changes the function across the whole domain.
Fourier Spectral Differentiation
Section titled “Fourier Spectral Differentiation”On a periodic interval, expand
Differentiation becomes multiplication in Fourier space:
Thus the kinetic-energy operator for a free particle is especially simple in momentum representation:
This is the numerical version of the position-momentum duality explained in Fourier Transform and Position and Momentum Representations.
Pseudospectral Methods
Section titled “Pseudospectral Methods”In a pseudospectral method, one stores values on a grid but uses global basis information to compute derivatives. For a Fourier pseudospectral method, the transform is usually computed with a Fast Fourier Transform:
- Transform grid values to Fourier coefficients .
- Multiply by or to differentiate.
- Transform back to grid values.
Potential multiplication is usually done in position space:
Kinetic evolution is often easiest in Fourier space. This is why Fourier pseudospectral methods sit naturally behind FFT-based split-operator time evolution. For the full PDE workflow that combines spatial discretization, boundary conditions, time stepping, and convergence tests, see PDE Solvers.
Chebyshev Methods
Section titled “Chebyshev Methods”Fourier modes are natural for periodic functions. On a finite interval with nonperiodic boundary behavior, Chebyshev polynomials are often better.
After mapping the physical interval to , one expands in polynomials :
Chebyshev collocation commonly uses clustered points near the endpoints. This clustering helps resolve boundary layers and endpoint behavior better than an equally spaced polynomial grid.
Boundary conditions are imposed by modifying the coefficient equations, replacing boundary rows, or choosing basis functions that already satisfy the boundary condition.
Spectral Accuracy
Section titled “Spectral Accuracy”For analytic periodic functions, Fourier coefficients often decay exponentially:
Truncating after modes can then give extremely fast convergence. For functions with only finitely many derivatives, coefficients decay algebraically instead. For discontinuities, the Gibbs phenomenon appears and convergence is much slower near the jump.
This is the central diagnostic: spectral methods are excellent when the expansion coefficients decay rapidly. They are less attractive when coefficients decay slowly.
Basis Truncation as a Spectral Method
Section titled “Basis Truncation as a Spectral Method”Many quantum calculations use a finite basis rather than a coordinate grid:
When these matrix elements are not analytic, they must be assembled with a quadrature rule accurate enough for the chosen basis; Numerical Quadrature owns those integration-error checks.
The matrix diagonalization then produces approximate eigenstates inside the span of the first basis functions.
If the basis is orthonormal and the Hamiltonian is self-adjoint on the relevant domain, the finite matrix is Hermitian. For bound states in a variational basis, low-lying energies can often be monitored as increases. If the basis is not orthonormal, the overlap matrix must be included as in Discretization.
Smoothness and Boundary Matching
Section titled “Smoothness and Boundary Matching”Spectral methods care about global regularity. A function that is smooth in the interior but has a kink at the boundary is not spectrally smooth on the whole computational domain.
Examples:
- a periodic Fourier method expects periodic matching of values and derivatives at the endpoints;
- a square-well wavefunction with derivative jumps is not a good target for global smooth spectral convergence across the discontinuity;
- a cusp from a singular potential may require special coordinates or basis functions;
- a wavefunction with a rapidly oscillatory phase needs enough modes to resolve the local wavenumber.
Choose the basis to match the physics. A poor basis can make a smooth problem look hard.
Aliasing
Section titled “Aliasing”On a finite grid, products can create modes above the represented cutoff. For example, multiplying can mix Fourier modes of and . If the resulting high modes are not represented, they can fold back into lower modes. This is aliasing.
Aliasing is especially important for nonlinear equations, but it also matters in linear quantum problems when the potential is rough or under-resolved. Diagnostics include increasing the number of grid points, filtering high modes cautiously, or comparing with a different discretization.
Comparison with Finite Differences
Section titled “Comparison with Finite Differences”| Feature | Finite differences | Spectral methods |
|---|---|---|
| approximation | local stencils | global modes |
| matrices | often sparse | often dense unless using transforms |
| smooth periodic functions | algebraic convergence | often exponential convergence |
| discontinuities | local errors | Gibbs oscillations and slow convergence |
| boundary handling | direct but row-sensitive | basis- or collocation-sensitive |
Finite differences are robust and local. Spectral methods can be dramatically more accurate for smooth problems, but they demand more from smoothness, boundary matching, and global resolution.
Practical Checklist
Section titled “Practical Checklist”Before using a spectral method, ask:
- Is the target function smooth in the chosen coordinate and basis?
- Do the boundary conditions match the basis?
- Do expansion coefficients decay rapidly?
- Is the grid fine enough to avoid aliasing?
- Is the potential smooth enough in the same representation?
- Are low-energy and high-energy states converging differently?
- Does another discretization give the same physical result?
The safest spectral calculations report coefficient decay or refinement behavior, not only final eigenvalues.
For grid, basis, and observable-level refinement workflows, see Convergence Tests.
Common Mistakes
Section titled “Common Mistakes”- Confusing numerical spectral methods with the spectral theorem.
- Using Fourier modes on a nonperiodic function without handling endpoint mismatch.
- Expecting exponential convergence for discontinuous potentials or wavefunctions with cusps.
- Trusting high-frequency modes near the grid cutoff.
- Forgetting that multiplication in position space can generate unresolved Fourier modes.
- Comparing spectral and finite-difference results at different physical resolutions.
- Ignoring boundary conditions because the interior approximation looks accurate.
- Treating a basis truncation error as an eigensolver error.
Cross-Links
Section titled “Cross-Links”- Discretization
- Finite Difference Methods
- Numerical Quadrature
- Matrix Diagonalization
- Sparse Matrices
- Fast Fourier Transform
- PDE Solvers
- Convergence Tests
- Fourier Series
- Fourier Transform
- Plancherel and Parseval Theorems
- Position and Momentum Representations
- Complex Exponentials
- Orthonormal Bases
- Boundary Conditions
References
Section titled “References”- L. N. Trefethen, Spectral Methods in MATLAB, SIAM, 2000.
- J. P. Boyd, Chebyshev and Fourier Spectral Methods, 2nd ed., Dover, 2001.
- B. Fornberg, A Practical Guide to Pseudospectral Methods, Cambridge University Press, 1996.
- C. Canuto, M. Y. Hussaini, A. Quarteroni, and T. A. Zang, Spectral Methods: Fundamentals in Single Domains, Springer, 2006.
- J. M. Thijssen, Computational Physics, 2nd ed., Cambridge University Press, 2007.
Exercises
Section titled “Exercises”- Show that the Fourier mode is an eigenfunction of the second derivative and identify the eigenvalue.
Solution
Differentiate twice:
Thus is an eigenfunction of with eigenvalue .
- Why does a Fourier spectral method converge slowly for a function with a jump discontinuity?
Solution
A jump discontinuity makes the Fourier coefficients decay only algebraically rather than exponentially. Truncating the series then leaves visible oscillations near the jump, known as the Gibbs phenomenon. Adding more modes narrows the oscillatory region but does not give the rapid spectral convergence seen for analytic periodic functions.
- In a periodic Fourier method, why must endpoint values and derivatives match?
Solution
Fourier modes represent periodic functions. If the values or derivatives do not match at the endpoints of the computational interval, the periodic extension has a jump or kink. That destroys smooth coefficient decay and introduces spurious high-frequency content. The method then approximates the periodic extension, not the original nonperiodic function.
- A wavefunction has Fourier coefficients satisfying . Should one expect exponential spectral convergence?
Solution
No. Exponential convergence is associated with exponentially decaying coefficients, often for analytic functions. Algebraic coefficient decay such as indicates limited smoothness, so truncation error decreases algebraically with the number of modes.
- Why can multiplying by a rough potential cause aliasing in a Fourier pseudospectral calculation?
Solution
Multiplication in position space corresponds to convolution of Fourier coefficients. If the potential has high Fourier components, the product can contain modes above the numerical cutoff. A finite grid cannot represent those modes, so they can fold back into lower modes and contaminate the result. Increasing resolution or changing representation can test the effect.