8.7.2 Convergence of Taylor Series

Mathematica script by Chris Parrish,
   cparrish@sewanee.edu

Sources and references for some of these problems include
    James Stewart, "Calculus: Concepts and Contexts," Second Edition, Brooks/Cole, 2001
    Deborah Hughes-Hallett, Andrew M. Gleason, et. al., "Calculus," Second Edition, John Wiley & Sons, 1998
    Robert Fraga, ed., "Calculus Problems for a New Century," The Mathematical Association of America, 1993

Convergence of Taylor Series

Taylor polynomials for Cos[x] near x = 0

Hughes-Hallett, Gleason, et al, First Edition, Section 10.2, pages 600ff

In[170]:=

Clear[f,taylor,x,x0,a,b,n]

x0 = 0;

f[x_] := Cos[x]

taylor5[x_] = Normal[Series[f[x],{x,x0,5}]];
taylor10[x_] = Normal[Series[f[x],{x,x0,10}]];
taylor15[x_] = Normal[Series[f[x],{x,x0,15}]];
taylor20[x_] = Normal[Series[f[x],{x,x0,20}]]

Out[176]=

1 - x^2/2 + x^4/24 - x^6/720 + x^8/40320 - x^10/3628800 + x^12/479001600 - x^14/87178291200 + x^16/20922789888000 - x^18/6402373705728000 + x^20/2432902008176640000

In[177]:=

a = -10;
b = 10;

Plot[{f[x],taylor5[x],taylor10[x],taylor15[x],taylor20[x]},{x,a,b},
     PlotLabel -> "Taylor Polynomial Approximations",
     PlotStyle -> {Red,Green,ForestGreen,Blue,Indigo}];

[Graphics:HTMLFiles/8.7.2_convergenceOfSeries_2.gif]

Taylor polynomials for Log[1 + x] near x = 0

Hughes-Hallett, Gleason, et al, First Edition, Section 10.2, pages 600ff

In[180]:=

Clear[f,taylor,x,x0,a,b,n]

x0 = 0;

f[x_] := Log[1 + x]

taylor5[x_] = Normal[Series[f[x],{x,x0,5}]];
taylor10[x_] = Normal[Series[f[x],{x,x0,10}]];
taylor15[x_] = Normal[Series[f[x],{x,x0,15}]];
taylor20[x_] = Normal[Series[f[x],{x,x0,20}]]

Out[186]=

x - x^2/2 + x^3/3 - x^4/4 + x^5/5 - x^6/6 + x^7/7 - x^8/8 + x^9/9 - x^10/10 + x^11/11 - x^12/12 + x^13/13 - x^14/14 + x^15/15 - x^16/16 + x^17/17 - x^18/18 + x^19/19 - x^20/20

In[187]:=

a = -0.999;
b = 5;

Plot[{f[x],taylor5[x],taylor10[x],taylor15[x],taylor20[x]},{x,a,b},
     PlotLabel -> "Taylor Polynomial Approximations",
     PlotRange -> {-10,10},
     PlotStyle -> {Red,Green,ForestGreen,Blue,Indigo}];

[Graphics:HTMLFiles/8.7.2_convergenceOfSeries_4.gif]

Conclusion: There is quite a dramatic difference in the way these sequences of Taylor Polynomials behave with respect to the functions they are meant to approximate.
This leads to the notion of "interval of convergence."

Problems from Hughes-Hallett, Gleason, et al.

Taylor polynomial for ArcTan[x] near x = 0

Hughes-Hallett, Gleason, et al, First Edition, Exercise 10.2.8, page 606

In[190]:=

Clear[f,taylor,x,x0,a,b,n]

x0 = 0;
n = 10;

f[x_] := ArcTan[x]

taylor[x_] = Normal[Series[f[x],{x,x0,n}]]

Out[194]=

x - x^3/3 + x^5/5 - x^7/7 + x^9/9

In[195]:=

a = -2;
b = 2;

Plot[{f[x],taylor[x]},{x,a,b},
     PlotLabel -> "Taylor Polynomial Approximation",
     PlotRange -> {-3,3},
     PlotStyle -> {Red,Green}];

[Graphics:HTMLFiles/8.7.2_convergenceOfSeries_6.gif]

Taylor polynomial for Log[1 - x] near x = 0

Hughes-Hallett, Gleason, et al, First Edition, Exercise 10.2.9, page 606

In[198]:=

Clear[f,taylor,x,x0,a,b,n]

x0 = 0;
n = 6;

f[x_] := Log[1 - x]

taylor[x_] = Normal[Series[f[x],{x,x0,n}]]

Out[202]=

-x - x^2/2 - x^3/3 - x^4/4 - x^5/5 - x^6/6

In[203]:=

a = -2;
b = 0.999;

Plot[{f[x],taylor[x]},{x,a,b},
     PlotLabel -> "Taylor Polynomial Approximation",
     PlotStyle -> {{Thickness[0.002],Red},
                   {Thickness[0.004],Green}}];

[Graphics:HTMLFiles/8.7.2_convergenceOfSeries_8.gif]

Taylor polynomials for (1 + x)^(1/2) near x=0

Hughes-Hallett, Gleason, et al, Second Edition, Exercises 9.2.6 and 9.2.14, page 443

In[206]:=

Clear[f, taylor, x, x0, a, b, n] <br /> x0 = 0 ; n = 4 ;  f[x_] := (1 + x)^(1/2) <br /> taylor4[x_] = Normal[Series[f[x], {x, x0, n}]]

Out[210]=

1 + x/2 - x^2/8 + x^3/16 - (5 x^4)/128

In[211]:=

RowBox[{RowBox[{a, =, RowBox[{-, 1.}]}], ;}] RowBox[{RowBox[{RowBox[{b, =, 2.}], ;}],  ... el"Taylor Polynomial Approximations", PlotStyle {Red, Green}] ;

[Graphics:HTMLFiles/8.7.2_convergenceOfSeries_13.gif]

In[214]:=

taylor5[x_]  = Normal[Series[f[x],{x,x0,5}]];
taylor10[x_] = Normal[Series[f[x],{x,x0,10}]];
taylor15[x_] = Normal[Series[f[x],{x,x0,15}]];
taylor20[x_] = Normal[Series[f[x],{x,x0,20}]];

a = -2.0;
b = 2.0;

Plot[{taylor5[x],taylor10[x],taylor15[x],taylor20[x]},{x,a,b},
     PlotLabel -> "Taylor Polynomial Approximations",
     PlotRange->{-5,5},
     PlotStyle -> {Green,ForestGreen,Blue,Indigo}];

[Graphics:HTMLFiles/8.7.2_convergenceOfSeries_14.gif]

Observation: These approximations seem to sta close to one another over the interval [-1,1], but then they go there separate ways. The interval of convergence seems to be [-1,1]. Prove this using the ratio test.

Conclusion: There is quite a dramatic difference in the way these sequences of Taylor Polynomials behave with respect to the functions they are meant to approximate.
This leads to the notion of "interval of convergence."


Created by Mathematica  (May 5, 2004)