A spectral method approximates a differential equation in a global basis and enforces the equation after projection or collocation. Smooth and analytic solutions often give rapidly convergent coefficients.
A spectral method has spectral accuracy for a class of smooth data when its error decreases faster than any fixed inverse power of the truncation size. For periodic Fourier series, this follows from arbitrarily many integrations by parts when every derivative matches across the periodic boundary. An analytic periodic extension to a complex strip gives exponential coefficient decay. Analyticity inside one period and matching only endpoint values do not suffice: a jump in a derivative of the periodic extension yields algebraic decay instead.
A Fourier spectral method represents a periodic unknown by finitely many Fourier modes and converts differentiation into multiplication by wavenumber.
Use equally spaced samples on a period of length , excluding the repeated endpoint. Their spacing is , and the discrete Fourier transform angular wavenumbers are . Including both endpoints in an -point array gives spacing and is inconsistent with that wavenumber assignment. It does not supply an extra independent periodic sample.
A spectral truncation retains a finite set of basis modes and sets all omitted coefficients to zero.
For the two-periodic problem
the Fourier coefficients satisfy the tridiagonal system
The Fourier–Galerkin method seeks a finite Fourier series whose residual is orthogonal to every retained Fourier mode.

Articles by others on the same topic (1)

Spectral methods are a class of numerical techniques used to solve differential equations by expanding the solution in terms of a set of basis functions. These methods are particularly powerful for solving problems in fluid dynamics, wave propagation, and other areas of physics and engineering. Spectral methods leverage the properties of Fourier series or orthogonal polynomials to achieve high accuracy with relatively few degrees of freedom.