Fourier series

Level AdvancedDifficulty ★★★★★Concept⌖ Open in the map

What is it?

Any reasonable periodic function is a sum of sines and cosines of multiples of a base frequency: f(t)=∑ncne2πint/Tf(t) = \sum_n c_n e^{2\pi i n t/T}. The coefficients cnc_n — the spectrum — say how much of each harmonic it contains.

Why does it exist?

Fourier (1807) needed to solve the heat equation: sines are the shapes that keep their form while decaying, so if any initial temperature can be written as a sum of sines, the problem splits into independent easy pieces. The claim that any function could be so written was shocking — and it changed analysis.

Intuition

Sines of different frequencies are orthogonal, like perpendicular axes. The coefficient cnc_n is the projection of ff onto the nn-th harmonic, 1T∫f(t)e−2πint/T dt\frac1T\int f(t)e^{-2\pi int/T}\,\dd t — a correlation that measures how much ff "resonates" at that frequency. A square wave is the sum of odd harmonics 4π(sin⁡t+13sin⁡3t+15sin⁡5t+…)\frac{4}{\pi}\big(\sin t + \frac13\sin 3t + \frac15\sin5t + \dots\big); its jump causes a 9% overshoot that never disappears (Gibbs phenomenon) — the ringing you see around edges in over-compressed JPEGs.

Formal definition

For ff with period TT and ∫0T∣f∣2<∞\int_0^T|f|^2 < \infty,

f(t)=∑n=−∞∞cn e2πint/T,cn=1T∫0Tf(t) e−2πint/T dt,f(t) = \sum_{n=-\infty}^{\infty} c_n\,e^{2\pi i n t/T}, \qquad c_n = \frac1T\int_0^T f(t)\,e^{-2\pi i n t/T}\,\dd t,

with convergence in mean square, and pointwise wherever ff is smooth. Parseval: 1T∫0T∣f∣2=∑∣cn∣2\frac1T\int_0^T|f|^2 = \sum|c_n|^2 (energy is the same in time and frequency).

Formulas

f(t)=a02+∑n=1∞(ancos⁡nωt+bnsin⁡nωt),ω=2πTf(t) = \frac{a_0}{2} + \sum_{n=1}^{\infty}\big(a_n\cos n\omega t + b_n\sin n\omega t\big), \quad \omega = \frac{2\pi}{T}
sq⁡(t)=4π∑k=0∞sin⁡((2k+1)t)2k+1\operatorname{sq}(t) = \frac4\pi\sum_{k=0}^{\infty}\frac{\sin\big((2k+1)t\big)}{2k+1}
square wave

Why does it matter?

Musical timbre is the pattern of harmonic amplitudes; audio equalizers boost or cut frequency bands; the heat and wave equations are solved term by term; and the discrete version (DFT/FFT) is the workhorse of digital signal processing.

Where it shows up in computing

  • Signal processing★★★★★fundamentalSignals, media and vision

    Periodic signals are described and filtered through their harmonic content.

  • Heat equation and diffusion★★★★★historicalPhysics and simulation

    Fourier invented his series to solve the heat equation; spectral methods still do.

  • Media compression (JPEG, MP3, video)★★★★★frequentSignals, media and vision

    JPEG and MP3 use cosine transforms (DCT/MDCT), close relatives of Fourier series, then drop small coefficients.

Where is it used?

Computing topics reachable from here, through the chain of ideas that leads to them:

What depends on it

Exercises

1Computation

Compute the Fourier coefficients bnb_n of the odd square wave f=1f = 1 on (0,π)(0, \pi), −1-1 on (−π,0)(-\pi, 0).

Solution

bn=2π∫0πsin⁡nt dt=2nπ(1−(−1)n)b_n = \frac2\pi\int_0^\pi\sin nt\,\dd t = \frac{2}{n\pi}(1 - (-1)^n): 4nπ\frac{4}{n\pi} for odd nn, 0 for even nn.

↑ ↓ to navigate · ↵ · Esc