Definition
NOTE
For , its Fourier coefficients are
Its Fourier series represents in the sense:
Here consists of functions with , identified when they agree almost everywhere. We regard as periodically extended with period .
For the symmetric partial sums
we have . This is convergence in mean square; it does not by itself imply convergence at every point or uniform convergence.
Orthogonality and projection
With , the functions form a complete orthonormal system:
Thus , and is the best approximation in .
Parseval’s identity and the truncation error are
Convergence and smoothness
If the periodic extension is piecewise with finitely many pieces, then
At a continuity point this equals . At the endpoints, use the one-sided limits of the periodic extension. Near a jump, the Gibbs phenomenon occurs: the overshoot persists in height while the affected region becomes narrower.
If and for , integration by parts gives, for ,
Greater periodic smoothness gives faster coefficient decay.
Real form and other periods
For real-valued , , so
where , and , with the same convergence qualifications as above.
For period , use
in the sense on one period.
Discrete Form
Let and define the primitive -th root of unity . For every integer , the geometric-series identity gives
The value is for any multiple of , not just for .
Sampling and discrete coefficients
Assume now that has well-defined point values, for example that it is continuous. Sample one period at
An arbitrary equivalence class does not have well-defined point samples, so sampling requires an additional assumption.
The periodic trapezoidal rule approximates the coefficient integral by
The endpoint repeats and is not sampled separately. For fixed and continuous periodic , this quadrature converges as .
Since , only discrete coefficients are independent.
Matrix construction and the DFT
Use positive exponents for the synthesis basis:
All indices run from to . Discrete orthogonality gives
Here denotes the Hermitian conjugate.
Define , so . Throughout this note, we use the normalized discrete Fourier transform (DFT): it converts the sample values into the Fourier coefficients .
The inverse DFT (IDFT) reconstructs the sample values from those coefficients:
Here labels a sample point, and labels a frequency. Each specifies the amplitude and phase of one complex exponential in the reconstruction.
Sign and normalization
Our forward transform uses a negative exponent and includes ; reconstruction uses a positive exponent and no additional factor. Some libraries place in the inverse transform instead, so their default forward output must be divided by to obtain .
Constant samples
If and , then . Only the constant mode is present, and the inverse transform gives at every node.
Since is unitary, discrete Parseval reads
Trigonometric interpolation
The trigonometric polynomial
interpolates the samples exactly:
This is analogous to Polynomial Interpolation, using complex exponentials as the basis. The interpolant is unique in the chosen -dimensional space. Different frequency representatives modulo agree at the nodes but can differ between them.
Centered frequencies and the Nyquist mode
For odd , a natural choice for approximation between nodes is
Here . The upper DFT indices represent negative frequencies. This interpolant is real-valued for real data by conjugate symmetry.
For even , the frequencies and have identical samples: . This is the Nyquist frequency. A real-valued interpolant for real data is
The Nyquist sine term vanishes at every node, so its coefficient cannot be determined from the samples.