2301520 Fundamentals of AMCS
Power Series

Power series

1. Power series may converge for some value of x but diverge for some other value of x.

F[x_]:=Sum[((((x -3))^n)/n),{n,1,∞}];

Note that F[x] converges when 2≤x<4

F[0]

F[1]

F[2]

F[3.5]

F[4]

2. Series[f,{x,(Subscript[x, 0]),n}] returns the power series expansion for f in the variable x  about the point (Subscript[x, 0])  to order (((x-(Subscript[x, 0])))^n)

G[x_]:=x^3/(x+2);

G[x]

Series[G[x],{x,0,10}]

SeriesCoefficient[G[x],{x,0,n}]

3. Partial sum of power series

Needs["PlotLegends`"]

H[x_]:=1/(1-x);

S[k_,x_]:=Sum[x^n,{n,0,k}];

Plot[{H[x],S[1,x],S[2,x],S[3,x]}, {x, -1, 0.7}, AxesLabel->Automatic,  PlotLegend->{"H(x)", "(Subscript[S, 1])(x)", "(Subscript[S, 2])(x)", "(Subscript[S, 3])(x)"}, LegendShadow->None, LegendPosition-> {-1,0}, LegendSize->0.5]

H[x_]:=x^3/(x+2);

S[k_,x_]:=Sum[(-1)^(n-1)*x^n/2^(n-2),{n,3,2+k}];

Plot[{H[x],S[1,x],S[2,x],S[3,x]}, {x, -1, 1}, AxesLabel->Automatic,  PlotLegend->{"H(x)", "(Subscript[S, 1])(x)", "(Subscript[S, 2])(x)", "(Subscript[S, 3])(x)"}, LegendShadow->None, LegendPosition-> {-1,0}, LegendSize->0.5]

4. Taylor and Maclaurin Series :  Series[f,{x,(Subscript[x, 0]),n}]

Series[(E^x),{x,0,6}]

F[x_]:=x^3/(x+2);

ts1=Series[F[x],{x,0,8}] (* Maclaurin Series *)

T1[x_]:=Evaluate[Normal[ts1]]

T1[x]

Plot[{F[x],T1[x]}, {x, -2, 2}, AxesLabel->Automatic,  PlotLegend->{"F(x)", "T1(x)"}, LegendShadow->None, LegendPosition-> {0.5,-0.5}, LegendSize->0.5]

ts2=Series[F[x],{x,1,8}] (* Taylor Series about 1 *)

T2[x_]:=Evaluate[Normal[ts2]]

T2[x]

Plot[{F[x],T2[x]}, {x, -2, 2}, AxesLabel->Automatic,  PlotLegend->{"F(x)", "T2(x)"}, LegendShadow->None, LegendPosition-> {0.5,-0.5}, LegendSize->0.5]

Plot[{F[x],T1[x],T2[x]}, {x, -2, 2}, AxesLabel->Automatic,  PlotLegend->{"F(x)", "T1[x]","T2(x)"}, LegendShadow->None, LegendPosition-> {0.5,-0.5}, LegendSize->0.5]