power_series.mws

Power series example: converges for 4 <= x < 6

> restart:
a:=n->(x-5)^n/n;
N:=6;
for n from 1 to N do
s[n]:=add(a(i),i=1..n);
od;

a := proc (n) options operator, arrow; (x-5)^n/n en...

N := 6

s[1] := x-5

s[2] := x-5+1/2*(x-5)^2

s[3] := x-5+1/2*(x-5)^2+1/3*(x-5)^3

s[4] := x-5+1/2*(x-5)^2+1/3*(x-5)^3+1/4*(x-5)^4

s[5] := x-5+1/2*(x-5)^2+1/3*(x-5)^3+1/4*(x-5)^4+1/5...

s[6] := x-5+1/2*(x-5)^2+1/3*(x-5)^3+1/4*(x-5)^4+1/5...

etc.

> N:=20;
for n from 1 to N do
s[n]:=add(a(i),i=1..n);
od:
ss:=-log(6-x);
plot([seq(s[n],n=1..N),ss],x=3.9..6.1,-2..5,
thickness=[seq(1,n=1..N),2],color=[seq(black,n=1..N),red],numpoints=200);

N := 20

ss := -ln(6-x)

[Maple Plot]

> plot([seq(s[n],n=1..N),ss],x=3.9..4.3,
thickness=[seq(1,n=1..N),3],color=[seq(black,n=1..N),red],numpoints=200);

[Maple Plot]

> plot([seq(s[n],n=1..N),ss],x=5.9..6.1,
thickness=[seq(1,n=1..N),3],color=[seq(black,n=1..N),red],numpoints=200);

[Maple Plot]

>

>