Chapter 3Fourier Series

Here's the claim that makes all of this useful: any repeating shape — even one with a sharp corner, like a square wave — can be built purely out of smooth sine waves. Watch it happen.

Target shape Fourier approximation

What's actually being summed right now:

The formulas

Each target shape has its own recipe of harmonics — a fundamental frequency $f$ plus a specific series of multiples of it, each with a prescribed amplitude:

Square wave (odd harmonics only)
$$ s(t) = \frac{4}{\pi}\sum_{k=1,3,5,\dots} \frac{1}{k}\sin(2\pi k f t) $$
Sawtooth wave (every harmonic)
$$ s(t) = \frac{2}{\pi}\sum_{k=1}^{\infty} \frac{(-1)^{k+1}}{k}\sin(2\pi k f t) $$
Triangle wave (odd harmonics, squared decay)
$$ s(t) = \frac{8}{\pi^2}\sum_{k=1,3,5,\dots} \frac{(-1)^{(k-1)/2}}{k^2}\sin(2\pi k f t) $$

What to notice

Every one of these harmonics, individually, is exactly the sine wave from Chapter 1 — just a different frequency, amplitude, and (via the sign) phase. A Fourier series is nothing more than Chapter 2's addition trick, done with a very specific guest list of waves.