Gibbs phenomenon
Build a square wave out of sines and cosines, and something stubborn happens near the jumps. However many terms you add — ten, a hundred, ten thousand — the approximation overshoots the corner by roughly nine percent of the jump height, then rings. Fewer terms widen the wobble; more terms squeeze it toward the jump, but the overshoot itself never disappears.
This is the Gibbs phenomenon, and it is not a numerical bug. It is what a Fourier series must do when asked to represent a discontinuity: sines are smooth everywhere, and a finite sum of smooth waves simply cannot corner like a step. Near the jump, the series is fighting a shape it can only approximate, and the fight shows.
The practical lessons are sharp. Filter a signal with hard cutoffs and ringing lingers near the edges — the click in the audio, the ghost stripe beside a hard transition in an image. Windowing and gentler filters trade that overshoot for a little smearing. And whenever a plot ripples suspiciously against a discontinuity, suspect the mathematics of smooth parts insisting on a corner, not your code.
The interactive figure below lets you add harmonics term by term and watch the overshoot press against the jump without ever stepping aside.
Sources
- Textbook: Stein & Shakarchi, Fourier Analysis: An Introduction (2003)
- Course: Stanford EE261 The Fourier Transform and its Applications(Osgood 讲义)
- Reference: Gibbs phenomenon
Terms
Fourier series ↔ Fourier-Reihe;overshoot ↔ Überschwingen;jump discontinuity ↔ Sprungstelle;partial sum ↔ Partialsumme