EX-3-12.mws

Example 3.12 (Unit Pulse)

> restart: A:=-1;B:=1;a:=20;le:=-5;re:=5;

A := -1

B := 1

a := 20

le := -5

re := 5

> Unit Pulse Function:

> p[1](t):=piecewise(t <A,0, t>B, 0, t>A and t<B,1); plot(p[1](t),t=le..re);

p[1](t) := PIECEWISE([0, t < -1], [0, 1 < t], [1, -1 < t and t < 1])

[Plot]

> Coefficient Function (Fourier Transform of p[1]):

> A[w]:=2/Pi*int(p[1](t)*cos(w*t),t=0..infinity); plot(A[w],w=-20..20);

A[w] := 2*sin(w)/(Pi*w)

[Plot]

> a-Partial Fourier Cosine Integral:

>  FC(t):=int(A[w]*cos(w*t),w=0..a);

FC(t) := (Si(20+20*t)-Si(-20+20*t))/Pi

> plot([p[1](t),FC(t)],t=le..re,color=[red,blue]);

[Plot]

>