Taylor polynomial approximations

Let f(x)=sinx and let Tn(x) be the Taylor polynomials expanded around c=0.

By considering the alternating series error bound, find the first n for which Tn(0.02) must have error less than 106.

Solution

Write the Maclaurin series of sinx because we are expanding around c=0:

sinx=xx33!+x55!x77!+=n=0(1)nx2n+1(2n+1)!

This series is alternating, so the AST error bound formula applies (“Next Term Bound”):

|En|an+1

Find smallest n such that an+1106, and then we know:

|En|an+1106|En|106

Plug x=0.02 in the series for sinx:

a2n+1=(0.02)2n+1(2n+1)!

Solve for the first time a2n+1106 by listing the values:

0.0211!=0.02,0.0233!1.33×106,0.0255!2.67×1011,

The first time a2n+1 is below 106 happens when 2n+1=5.

This is NOT the same n as in Tn. That n is the highest power of x allowed.

The sum of prior terms is T4(0.02).

Since T4(x)=T3(x) because there is no x4 term, the final answer is n=3.

Taylor polynomials to approximate a definite integral

Approximate 00.3ex2dx using a Taylor polynomial with an error no greater than 105.

Solution

Plug u=x2 into the series of eu:

eu=n=0unn!ex2=n=0(x2)nn!n=0(1)n1n!x2n

Find an antiderivative by terms:

n=0(1)n1n!x2ndxn=0(1)n1n!x2n+12n+1x11!(3)x3+12!(5)x513!(7)x7+

Plug in bounds for definite integral:

00.3n=0(1)n1n!x2n=n=0(1)n1n!x2n+12n+1|00.3n=0(1)n1n!(0.3)2n+12n+10.3(0.3)33+(0.3)510(0.3)742+

Notice alternating series pattern. Apply error bound formula, “Next Term Bound”:

(0.3)5102.43×104,(0.3)7425.21×106

So we can guarantee an error less than 5.21×106 by summing the first terms through (0.3)510:

0.3(0.3)33+(0.3)510=0.291243