Fourier Series: Every Wave is a Sum of Pure Tones
Any repeating signal — even a jagged square wave — is a stack of smooth sines and cosines, and integration tells you exactly how much of each to use.
A different set of building blocks
Taylor series approximate near one point using powers of x. But a repeating signal — a musical note, an AC voltage, the shape of a plucked string — is not about one point; it is about a whole period. For that, the natural building blocks are the functions that already repeat: sines and cosines.
Joseph Fourier’s startling claim was that every reasonable periodic function, no matter how jagged, is a sum of these smooth waves at frequencies 1, 2, 3, … times the fundamental — its harmonics.
Orthogonality: the secret that makes it work
How do you find one coefficient without solving for all of them at once? The trick is that these waves are orthogonal: over a full period, the integral of the product of two different harmonics is zero, while the integral of a harmonic times itself is not. Multiplying f by cos(nx) and integrating therefore cancels every term except the one you want — like a filter tuned to a single frequency.
Symmetry cuts the work in half
Symmetry immediately kills half the coefficients. If f is odd (f(−x) = −f(x)), every cosine coefficient an vanishes and only sines survive. If f is even (f(−x) = f(x)), the sines vanish and only cosines survive. A square wave, drawn as an odd function, is therefore built from sines alone — and, as it turns out, only the odd-numbered harmonics.
- Take the aₙ formula with n = 0: \( a_0=\dfrac{1}{\pi}\int_{-\pi}^{\pi} f(x)\cos(0)\,dx=\dfrac{1}{\pi}\int_{-\pi}^{\pi} f(x)\,dx \), since cos 0 = 1.
- The series uses the term \( a_0/2=\dfrac{1}{2\pi}\int_{-\pi}^{\pi} f(x)\,dx \).
- That is exactly the integral of f divided by the length of the interval, 2π.
- f is already a single harmonic, so orthogonality gives zero for every coefficient except the cos(2x) one.
- Matching \( a_2\cos(2x)=5\cos(2x) \) forces \( a_2=5 \); every other aₙ and every bₙ is 0.
- There is no constant offset, so a₀ = 0.
Check your understanding
- A Fourier series writes a periodic function as a₀/2 plus a sum of cosine and sine harmonics.
- Orthogonality of the harmonics lets each coefficient be recovered by a single integral against that harmonic.
- Odd functions need only sines; even functions need only cosines — symmetry halves the work.
- The square wave uses only odd harmonics with amplitudes ∝ 1/n; a₀/2 is always the mean value.
- Near a jump the partial sums overshoot by ~9% (the Gibbs phenomenon), a ripple that narrows but never vanishes.