taylorexamples.mw

Taylor Series Examples

Math 1352

In these pages, we'll take advantage of the computer to do some animations to show convergence of Taylor Series.  We're using the computer algebra package Maple, but if you concentrate on the math and the graphs, you won't have to know Maple.

Example 1

> with(plots): with(plottools):

Warning, the name arrow has been redefined

Warning, the name arrow has been redefined

Let's start with an example where we know the Taylor series converges to the function everywhere.  Let's use

> f := sin(x);

f := sin(x)

and center the series at a = 0.    Fortunately, Maple knows how to compute partial sums of the taylor series.

> p0:=taylor(f,x=0,1);

p0 := series(+O(x^1),x,1)

> p1 := taylor(f,x=0,2);

p1 := series(x+O(x^2),x,2)

> p3 := taylor(f,x=0,3);

p3 := series(x+O(x^3),x,3)

> p4 := taylor(f,x=0,4);

p4 := series(x-1/6*x^3+O(x^4),x,4)

In Maple, we have to do something to get rid of that stuff at the end and make it a real polynomial

> p4;

series(x-1/6*x^3+O(x^4),x,4)

> p4 := convert(p4, polynom);

p4 := x-1/6*x^3

Here are the first 36 Taylor polynomials

> for n from 1 to 36 do p[n]:=convert(taylor(f,x=0,n),polynom); od;

p[1] := 0

p[2] := x

p[3] := x

p[4] := x-1/6*x^3

p[5] := x-1/6*x^3

p[6] := x-1/6*x^3+1/120*x^5

p[7] := x-1/6*x^3+1/120*x^5

p[8] := x-1/6*x^3+1/120*x^5-1/5040*x^7

p[9] := x-1/6*x^3+1/120*x^5-1/5040*x^7

p[10] := x-1/6*x^3+1/120*x^5-1/5040*x^7+1/362880*x^9

p[11] := x-1/6*x^3+1/120*x^5-1/5040*x^7+1/362880*x^9

p[12] := x-1/6*x^3+1/120*x^5-1/5040*x^7+1/362880*x^9-1/39916800*x^11

p[13] := x-1/6*x^3+1/120*x^5-1/5040*x^7+1/362880*x^9-1/39916800*x^11

p[14] := x-1/6*x^3+1/120*x^5-1/5040*x^7+1/362880*x^9-1/39916800*x^11+1/6227020800*x^13

p[15] := x-1/6*x^3+1/120*x^5-1/5040*x^7+1/362880*x^9-1/39916800*x^11+1/6227020800*x^13

p[16] := x-1/6*x^3+1/120*x^5-1/5040*x^7+1/362880*x^9-1/39916800*x^11+1/6227020800*x^13-1/1307674368000*x^15

p[17] := x-1/6*x^3+1/120*x^5-1/5040*x^7+1/362880*x^9-1/39916800*x^11+1/6227020800*x^13-1/1307674368000*x^15

p[18] := x-1/6*x^3+1/120*x^5-1/5040*x^7+1/362880*x^9-1/39916800*x^11+1/6227020800*x^13-1/1307674368000*x^15+1/355687428096000*x^17

p[19] := x-1/6*x^3+1/120*x^5-1/5040*x^7+1/362880*x^9-1/39916800*x^11+1/6227020800*x^13-1/1307674368000*x^15+1/355687428096000*x^17

p[20] := x-1/6*x^3+1/120*x^5-1/5040*x^7+1/362880*x^9-1/39916800*x^11+1/6227020800*x^13-1/1307674368000*x^15+1/355687428096000*x^17-1/121645100408832000*x^19

p[21] := x-1/6*x^3+1/120*x^5-1/5040*x^7+1/362880*x^9-1/39916800*x^11+1/6227020800*x^13-1/1307674368000*x^15+1/355687428096000*x^17-1/121645100408832000*x^19

p[22] := x-1/6*x^3+1/120*x^5-1/5040*x^7+1/362880*x^9-1/39916800*x^11+1/6227020800*x^13-1/1307674368000*x^15+1/355687428096000*x^17-1/121645100408832000*x^19+1/51090942171709440000*x^21p[22] := x-1/6*x^3+1/120*x^5-1/5040*x^7+1/362880*x^9-1/39916800*x^11+1/6227020800*x^13-1/1307674368000*x^15+1/355687428096000*x^17-1/121645100408832000*x^19+1/51090942171709440000*x^21

p[23] := x-1/6*x^3+1/120*x^5-1/5040*x^7+1/362880*x^9-1/39916800*x^11+1/6227020800*x^13-1/1307674368000*x^15+1/355687428096000*x^17-1/121645100408832000*x^19+1/51090942171709440000*x^21p[23] := x-1/6*x^3+1/120*x^5-1/5040*x^7+1/362880*x^9-1/39916800*x^11+1/6227020800*x^13-1/1307674368000*x^15+1/355687428096000*x^17-1/121645100408832000*x^19+1/51090942171709440000*x^21

p[24] := x-1/6*x^3+1/120*x^5-1/5040*x^7+1/362880*x^9-1/39916800*x^11+1/6227020800*x^13-1/1307674368000*x^15+1/355687428096000*x^17-1/121645100408832000*x^19+1/51090942171709440000*x^21-1/2585201673888...p[24] := x-1/6*x^3+1/120*x^5-1/5040*x^7+1/362880*x^9-1/39916800*x^11+1/6227020800*x^13-1/1307674368000*x^15+1/355687428096000*x^17-1/121645100408832000*x^19+1/51090942171709440000*x^21-1/2585201673888...

p[25] := x-1/6*x^3+1/120*x^5-1/5040*x^7+1/362880*x^9-1/39916800*x^11+1/6227020800*x^13-1/1307674368000*x^15+1/355687428096000*x^17-1/121645100408832000*x^19+1/51090942171709440000*x^21-1/2585201673888...p[25] := x-1/6*x^3+1/120*x^5-1/5040*x^7+1/362880*x^9-1/39916800*x^11+1/6227020800*x^13-1/1307674368000*x^15+1/355687428096000*x^17-1/121645100408832000*x^19+1/51090942171709440000*x^21-1/2585201673888...

p[26] := x-1/6*x^3+1/120*x^5-1/5040*x^7+1/362880*x^9-1/39916800*x^11+1/6227020800*x^13-1/1307674368000*x^15+1/355687428096000*x^17-1/121645100408832000*x^19+1/51090942171709440000*x^21-1/2585201673888...p[26] := x-1/6*x^3+1/120*x^5-1/5040*x^7+1/362880*x^9-1/39916800*x^11+1/6227020800*x^13-1/1307674368000*x^15+1/355687428096000*x^17-1/121645100408832000*x^19+1/51090942171709440000*x^21-1/2585201673888...

p[27] := x-1/6*x^3+1/120*x^5-1/5040*x^7+1/362880*x^9-1/39916800*x^11+1/6227020800*x^13-1/1307674368000*x^15+1/355687428096000*x^17-1/121645100408832000*x^19+1/51090942171709440000*x^21-1/2585201673888...p[27] := x-1/6*x^3+1/120*x^5-1/5040*x^7+1/362880*x^9-1/39916800*x^11+1/6227020800*x^13-1/1307674368000*x^15+1/355687428096000*x^17-1/121645100408832000*x^19+1/51090942171709440000*x^21-1/2585201673888...

p[28] := x-1/6*x^3+1/120*x^5-1/5040*x^7+1/362880*x^9-1/39916800*x^11+1/6227020800*x^13-1/1307674368000*x^15+1/355687428096000*x^17-1/121645100408832000*x^19+1/51090942171709440000*x^21-1/2585201673888...p[28] := x-1/6*x^3+1/120*x^5-1/5040*x^7+1/362880*x^9-1/39916800*x^11+1/6227020800*x^13-1/1307674368000*x^15+1/355687428096000*x^17-1/121645100408832000*x^19+1/51090942171709440000*x^21-1/2585201673888...

p[29] := x-1/6*x^3+1/120*x^5-1/5040*x^7+1/362880*x^9-1/39916800*x^11+1/6227020800*x^13-1/1307674368000*x^15+1/355687428096000*x^17-1/121645100408832000*x^19+1/51090942171709440000*x^21-1/2585201673888...p[29] := x-1/6*x^3+1/120*x^5-1/5040*x^7+1/362880*x^9-1/39916800*x^11+1/6227020800*x^13-1/1307674368000*x^15+1/355687428096000*x^17-1/121645100408832000*x^19+1/51090942171709440000*x^21-1/2585201673888...

p[30] := x-1/6*x^3+1/120*x^5-1/5040*x^7+1/362880*x^9-1/39916800*x^11+1/6227020800*x^13-1/1307674368000*x^15+1/355687428096000*x^17-1/121645100408832000*x^19+1/51090942171709440000*x^21-1/2585201673888...p[30] := x-1/6*x^3+1/120*x^5-1/5040*x^7+1/362880*x^9-1/39916800*x^11+1/6227020800*x^13-1/1307674368000*x^15+1/355687428096000*x^17-1/121645100408832000*x^19+1/51090942171709440000*x^21-1/2585201673888...p[30] := x-1/6*x^3+1/120*x^5-1/5040*x^7+1/362880*x^9-1/39916800*x^11+1/6227020800*x^13-1/1307674368000*x^15+1/355687428096000*x^17-1/121645100408832000*x^19+1/51090942171709440000*x^21-1/2585201673888...

p[31] := x-1/6*x^3+1/120*x^5-1/5040*x^7+1/362880*x^9-1/39916800*x^11+1/6227020800*x^13-1/1307674368000*x^15+1/355687428096000*x^17-1/121645100408832000*x^19+1/51090942171709440000*x^21-1/2585201673888...p[31] := x-1/6*x^3+1/120*x^5-1/5040*x^7+1/362880*x^9-1/39916800*x^11+1/6227020800*x^13-1/1307674368000*x^15+1/355687428096000*x^17-1/121645100408832000*x^19+1/51090942171709440000*x^21-1/2585201673888...p[31] := x-1/6*x^3+1/120*x^5-1/5040*x^7+1/362880*x^9-1/39916800*x^11+1/6227020800*x^13-1/1307674368000*x^15+1/355687428096000*x^17-1/121645100408832000*x^19+1/51090942171709440000*x^21-1/2585201673888...

p[32] := x-1/6*x^3+1/120*x^5-1/5040*x^7+1/362880*x^9-1/39916800*x^11+1/6227020800*x^13-1/1307674368000*x^15+1/355687428096000*x^17-1/121645100408832000*x^19+1/51090942171709440000*x^21-1/2585201673888...p[32] := x-1/6*x^3+1/120*x^5-1/5040*x^7+1/362880*x^9-1/39916800*x^11+1/6227020800*x^13-1/1307674368000*x^15+1/355687428096000*x^17-1/121645100408832000*x^19+1/51090942171709440000*x^21-1/2585201673888...p[32] := x-1/6*x^3+1/120*x^5-1/5040*x^7+1/362880*x^9-1/39916800*x^11+1/6227020800*x^13-1/1307674368000*x^15+1/355687428096000*x^17-1/121645100408832000*x^19+1/51090942171709440000*x^21-1/2585201673888...

p[33] := x-1/6*x^3+1/120*x^5-1/5040*x^7+1/362880*x^9-1/39916800*x^11+1/6227020800*x^13-1/1307674368000*x^15+1/355687428096000*x^17-1/121645100408832000*x^19+1/51090942171709440000*x^21-1/2585201673888...p[33] := x-1/6*x^3+1/120*x^5-1/5040*x^7+1/362880*x^9-1/39916800*x^11+1/6227020800*x^13-1/1307674368000*x^15+1/355687428096000*x^17-1/121645100408832000*x^19+1/51090942171709440000*x^21-1/2585201673888...p[33] := x-1/6*x^3+1/120*x^5-1/5040*x^7+1/362880*x^9-1/39916800*x^11+1/6227020800*x^13-1/1307674368000*x^15+1/355687428096000*x^17-1/121645100408832000*x^19+1/51090942171709440000*x^21-1/2585201673888...

p[34] := x-1/6*x^3+1/120*x^5-1/5040*x^7+1/362880*x^9-1/39916800*x^11+1/6227020800*x^13-1/1307674368000*x^15+1/355687428096000*x^17-1/121645100408832000*x^19+1/51090942171709440000*x^21-1/2585201673888...p[34] := x-1/6*x^3+1/120*x^5-1/5040*x^7+1/362880*x^9-1/39916800*x^11+1/6227020800*x^13-1/1307674368000*x^15+1/355687428096000*x^17-1/121645100408832000*x^19+1/51090942171709440000*x^21-1/2585201673888...p[34] := x-1/6*x^3+1/120*x^5-1/5040*x^7+1/362880*x^9-1/39916800*x^11+1/6227020800*x^13-1/1307674368000*x^15+1/355687428096000*x^17-1/121645100408832000*x^19+1/51090942171709440000*x^21-1/2585201673888...

p[35] := x-1/6*x^3+1/120*x^5-1/5040*x^7+1/362880*x^9-1/39916800*x^11+1/6227020800*x^13-1/1307674368000*x^15+1/355687428096000*x^17-1/121645100408832000*x^19+1/51090942171709440000*x^21-1/2585201673888...p[35] := x-1/6*x^3+1/120*x^5-1/5040*x^7+1/362880*x^9-1/39916800*x^11+1/6227020800*x^13-1/1307674368000*x^15+1/355687428096000*x^17-1/121645100408832000*x^19+1/51090942171709440000*x^21-1/2585201673888...p[35] := x-1/6*x^3+1/120*x^5-1/5040*x^7+1/362880*x^9-1/39916800*x^11+1/6227020800*x^13-1/1307674368000*x^15+1/355687428096000*x^17-1/121645100408832000*x^19+1/51090942171709440000*x^21-1/2585201673888...

p[36] := x-1/6*x^3+1/120*x^5-1/5040*x^7+1/362880*x^9-1/39916800*x^11+1/6227020800*x^13-1/1307674368000*x^15+1/355687428096000*x^17-1/121645100408832000*x^19+1/51090942171709440000*x^21-1/2585201673888...p[36] := x-1/6*x^3+1/120*x^5-1/5040*x^7+1/362880*x^9-1/39916800*x^11+1/6227020800*x^13-1/1307674368000*x^15+1/355687428096000*x^17-1/121645100408832000*x^19+1/51090942171709440000*x^21-1/2585201673888...p[36] := x-1/6*x^3+1/120*x^5-1/5040*x^7+1/362880*x^9-1/39916800*x^11+1/6227020800*x^13-1/1307674368000*x^15+1/355687428096000*x^17-1/121645100408832000*x^19+1/51090942171709440000*x^21-1/2585201673888...p[36] := x-1/6*x^3+1/120*x^5-1/5040*x^7+1/362880*x^9-1/39916800*x^11+1/6227020800*x^13-1/1307674368000*x^15+1/355687428096000*x^17-1/121645100408832000*x^19+1/51090942171709440000*x^21-1/2585201673888...

>

Notice the odd numbered ones don't add any new terms, so lets exclude them

> for k from 1 to 18 do q[k]:=convert(taylor(f,x=0,2*k),polynom); od;

q[1] := x

q[2] := x-1/6*x^3

q[3] := x-1/6*x^3+1/120*x^5

q[4] := x-1/6*x^3+1/120*x^5-1/5040*x^7

q[5] := x-1/6*x^3+1/120*x^5-1/5040*x^7+1/362880*x^9

q[6] := x-1/6*x^3+1/120*x^5-1/5040*x^7+1/362880*x^9-1/39916800*x^11

q[7] := x-1/6*x^3+1/120*x^5-1/5040*x^7+1/362880*x^9-1/39916800*x^11+1/6227020800*x^13

q[8] := x-1/6*x^3+1/120*x^5-1/5040*x^7+1/362880*x^9-1/39916800*x^11+1/6227020800*x^13-1/1307674368000*x^15

q[9] := x-1/6*x^3+1/120*x^5-1/5040*x^7+1/362880*x^9-1/39916800*x^11+1/6227020800*x^13-1/1307674368000*x^15+1/355687428096000*x^17

q[10] := x-1/6*x^3+1/120*x^5-1/5040*x^7+1/362880*x^9-1/39916800*x^11+1/6227020800*x^13-1/1307674368000*x^15+1/355687428096000*x^17-1/121645100408832000*x^19

q[11] := x-1/6*x^3+1/120*x^5-1/5040*x^7+1/362880*x^9-1/39916800*x^11+1/6227020800*x^13-1/1307674368000*x^15+1/355687428096000*x^17-1/121645100408832000*x^19+1/51090942171709440000*x^21q[11] := x-1/6*x^3+1/120*x^5-1/5040*x^7+1/362880*x^9-1/39916800*x^11+1/6227020800*x^13-1/1307674368000*x^15+1/355687428096000*x^17-1/121645100408832000*x^19+1/51090942171709440000*x^21

q[12] := x-1/6*x^3+1/120*x^5-1/5040*x^7+1/362880*x^9-1/39916800*x^11+1/6227020800*x^13-1/1307674368000*x^15+1/355687428096000*x^17-1/121645100408832000*x^19+1/51090942171709440000*x^21-1/2585201673888...q[12] := x-1/6*x^3+1/120*x^5-1/5040*x^7+1/362880*x^9-1/39916800*x^11+1/6227020800*x^13-1/1307674368000*x^15+1/355687428096000*x^17-1/121645100408832000*x^19+1/51090942171709440000*x^21-1/2585201673888...

q[13] := x-1/6*x^3+1/120*x^5-1/5040*x^7+1/362880*x^9-1/39916800*x^11+1/6227020800*x^13-1/1307674368000*x^15+1/355687428096000*x^17-1/121645100408832000*x^19+1/51090942171709440000*x^21-1/2585201673888...q[13] := x-1/6*x^3+1/120*x^5-1/5040*x^7+1/362880*x^9-1/39916800*x^11+1/6227020800*x^13-1/1307674368000*x^15+1/355687428096000*x^17-1/121645100408832000*x^19+1/51090942171709440000*x^21-1/2585201673888...

q[14] := x-1/6*x^3+1/120*x^5-1/5040*x^7+1/362880*x^9-1/39916800*x^11+1/6227020800*x^13-1/1307674368000*x^15+1/355687428096000*x^17-1/121645100408832000*x^19+1/51090942171709440000*x^21-1/2585201673888...q[14] := x-1/6*x^3+1/120*x^5-1/5040*x^7+1/362880*x^9-1/39916800*x^11+1/6227020800*x^13-1/1307674368000*x^15+1/355687428096000*x^17-1/121645100408832000*x^19+1/51090942171709440000*x^21-1/2585201673888...

q[15] := x-1/6*x^3+1/120*x^5-1/5040*x^7+1/362880*x^9-1/39916800*x^11+1/6227020800*x^13-1/1307674368000*x^15+1/355687428096000*x^17-1/121645100408832000*x^19+1/51090942171709440000*x^21-1/2585201673888...q[15] := x-1/6*x^3+1/120*x^5-1/5040*x^7+1/362880*x^9-1/39916800*x^11+1/6227020800*x^13-1/1307674368000*x^15+1/355687428096000*x^17-1/121645100408832000*x^19+1/51090942171709440000*x^21-1/2585201673888...q[15] := x-1/6*x^3+1/120*x^5-1/5040*x^7+1/362880*x^9-1/39916800*x^11+1/6227020800*x^13-1/1307674368000*x^15+1/355687428096000*x^17-1/121645100408832000*x^19+1/51090942171709440000*x^21-1/2585201673888...

q[16] := x-1/6*x^3+1/120*x^5-1/5040*x^7+1/362880*x^9-1/39916800*x^11+1/6227020800*x^13-1/1307674368000*x^15+1/355687428096000*x^17-1/121645100408832000*x^19+1/51090942171709440000*x^21-1/2585201673888...q[16] := x-1/6*x^3+1/120*x^5-1/5040*x^7+1/362880*x^9-1/39916800*x^11+1/6227020800*x^13-1/1307674368000*x^15+1/355687428096000*x^17-1/121645100408832000*x^19+1/51090942171709440000*x^21-1/2585201673888...q[16] := x-1/6*x^3+1/120*x^5-1/5040*x^7+1/362880*x^9-1/39916800*x^11+1/6227020800*x^13-1/1307674368000*x^15+1/355687428096000*x^17-1/121645100408832000*x^19+1/51090942171709440000*x^21-1/2585201673888...

q[17] := x-1/6*x^3+1/120*x^5-1/5040*x^7+1/362880*x^9-1/39916800*x^11+1/6227020800*x^13-1/1307674368000*x^15+1/355687428096000*x^17-1/121645100408832000*x^19+1/51090942171709440000*x^21-1/2585201673888...q[17] := x-1/6*x^3+1/120*x^5-1/5040*x^7+1/362880*x^9-1/39916800*x^11+1/6227020800*x^13-1/1307674368000*x^15+1/355687428096000*x^17-1/121645100408832000*x^19+1/51090942171709440000*x^21-1/2585201673888...q[17] := x-1/6*x^3+1/120*x^5-1/5040*x^7+1/362880*x^9-1/39916800*x^11+1/6227020800*x^13-1/1307674368000*x^15+1/355687428096000*x^17-1/121645100408832000*x^19+1/51090942171709440000*x^21-1/2585201673888...

q[18] := x-1/6*x^3+1/120*x^5-1/5040*x^7+1/362880*x^9-1/39916800*x^11+1/6227020800*x^13-1/1307674368000*x^15+1/355687428096000*x^17-1/121645100408832000*x^19+1/51090942171709440000*x^21-1/2585201673888...q[18] := x-1/6*x^3+1/120*x^5-1/5040*x^7+1/362880*x^9-1/39916800*x^11+1/6227020800*x^13-1/1307674368000*x^15+1/355687428096000*x^17-1/121645100408832000*x^19+1/51090942171709440000*x^21-1/2585201673888...q[18] := x-1/6*x^3+1/120*x^5-1/5040*x^7+1/362880*x^9-1/39916800*x^11+1/6227020800*x^13-1/1307674368000*x^15+1/355687428096000*x^17-1/121645100408832000*x^19+1/51090942171709440000*x^21-1/2585201673888...q[18] := x-1/6*x^3+1/120*x^5-1/5040*x^7+1/362880*x^9-1/39916800*x^11+1/6227020800*x^13-1/1307674368000*x^15+1/355687428096000*x^17-1/121645100408832000*x^19+1/51090942171709440000*x^21-1/2585201673888...

>

Here is a plot of our function over serveral periods

> bp := plot(f, x=-4*Pi..4*Pi,y=-3..3, color=blue): bp;

[Plot]

>

Now lets do an animation where we plot succesive partial sums of the taylor series on the graph above.

> for k from 1 to 18 do pl[k]:=display([bp, plot(q[k],x=-4*Pi..4*Pi, numpoints=200, title=cat("order = ", convert(degree(q[k],x),string)))]); od:

> display([seq(pl[k], k=1..18)], insequence=true, view=[-4*Pi..4*Pi,-3..3]);

[Plot]

What happens if we look at this animation over a larger range, say -6*Pi to 6*Pi ?  It's easy to check:

> bbp := plot(f, x=-6*Pi..6*Pi, y=-3..3, color=blue): bbp;

[Plot]

> for k from 1 to 18 do pl[k]:=display([bbp, plot(q[k],x=-6*Pi..6*Pi, numpoints=200, title=cat("order = ", convert(degree(q[k],x),string)))]); od:

> display([seq(pl[k], k=1..18)], insequence=true, view=[-6*Pi..6*Pi,-3..3]);

[Plot]

Example 2

Let's consider the case where the series only has a finite radius of convergence.   So, let's consider arctan(x), with the series centered at 0

> maxn := 36;

maxn := 36

> f := arctan(x);

f := arctan(x)

> bp:=plot(f, x=-1.5..1.5,color=blue): bp;

[Plot]

> for n from 1 to maxn do p[n]:=convert(taylor(f,x=0,n),polynom); od;

p[1] := 0

p[2] := x

p[3] := x

p[4] := x-1/3*x^3

p[5] := x-1/3*x^3

p[6] := x-1/3*x^3+1/5*x^5

p[7] := x-1/3*x^3+1/5*x^5

p[8] := x-1/3*x^3+1/5*x^5-1/7*x^7

p[9] := x-1/3*x^3+1/5*x^5-1/7*x^7

p[10] := x-1/3*x^3+1/5*x^5-1/7*x^7+1/9*x^9

p[11] := x-1/3*x^3+1/5*x^5-1/7*x^7+1/9*x^9

p[12] := x-1/3*x^3+1/5*x^5-1/7*x^7+1/9*x^9-1/11*x^11

p[13] := x-1/3*x^3+1/5*x^5-1/7*x^7+1/9*x^9-1/11*x^11

p[14] := x-1/3*x^3+1/5*x^5-1/7*x^7+1/9*x^9-1/11*x^11+1/13*x^13

p[15] := x-1/3*x^3+1/5*x^5-1/7*x^7+1/9*x^9-1/11*x^11+1/13*x^13

p[16] := x-1/3*x^3+1/5*x^5-1/7*x^7+1/9*x^9-1/11*x^11+1/13*x^13-1/15*x^15

p[17] := x-1/3*x^3+1/5*x^5-1/7*x^7+1/9*x^9-1/11*x^11+1/13*x^13-1/15*x^15

p[18] := x-1/3*x^3+1/5*x^5-1/7*x^7+1/9*x^9-1/11*x^11+1/13*x^13-1/15*x^15+1/17*x^17

p[19] := x-1/3*x^3+1/5*x^5-1/7*x^7+1/9*x^9-1/11*x^11+1/13*x^13-1/15*x^15+1/17*x^17

p[20] := x-1/3*x^3+1/5*x^5-1/7*x^7+1/9*x^9-1/11*x^11+1/13*x^13-1/15*x^15+1/17*x^17-1/19*x^19

p[21] := x-1/3*x^3+1/5*x^5-1/7*x^7+1/9*x^9-1/11*x^11+1/13*x^13-1/15*x^15+1/17*x^17-1/19*x^19

p[22] := x-1/3*x^3+1/5*x^5-1/7*x^7+1/9*x^9-1/11*x^11+1/13*x^13-1/15*x^15+1/17*x^17-1/19*x^19+1/21*x^21

p[23] := x-1/3*x^3+1/5*x^5-1/7*x^7+1/9*x^9-1/11*x^11+1/13*x^13-1/15*x^15+1/17*x^17-1/19*x^19+1/21*x^21

p[24] := x-1/3*x^3+1/5*x^5-1/7*x^7+1/9*x^9-1/11*x^11+1/13*x^13-1/15*x^15+1/17*x^17-1/19*x^19+1/21*x^21-1/23*x^23

p[25] := x-1/3*x^3+1/5*x^5-1/7*x^7+1/9*x^9-1/11*x^11+1/13*x^13-1/15*x^15+1/17*x^17-1/19*x^19+1/21*x^21-1/23*x^23

p[26] := x-1/3*x^3+1/5*x^5-1/7*x^7+1/9*x^9-1/11*x^11+1/13*x^13-1/15*x^15+1/17*x^17-1/19*x^19+1/21*x^21-1/23*x^23+1/25*x^25

p[27] := x-1/3*x^3+1/5*x^5-1/7*x^7+1/9*x^9-1/11*x^11+1/13*x^13-1/15*x^15+1/17*x^17-1/19*x^19+1/21*x^21-1/23*x^23+1/25*x^25

p[28] := x-1/3*x^3+1/5*x^5-1/7*x^7+1/9*x^9-1/11*x^11+1/13*x^13-1/15*x^15+1/17*x^17-1/19*x^19+1/21*x^21-1/23*x^23+1/25*x^25-1/27*x^27

p[29] := x-1/3*x^3+1/5*x^5-1/7*x^7+1/9*x^9-1/11*x^11+1/13*x^13-1/15*x^15+1/17*x^17-1/19*x^19+1/21*x^21-1/23*x^23+1/25*x^25-1/27*x^27

p[30] := x-1/3*x^3+1/5*x^5-1/7*x^7+1/9*x^9-1/11*x^11+1/13*x^13-1/15*x^15+1/17*x^17-1/19*x^19+1/21*x^21-1/23*x^23+1/25*x^25-1/27*x^27+1/29*x^29

p[31] := x-1/3*x^3+1/5*x^5-1/7*x^7+1/9*x^9-1/11*x^11+1/13*x^13-1/15*x^15+1/17*x^17-1/19*x^19+1/21*x^21-1/23*x^23+1/25*x^25-1/27*x^27+1/29*x^29

p[32] := x-1/3*x^3+1/5*x^5-1/7*x^7+1/9*x^9-1/11*x^11+1/13*x^13-1/15*x^15+1/17*x^17-1/19*x^19+1/21*x^21-1/23*x^23+1/25*x^25-1/27*x^27+1/29*x^29-1/31*x^31

p[33] := x-1/3*x^3+1/5*x^5-1/7*x^7+1/9*x^9-1/11*x^11+1/13*x^13-1/15*x^15+1/17*x^17-1/19*x^19+1/21*x^21-1/23*x^23+1/25*x^25-1/27*x^27+1/29*x^29-1/31*x^31

p[34] := x-1/3*x^3+1/5*x^5-1/7*x^7+1/9*x^9-1/11*x^11+1/13*x^13-1/15*x^15+1/17*x^17-1/19*x^19+1/21*x^21-1/23*x^23+1/25*x^25-1/27*x^27+1/29*x^29-1/31*x^31+1/33*x^33

p[35] := x-1/3*x^3+1/5*x^5-1/7*x^7+1/9*x^9-1/11*x^11+1/13*x^13-1/15*x^15+1/17*x^17-1/19*x^19+1/21*x^21-1/23*x^23+1/25*x^25-1/27*x^27+1/29*x^29-1/31*x^31+1/33*x^33

p[36] := x-1/3*x^3+1/5*x^5-1/7*x^7+1/9*x^9-1/11*x^11+1/13*x^13-1/15*x^15+1/17*x^17-1/19*x^19+1/21*x^21-1/23*x^23+1/25*x^25-1/27*x^27+1/29*x^29-1/31*x^31+1/33*x^33-1/35*x^35

>

Again, we only need the polynomials with even indices.

> maxk:=maxn/2;

maxk := 18

> for k from 1 to maxk do q[k]:=convert(taylor(f,x=0,2*k),polynom); od;

q[1] := x

q[2] := x-1/3*x^3

q[3] := x-1/3*x^3+1/5*x^5

q[4] := x-1/3*x^3+1/5*x^5-1/7*x^7

q[5] := x-1/3*x^3+1/5*x^5-1/7*x^7+1/9*x^9

q[6] := x-1/3*x^3+1/5*x^5-1/7*x^7+1/9*x^9-1/11*x^11

q[7] := x-1/3*x^3+1/5*x^5-1/7*x^7+1/9*x^9-1/11*x^11+1/13*x^13

q[8] := x-1/3*x^3+1/5*x^5-1/7*x^7+1/9*x^9-1/11*x^11+1/13*x^13-1/15*x^15

q[9] := x-1/3*x^3+1/5*x^5-1/7*x^7+1/9*x^9-1/11*x^11+1/13*x^13-1/15*x^15+1/17*x^17

q[10] := x-1/3*x^3+1/5*x^5-1/7*x^7+1/9*x^9-1/11*x^11+1/13*x^13-1/15*x^15+1/17*x^17-1/19*x^19

q[11] := x-1/3*x^3+1/5*x^5-1/7*x^7+1/9*x^9-1/11*x^11+1/13*x^13-1/15*x^15+1/17*x^17-1/19*x^19+1/21*x^21

q[12] := x-1/3*x^3+1/5*x^5-1/7*x^7+1/9*x^9-1/11*x^11+1/13*x^13-1/15*x^15+1/17*x^17-1/19*x^19+1/21*x^21-1/23*x^23

q[13] := x-1/3*x^3+1/5*x^5-1/7*x^7+1/9*x^9-1/11*x^11+1/13*x^13-1/15*x^15+1/17*x^17-1/19*x^19+1/21*x^21-1/23*x^23+1/25*x^25

q[14] := x-1/3*x^3+1/5*x^5-1/7*x^7+1/9*x^9-1/11*x^11+1/13*x^13-1/15*x^15+1/17*x^17-1/19*x^19+1/21*x^21-1/23*x^23+1/25*x^25-1/27*x^27

q[15] := x-1/3*x^3+1/5*x^5-1/7*x^7+1/9*x^9-1/11*x^11+1/13*x^13-1/15*x^15+1/17*x^17-1/19*x^19+1/21*x^21-1/23*x^23+1/25*x^25-1/27*x^27+1/29*x^29

q[16] := x-1/3*x^3+1/5*x^5-1/7*x^7+1/9*x^9-1/11*x^11+1/13*x^13-1/15*x^15+1/17*x^17-1/19*x^19+1/21*x^21-1/23*x^23+1/25*x^25-1/27*x^27+1/29*x^29-1/31*x^31

q[17] := x-1/3*x^3+1/5*x^5-1/7*x^7+1/9*x^9-1/11*x^11+1/13*x^13-1/15*x^15+1/17*x^17-1/19*x^19+1/21*x^21-1/23*x^23+1/25*x^25-1/27*x^27+1/29*x^29-1/31*x^31+1/33*x^33

q[18] := x-1/3*x^3+1/5*x^5-1/7*x^7+1/9*x^9-1/11*x^11+1/13*x^13-1/15*x^15+1/17*x^17-1/19*x^19+1/21*x^21-1/23*x^23+1/25*x^25-1/27*x^27+1/29*x^29-1/31*x^31+1/33*x^33-1/35*x^35

>

The form of the series is

> s:=Sum((-1)^m*x^(2*m+1)/(2*m+1),m=0..infinity);

s := Sum((-1)^m*x^(2*m+1)/(2*m+1), m = (0 .. infinity))

The absolute value of the mth term is

> a := m -> abs(x)^(2*m+1)/(2*m+1);

a := proc (m) options operator, arrow; abs(x)^(2*m+1)/(2*m+1) end proc

> a(m);

abs(x)^(2*m+1)/(2*m+1)

>

Apply the ratio test

> rat := a(m+1)/a(m);

rat := abs(x)^(2*m+3)*(2*m+1)/((2*m+3)*abs(x)^(2*m+1))

> rat := simplify(rat);

rat := abs(x)^2*(2*m+1)/(2*m+3)

> r := limit(rat, m=infinity);

r := abs(x)^2

> solve(r<1,x);

RealRange(Open(-1), Open(1))

>

i.e., the open interval (-1,1) is the interval of convergence, and the radius of convergence is one.   Thus, we can't expect the series to converge to the function outside the interval [-1,1].  It might or might not converge to the function at the endpoints -1 and 1.  See what you think.  Here is the animation

> for k from 1 to 18 do pl[k]:=display([bp, plot(q[k],x=-1.5..1.5, numpoints=200, title=cat("order = ", convert(degree(q[k],x),string)))]); od:

> display([seq(pl[k], k=1..18)], insequence=true, view=[-1.5..1.5, -2..2]);


[Plot]

Let's examine what happens near the right-hand endpoint more closely.

> bpp := plot(f, x=0.9..1.1, color=blue, view=[0.9..1.1, 0..1.2]): bpp;

[Plot]

> for k from 1 to 18 do pl[k]:=display([line([1,0],[1,2], color=green),bpp, plot(q[k],x=0.9..1.1, numpoints=200, title=cat("order = ", convert(degree(q[k],x),string)))]); od:

> display([seq(pl[k], k=1..18)], insequence=true, view=[0.9..1.1, 0..1.2]);


[Plot]

>

>