Gibbs Overshoot

M.M. Yovanovich

GIBBS1.MWS

The Gibbs overshoot for a square wave.

The square wave on the interval [Maple Math] 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);

[Maple Math]

Fourier sine coefficients for the constant 100.

> Bn:= 2/L*Int(100*sin(n*Pi*x/L), x=0..L);

[Maple Math]

> Bn:= value(%); Bn:= simplify(subs(cos(n*Pi) = (-1)^n, %));

[Maple Math]

[Maple Math]

> Bn10:= [seq(Bn, n=1..9)];

[Maple Math]

> 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);

[Maple Math]

> plot(square10,0..1);

[Maple Plot]

> square50:= x->sum(Bn100[j]*sin(j*Pi*x), j=1..49);

[Maple Math]

> plot(square50,0..1);

[Maple Plot]

> square100:= x->sum(Bn500[j]*sin(j*Pi*x), j=1..99);

[Maple Math]

> plot(square100,0..1);

[Maple Plot]

>