Fourier Series and Gibbs Phenomenon
Approximate a square wave and visualize the Gibbs Phenomenon.
Free theory articleApproximate a square wave and visualize the Gibbs Phenomenon.
Concept & interpretation
The Gibbs Phenomenon describes the peculiar manner in which the Fourier series of a piecewise continuously differentiable periodic function behaves at a jump discontinuity. Specifically, the partial sums of the Fourier series exhibit large oscillations near the jump, which overshoot the function's values. Even as the number of terms approaches infinity, this overshoot does not disappear; instead, the peak of the overshoot moves closer to the discontinuity but its height approaches a non-zero limit of approximately 8.949% of the jump.
Experiment
You can verify this in the Fourier Series and Gibbs Phenomenon module.
- Set the Amplitude A to
1. - Set the Odd-term count N to
1. - Set the Probe theta / pi to
0.5. - Observe the partial sum is approximately
1.2732and the peak overshoot is13.66%. - Now set Odd-term count N to
3. The peak moves to0.167π, but the overshoot remains around9.42%. - Set Odd-term count N to 2 while Amplitude A = 1 and Probe theta / pi = 0.5. The sum is 8/(3π), about 0.848826363157, while the first peak is 8√2/(3π), about 1.20042175488.
- Set Odd-term count N to 20. The near-jump plot marks the first peak at theta / pi = 0.025 and computes its excess rather than forcing the limiting percentage.
- Set Probe theta / pi to 0, then -1 and 1. Target midpoint and sum are 0 at each jump. This convention does not mean the continuous finite sum reproduces the one-sided limits there.
- Set Amplitude A to 0. Target, sum, peak value and error are 0, while normalized overshoot is unavailable. Restore A = 1, clear Odd-term count N, observe the error and absent outputs, then restore N = 1.