7.1 Fourier series

The single mathematical idea most used across the bookshelf: a periodic function can be expressed as a sum of harmonic sinusoids. The coefficients of that decomposition are the frequency-domain representation of the function. The decomposition is invertible — knowing the coefficients lets you reconstruct the original function exactly (for well-behaved cases) or in the mean-square sense (more generally).

This first lesson develops the periodic version: Fourier series. The next lesson takes the limit as the period grows to infinity and arrives at the Fourier transform, which handles non-periodic signals.

Why sinusoids?

Because they are eigenfunctions (refresher →) of linear time-invariant operators. Differentiate sin(ωt)\sin(\omega t) and you get ωcos(ωt)\omega \cos(\omega t) — same frequency, shifted in phase. Apply any linear filter to a sinusoid and you get a sinusoid of the same frequency, possibly with different amplitude and phase. No new frequencies are generated.

This is the defining property: under any linear time-invariant operation, each frequency is independent of every other. Two signals at different frequencies can be processed in parallel; they don’t interact. This is why the frequency-domain picture is so powerful for linear systems — and why it breaks for nonlinear ones (see Sound 10 — Attenuation and the nonlinear edge).

There is a deeper reason hiding underneath: sinusoids are the eigenfunctions of the differentiation operator d/dtd/dt. Any linear differential operator with constant coefficients (the wave equation, the heat equation, every linear ODE) acts on a sinusoid by multiplying it by a complex number. This is exactly the diagonalisation move from Linear Algebra 4.4: in the right basis, the operator becomes diagonal, and the right basis for translation-invariant systems is the sinusoidal basis.

The series

For a function f(t)f(t) with period TT, the Fourier series in complex form is

  f(t)  =  n=cnei2πnt/T,cn  =  1T0Tf(t)ei2πnt/Tdt.  \boxed{\;f(t) \;=\; \sum_{n=-\infty}^{\infty} c_n\, e^{i\, 2\pi n t / T}, \qquad c_n \;=\; \frac{1}{T} \int_0^T f(t)\, e^{-i\, 2\pi n t / T}\, dt.\;}

The coefficients cnc_n are complex numbers carrying both the amplitude and phase of the nn-th harmonic. For a real-valued ff, the coefficients satisfy cn=cnc_{-n} = c_n^* (complex conjugate), and the series can be rewritten in the equivalent sine-cosine form:

f(t)  =  a02  +  n=1[ancos(2πnt/T)+bnsin(2πnt/T)],f(t) \;=\; \frac{a_0}{2} \;+\; \sum_{n=1}^{\infty} \bigl[\, a_n \cos(2\pi n t / T) + b_n \sin(2\pi n t / T) \,\bigr],

with an=cn+cn=2Recna_n = c_n + c_{-n} = 2\,\text{Re}\,c_n and bn=i(cncn)=2Imcnb_n = i(c_n - c_{-n}) = -2\,\text{Im}\,c_n. The two forms carry identical information. Choose whichever is more convenient — the complex form is usually easier algebraically, the real form easier to plot.

The series, made visible

01−1partial sum (N = 5) and target (dashed)
target:
amplitude |bₙ|123456789101112harmonic number n

Build up the Fourier series of three canonical waveforms one harmonic at a time. Watch the partial sum converge to the dashed target. Three things to absorb:

Why this works: orthogonality

The justification — and the reason any choice of cnc_n that matches ff in the series sense is uniquely determined — is that the basis functions {ei2πnt/T}nZ\{e^{i\, 2\pi n t / T}\}_{n \in \mathbb{Z}} are an orthonormal basis for square-integrable periodic functions, with inner product (refresher →)

g,h    1T0Tg(t)h(t)dt.\langle g, h \rangle \;\equiv\; \frac{1}{T} \int_0^T g^*(t)\, h(t)\, dt.

The coefficient cnc_n is just the projection of ff onto the nn-th basis element: cn=en,fc_n = \langle e_n, f \rangle where en(t)=ei2πnt/Te_n(t) = e^{i\, 2\pi n t / T}.

Orthonormality of the complex exponentials

For integer m,nm, n:

1T0Tei2πmt/Tei2πnt/Tdt  =  1T0Tei2π(nm)t/Tdt.\frac{1}{T} \int_0^T e^{-i\, 2\pi m t / T}\, e^{i\, 2\pi n t / T}\, dt \;=\; \frac{1}{T} \int_0^T e^{i\, 2\pi (n - m) t / T}\, dt.

If m=nm = n, the integrand is 11, so the integral is TT, and the normalisation factor of 1/T1/T gives em,em=1\langle e_m, e_m \rangle = 1.

If mnm \neq n, the integrand is a complex exponential at non-zero frequency 2π(nm)/T2\pi(n - m)/T. Antidifferentiate:

0Tei2π(nm)t/Tdt  =  Ti2π(nm)[ei2π(nm)t/T]0T  =  Ti2π(nm)(11)  =  0.\int_0^T e^{i\, 2\pi (n - m) t / T}\, dt \;=\; \frac{T}{i\, 2\pi (n - m)}\, \bigl[\, e^{i\, 2\pi (n - m) t / T} \,\bigr]_0^T \;=\; \frac{T}{i\, 2\pi (n - m)}\, (1 - 1) \;=\; 0.

So em,en=δm,n\langle e_m, e_n \rangle = \delta_{m, n} — orthonormality. The coefficient extraction formula cn=en,fc_n = \langle e_n, f \rangle then follows by taking the inner product of ff with each basis element and using orthogonality to isolate one term.

This is exactly the same calculation as the Fourier-projection step from separation of variables in Foundations 6.5 — Modes and mode sums, with the same orthonormality argument and the same projection formula. Fourier series is a generalised mode expansion, with the modes being sinusoids on a periodic domain.

Convergence and Gibbs phenomenon

A Fourier series converges to ff in the L² (mean-square) sense for any square-integrable ff. Pointwise convergence is more delicate. At points where ff is continuous, the series converges to f(t)f(t). At a jump discontinuity, the series converges to the average of the left and right limits.

But near a jump, something subtle and visually striking happens.

target (dashed) and partial sum at N = 15 harmonicsGibbs limit ≈ 1.179zoom on the overshoot near x = 0−π0πpeak overshoot at N = 15: 1.1803
target:

A Fourier series approximation of a function with a jump discontinuity overshoots the jump by about 9% on each side, and the overshoot does not go away as N grows — only its width shrinks. The maximum value of the partial sum approaches a fixed limit (≈ 1.17898 for unit-step jump), not the target value. This is the Gibbs phenomenon. It's not numerical error and it's not a flaw in the series; it's a real feature of pointwise convergence at jumps. The series does converge to the function in the L² (mean-square) sense, but not uniformly near the discontinuities.

A finite partial sum of a Fourier series approximating a function with a jump overshoots the jump by about 9% on each side. As you increase the number of harmonics NN, the overshoot does not vanish — only its width shrinks. The peak height of the partial sum approaches a fixed limit (1.17898\approx 1.17898 for a unit jump from 1-1 to +1+1), not the target value.

This is the Gibbs phenomenon, identified by Henry Wilbraham in 1848 and rediscovered (and quantified) by J. Willard Gibbs in 1899. It is not numerical error and not a flaw in the series — it is an exact statement about pointwise convergence at discontinuities. The series converges to ff in the mean-square sense (the integral of the squared error goes to zero), but the pointwise convergence is non-uniform near the jump.

The Gibbs phenomenon is the reason audio reconstructed from a band-limited signal with a sharp cutoff has audible “ringing” near transients. Window functions (7.4) smooth the cutoff to suppress the ringing at the cost of slightly blurring the spectrum.

History

The history — Fourier, Bernoulli, and the function controversy

Joseph Fourier introduced the trigonometric-series decomposition in his 1822 Théorie analytique de la chaleur (Fourier 1822), motivated by the heat equation. His claim — that any function on a bounded interval could be expanded as such a series — was sharply contested by Lagrange and others, because it required admitting functions with corners, jumps, and other “pathological” features that the 18th-century theory of analysis could not handle.

The same dispute, in different form, had played out 75 years earlier between d’Alembert, Euler, and Daniel Bernoulli over the vibrating-string solution (see Sound 3.3). Fourier’s work forced the resolution: a “function” is anything that takes input to output, not just an analytic formula. Modern analysis — Cauchy’s theory of convergence, Riemann’s theory of integration, Cantor’s set theory, Lebesgue’s measure theory — was built to make Fourier’s claim rigorous. Acoustics ended up getting its frequency-domain methods as a byproduct.

The Gibbs phenomenon is a footnote in the same story. Wilbraham noticed the overshoot in 1848, but his paper was forgotten. In 1898 the physicist Albert Michelson — of Michelson-Morley fame — built a mechanical harmonic analyser and observed the overshoot. When he wrote a letter to Nature asking whether this was an artefact of his apparatus, Gibbs replied in 1899 with the mathematical explanation. The phenomenon was named for Gibbs even though Wilbraham had it first.

What’s next

The next lesson, 7.2 — The Fourier transform, takes the series and lets the period TT go to infinity. The discrete sum over harmonics becomes a continuous integral over frequency; the periodic version of Fourier analysis becomes the non-periodic one.