Spectral differentiation approximates a derivative by differentiating a global expansion fitted to samples of a function (Trefethen 2000, Komarov et al. 2026).
For a smooth -periodic
function sampled at
for
,
...,
, the discrete
Fourier transform gives coefficients
of a trigonometric interpolant. The differentiated interpolant
is
where . Thus the derivative
at the nodes can be obtained by multiplying each coefficient by
and applying the inverse discrete
Fourier transform.
On a bounded interval, a common alternative is to map the interval to and interpolate at
for
,
...,
, with
.
The interpolating polynomial can be expanded in Chebyshev polynomials of the first
kind
and differentiated using the derivative of each basis
polynomial. The resulting derivative
must be scaled by the chain rule when mapping back
to the original interval.