If a function is periodic f(t+T) = f(t) and differentiable on an interval
[a,b], a theorem of Fourier says that we
can approximate f by a sum of sine and cosine functions. Assume for the moment that
the period is
. Then
To fit data, one truncates this series at finite n. The Fourier coefficients are then given by
For practical applications, one uses the Fast Fourier Transform to compute coefficients.