Fourier Series & Orthogonal Expansions

Gibbs phenomenon

/ GIBZ /

Plot the partial sum of a square wave's Fourier series with a lot of terms and you will see something stubborn: right next to each jump the curve overshoots, poking up past the true top and dipping below the true bottom, with little ripples trailing off. Add more terms and the ripples crowd closer to the jump and get narrower — but the height of that first overshoot refuses to shrink. This persistent overshoot beside a discontinuity is the Gibbs phenomenon, the most famous 'feature, not a bug' in Fourier analysis.

Here is the honest mechanism. As you take more terms N, the partial sum does converge to f at every fixed point away from the jump, and even converges to the midpoint at the jump itself. But the overshoot does not live at a fixed point — it sits at a location that slides toward the jump as N grows, always staying in the narrow zone where convergence is not uniform. In the limit the overshoot's peak approaches a definite height: about 9% of the size of the jump (more exactly, the total swoop overshoots by a factor tied to the integral of (sin t)/t, the sine integral, evaluated at pi). So no matter how many harmonics you sum, the maximum of the partial sum overshoots the jump by that same fixed percentage; it merely happens in an ever-thinner sliver.

This is why it never goes away by adding terms, and why it matters in practice. Truncating any sharp-edged signal — an image with hard borders, an audio click, a step input — produces this 'ringing' near the edges, visible as halos in JPEG-style compression and overshoot in filter outputs. It is not numerical error; it is the unavoidable price of approximating a discontinuity with smooth waves. The standard cure is not more terms but gentler summation — multiplying the coefficients by a tapering window (Fejer/Cesaro averaging, Lanczos sigma factors), which trades a little sharpness for the removal of the overshoot.

For the square wave of height 2 (from -1 to +1), the partial sums overshoot to about 1.179 instead of 1, an excess of roughly 0.09 times the jump of 2 — and that 0.179 above the true value of 1 stays essentially fixed whether you sum 10, 100, or a million terms.

The overshoot's percentage is a universal constant of any jump; only the width of the ringing shrinks with more terms.

Gibbs overshoot does not contradict convergence: the series still converges at every point, but not uniformly — the overshoot survives because its location moves with N, so it never settles on any single point where convergence could erase it.

Also called
Gibbs overshoot吉布斯过冲ringing artifact