the Chebyshev spectral method
/ CHEB-ih-shev /
Fourier spectral methods are wonderfully accurate but have one stubborn requirement: the problem must be periodic, so the solution wraps around seamlessly. Most real problems live on an ordinary interval with boundaries — a heated rod with fixed-temperature ends, flow in a channel — and are not periodic at all. The Chebyshev spectral method is the non-periodic counterpart: it delivers the same spectral (exponential) accuracy on a finite interval, using Chebyshev polynomials instead of sines and cosines.
The method represents the solution as a sum of Chebyshev polynomials T_0, T_1, T_2, ... — polynomials that, on the interval [-1, 1], behave like cosines in disguise (in fact T_n(cos theta) = cos(n*theta)). The crucial design choice is WHERE to sample: not at equally spaced points, which would trigger Runge's phenomenon and ruin everything, but at the Chebyshev points x_j = cos(pi*j/N), which cluster densely near the two endpoints and thin out in the middle. This clustering is exactly what tames the wild edge oscillations of high-degree interpolation. Because of the cosine connection, the transform between sample values and Chebyshev coefficients is itself a discrete cosine transform, so it can be computed with the FFT in O(N log N). Differentiation is done either through that transform or with a dense Chebyshev differentiation matrix that maps grid values to derivative values.
The Chebyshev spectral method is the standard tool for smooth non-periodic problems on simple intervals: boundary-value problems, channel-flow stability, and many engineering PDEs. It inherits the same honest caveats as all spectral methods — it needs a smooth solution to achieve exponential accuracy, and it suits simple geometry. It carries two extra wrinkles: the differentiation matrices become increasingly ill-conditioned as N grows (the condition number rises like N^2 for first derivatives, N^4 for second), so very high resolutions need care; and the points crowd near the boundaries, which for time-dependent problems forces an uncomfortably small stable time step unless you use implicit schemes.
Solve the boundary-value problem u'' = f(x) on [-1, 1] with u(-1) = u(1) = 0. Sample at the Chebyshev points, build the Chebyshev second-derivative matrix, impose the boundary values, and solve the resulting linear system. For a smooth f, just 20 or 30 points reach near-machine-precision accuracy — a finite-difference scheme would need thousands.
Chebyshev points cluster at the edges, giving spectral accuracy without periodicity.
Equally spaced points would invite Runge's phenomenon and fail; the edge-clustered Chebyshev points are essential. Note also that Chebyshev differentiation matrices grow ill-conditioned (like N^2, N^4) and the clustered points force tiny explicit time steps.