Fourier_g.mws

Séries de Fourier de g

por

Milton Procópio de Borba

> restart;

> Ate:=20:

> g:=x;

g := x

> plot(g,x=0..1,color=blue);

[Maple Plot]

> c[n]:=cos(n*Pi*x);

> bn:=2*int(g*c[n],x=0..1);

c[n] := cos(n*Pi*x)

bn := 2*(cos(n*Pi)+n*Pi*sin(n*Pi)-1)/n^2/Pi^2

> b[0]:=int(g,x=0..1);

b[0] := 1/2

> for i to Ate do

> B:=simplify(subs(n=i,bn)):

> b[i]:=evalf(B)

> od;

B := -4*1/(Pi^2)

b[1] := -.4052847344

B := 0

b[2] := 0.

B := -4/9*1/(Pi^2)

b[3] := -.4503163715e-1

B := 0

b[4] := 0.

B := -4/25*1/(Pi^2)

b[5] := -.1621138938e-1

B := 0

b[6] := 0.

B := -4/49*1/(Pi^2)

b[7] := -.8271117028e-2

B := 0

b[8] := 0.

B := -4/81*1/(Pi^2)

b[9] := -.5003515240e-2

B := 0

b[10] := 0.

B := -4/121*1/(Pi^2)

b[11] := -.3349460615e-2

B := 0

b[12] := 0.

B := -4/169*1/(Pi^2)

b[13] := -.2398134523e-2

B := 0

b[14] := 0.

B := -4/225*1/(Pi^2)

b[15] := -.1801265486e-2

B := 0

b[16] := 0.

B := -4/289*1/(Pi^2)

b[17] := -.1402369323e-2

B := 0

b[18] := 0.

B := -4/361*1/(Pi^2)

b[19] := -.1122672394e-2

B := 0

b[20] := 0.

> ser:=0:

> for n from 0 to 3 do

> ser:=ser +b[n]*cos(n*Pi*x):

> od:

> with(plots):

> G1 := plot(g,x=0..1,color=blue,style=point):

> G2:=plot(ser,x=-3..3):

> display({G1,G2});

[Maple Plot]

> ser:=0:

> for n from 0 to Ate do

> ser:=ser +b[n]*cos(n*Pi*x):

> od:

> G2:=plot(ser,x=-3..3):

> display({G1,G2});

[Maple Plot]

>