Gibbs Overshoot
M.M. Yovanovich
GIBBS1.MWS
The Gibbs overshoot for a square wave.
The square wave on the interval
is approximated by a finite sine series.
DO NOT EVALUATE THIS WORKSHEET. The plots take some time to do.
> restart:
> fn:=(n,x)-> Bn*sin(n*Pi*x/L);
Fourier sine coefficients for the constant 100.
> Bn:= 2/L*Int(100*sin(n*Pi*x/L), x=0..L);
> Bn:= value(%); Bn:= simplify(subs(cos(n*Pi) = (-1)^n, %));
> Bn10:= [seq(Bn, n=1..9)];
> Bn100:= [seq(Bn, n=1..99)]:
> Bn500:= [seq(Bn, n=1..499)]:
Set L = 1 and plot the partial sums.
Definitions and plots of the square wave approximation. Observe overshoots at x=0 and x=1.
> square10:= x->sum(Bn10[j]*sin(j*Pi*x), j=1..9);
> plot(square10,0..1);
> square50:= x->sum(Bn100[j]*sin(j*Pi*x), j=1..49);
> plot(square50,0..1);
> square100:= x->sum(Bn500[j]*sin(j*Pi*x), j=1..99);
> plot(square100,0..1);
>