The explanation
Any periodic motion splits into circles turning at steady speeds. More circles get closer, but the ≈ 9% spike at a jump never goes away.
01One circle, one sine wave
A point moves round a circle of radius at a steady rate, so its angle grows evenly with time. Its height is . Record that height over time and you get a sine wave.
A faster circle makes a denser wave, a bigger one a taller wave. Speed and radius are all there is to know about the circle.
02Stacking circles: the Fourier series
Pin the centre of a second circle to the rim of the first, and the height of the end point is the sum of two sine waves. A square wave needs circles turning 1, 3, 5, 7… times as fast, with radii shrinking as :
Fourier, working on how heat spreads, claimed that any periodic function can be written as a sum like this of sines and cosines. The size of each circle is the coefficient of its term.
- A triangle wave's radii shrink as , so five circles are already within about 1%.
- A square wave's shrink as , which is much slower: five circles are still about 20% off, and sixty about 6%.
The sharper the curve, the more circles it takes.
03The 9% at the corner: the Gibbs phenomenon
At a jump, the partial sums of a square wave always overshoot. More circles make the spike narrower and push it towards the jump, but its height settles at about 8.95% of the jump. For a square wave of the peak is about .
The total error does keep shrinking, because the spike keeps getting thinner, but the largest error never goes away. In the language of analysis, the series does not converge uniformly near the jump. Wilbraham noticed it first, in 1848; Gibbs pointed it out again in 1899 and the name stuck.
Engineers often tame the spike with weighted averages such as Fejér summation, at the cost of rounding off the corner.
04From waves to shapes: circles in the plane
Treat a point in the plane as a complex number . A spinning circle is then : is the radius, the angle of is where it starts, and is the speed (negative means clockwise). A closed curve can be written as
Here the curve is first sampled at points evenly spaced along its length, and a discrete Fourier transform gives every circle. They are drawn largest first: the big circles set the outline, the small ones add detail.
For the π on the stage, three circles leave about 40% error, thirty about 2%, and a hundred only about 0.3%.
05Why it matters
Splitting a signal into frequencies is close to the starting point of modern signal processing:
- Compression: JPEG splits each image block into cosine components (a close relative of Fourier's) and MP3 does the same for sound; both then drop the small components we barely notice.
- Spectra: tuners, equalisers and speech recognition all start by asking which frequencies a sound contains.
- Solving equations: Fourier built the method to solve the heat equation; each frequency fades on its own, and the pieces are added back together.
Questions
Why circles?
A circle turning at a steady speed is the simplest periodic motion, and its shadow in any direction is a sine wave. Sine waves of different frequencies do not interfere with each other (they are orthogonal), so each circle's size can be worked out on its own, and adding or removing one leaves the others unchanged.
How many circles are enough?
It depends on how sharp the curve is. Smooth curves have coefficients that shrink fast, so a few circles look right. Curves with corners or jumps shrink slowly, need many circles, and always keep the Gibbs spike at a jump.
Can the Gibbs spike be removed?
Not by adding circles. Weighting the terms (Fejér summation, sigma factors) flattens it, at the cost of a blunter corner.
What if my drawing is not closed?
A Fourier series assumes the curve repeats, so it joins the end straight back to the start. That join acts like a jump, and you will see ripples there: the Gibbs phenomenon in the plane.
The syllabus side
Related curves
Sources: Fourier series — Wikipedia · Gibbs phenomenon — Wikipedia