Fourier_p.mws

Séries de Fourier de p

por

Milton Procópio de Borba

> restart;

> Ate:=25:

> p:=1-x^2;

p := 1-x^2

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

[Maple Plot]

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

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

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

bn := -4*(n*Pi*cos(n*Pi)-sin(n*Pi))/n^3/Pi^3

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

b[0] := 2/3

> 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 := -1/(Pi^2)

b[2] := -.1013211836

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

b[3] := .4503163715e-1

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

b[4] := -.2533029590e-1

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

b[5] := .1621138938e-1

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

b[6] := -.1125790929e-1

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

b[7] := .8271117028e-2

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

b[8] := -.6332573975e-2

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

b[9] := .5003515240e-2

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

b[10] := -.4052847344e-2

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

b[11] := .3349460615e-2

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

b[12] := -.2814477322e-2

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

b[13] := .2398134523e-2

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

b[14] := -.2067779258e-2

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

b[15] := .1801265486e-2

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

b[16] := -.1583143494e-2

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

b[17] := .1402369323e-2

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

b[18] := -.1250878810e-2

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

b[19] := .1122672394e-2

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

b[20] := -.1013211836e-2

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

b[21] := .9190130032e-3

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

b[22] := -.8373651537e-3

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

b[23] := .7661337134e-3

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

b[24] := -.7036193305e-3

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

b[25] := .6484555750e-3

> ser:=0:

> for n from 0 to 4 do

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

> od:

> with(plots):

> G1 := plot(p,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]

>