The Gibbs overshoot of a square wave
A thousand sines still overshoot the corner by 9%. The jump from −1 to +1 is 2; the sum peaks at 1.179, 0.179 above the plateau, which is 8.95% of the jump. Drag the cut along the harmonics:
Only odd harmonics appear, with . More terms squeeze the ringing towards the jump, but the first peak keeps its height: the tail the cut throws away is still large near the corner.
The sum and its terms
Each term is a sine standing at its own frequency. From the front they add up to the sum; from the side each is a bar of its amplitude, the spectrum above. Drag the figure to turn it, and the dot on the frequency axis to keep more terms:
More terms
Count in half-widths and the ringing holds its place. Play adds terms, up to a thousand, or drag the terms along their axis:
Derivation
Differentiate the -term sum: the cosines add up in closed form.
The first zero, the peak, is at . Put and use for small :
That is 1.179. More terms move the peak towards the jump and its height towards this nonzero limit.
Check yourself
Formula sheet
| Rule | Formula |
|---|---|
| Series, period | |
| Coefficients | |
| Odd | |
| Even | |
| Square wave, | for odd , 0 for even |
| Value at a jump | |
| Peak of the -term sum | at , height |
| Overshoot | jump, as |
Every number above is computed from the square-wave series, summed term by term; Si(π) = 1.852 is integrated numerically and agrees with Wikipedia's "Gibbs phenomenon", which gives the overshoot as 0.0895 of the jump.