The Gibbs Pheonomenon

Links
Instructions Supporting Material Applet Doesn't Work? Feedback

Instructions
Scroll the wheel to change the number of terms in the sum.

Supporting Material
Gibbs: The overshoot has a constant height (=18% of the discontinuity) and moves towards the jump as the number of terms increases.

The functions considered here are:
a). the odd step function of height 3 whose sine coefficients, s(n), are
s(n)=12.0*(n % 2)/Math.PI/n;
b). the odd part of 1+.25*x^2,
s(n)=-1/(4*pi*n^3)*((-1)^n*(4*n*n+n*n*PI*PI-2) - 4*n*n + 2)

Since both functions are odd, the cosine terms are missing.
The graphs on the right zoom in on the region indicated by a green box on the left graph. On all the graphs, the resolution is limited by the resolution of the screen. So when the frequency of the oscillations is such that there are more than 1 oscillations/pixel, aliasing effects occur and the result is that a great deal of (visual) information is lost. For example, when then number of terms is high, the overshoot appears to diminish. However, we know that in actuality this is not the case.