Gibbs Phenomenon
The persistent ~9% overshoot that a truncated Fourier sum makes near a jump discontinuity — and that never goes away no matter how many terms you add.
Gibbs Phenomenon
Build a square wave from its Fourier Series and stop after finitely many Harmonics, and something stubborn happens at every sharp edge: the partial sum overshoots the true value, ringing above and below the jump before it settles. Adding more terms squeezes the ripples into a narrower and narrower band around the discontinuity — but it does not shrink the height of the overshoot. The peak holds fast at about 9% of the jump, forever. This is the Gibbs phenomenon.
It is a genuinely counterintuitive result. We expect "more terms = better approximation," and in most senses that is true: the energy of the error goes to zero. Yet right at the edge, the maximum error refuses to die.
Watch the overshoot refuse to die
Move your mouse left to right to set the number of harmonics in the partial sum of a square wave. The dashed line marks the true level; notice the little horn of overshoot that hugs the jump. As you add terms, the horn slides closer to the edge and gets thinner — but its height barely budges.
Why it happens
The partial sum is the true signal smeared by a fixed averaging window (the Dirichlet kernel). That window has wiggling side-lobes whose integrated area shrinks with more terms but whose peak relative size is a constant set by the integral \tfrac{2}{\pi}\int_0^{\pi}\tfrac{\sin u}{u}\,du \approx 1.0895 — hence the famous ~8.95% overshoot above the jump.