54
Maclaurin and Taylor Polynomials Objective: Improve on the local linear approximation for higher order polynomials.

Maclaurin and Taylor Polynomials Objective: Improve on the local linear approximation for higher order polynomials

Embed Size (px)

DESCRIPTION

Local Quadratic Approximations If the graph of a function f has a pronounced “bend” at x 0, then we can expect that the accuracy of the local linear approximation of f at x 0 will decrease rapidly as we progress away from x.

Citation preview

Page 1: Maclaurin and Taylor Polynomials Objective: Improve on the local linear approximation for higher order polynomials

Maclaurin and Taylor Polynomials

Objective: Improve on the local linear approximation for higher

order polynomials.

Page 2: Maclaurin and Taylor Polynomials Objective: Improve on the local linear approximation for higher order polynomials

Local Quadratic Approximations• Remember we defined the local linear approximation

of a function f at x0 as . In this formula, the approximating function

is a first-degree polynomial. The local linear approximation of f at x0 has the property that its value

and the value of its first derivative match those of f at x0.

))(()()( 00/

0 xxxfxfxf

))(()()( 00/

0 xxxfxfxp

Page 3: Maclaurin and Taylor Polynomials Objective: Improve on the local linear approximation for higher order polynomials

Local Quadratic Approximations• If the graph of a function f has a pronounced “bend”

at x0 , then we can expect that the accuracy of the local linear approximation of f at x0 will decrease rapidly as we progress away from x.

Page 4: Maclaurin and Taylor Polynomials Objective: Improve on the local linear approximation for higher order polynomials

Local Quadratic Approximations• One way to deal with this problem is to approximate

the function f at x0 by a polynomial p of degree 2 with the property that the value of p and the values of its first two derivatives match those of f at x0. This ensures that the graphs of f and p not only have the same tangent line at x0 , but they also bend in the same direction at x0. As a result, we can expect that the graph of p will remain close to the graph of f over a larger interval around x0. The polynomial p is called the local quadratic approximation of f at x = x0.

Page 5: Maclaurin and Taylor Polynomials Objective: Improve on the local linear approximation for higher order polynomials

Local Quadratic Approximations• We will try to find a formula for the local quadratic

approximation for a function f at x = 0. This approximation has the form where c0 , c1 , and c2 must be chosen so that the values of

and its first two derivatives match those of f at 0. Thus, we want

2210)( xcxccxp

2210)( xcxccxf

)0()0(),0()0(),0()0( ////// fpfpfp

Page 6: Maclaurin and Taylor Polynomials Objective: Improve on the local linear approximation for higher order polynomials

Local Quadratic Approximations• The values of p(0), p /(0), and p //(0) are as follows:

2210)( xcxccxp 0)0( cp

xccxp 21/ 2)(

2// 2)( cxp

1/ )0( cp

2// 2)0( cp

Page 7: Maclaurin and Taylor Polynomials Objective: Improve on the local linear approximation for higher order polynomials

Local Quadratic Approximations• Thus it follows that

• The local quadratic approximation becomes

)0(0 fc )0(/1 fc 2)0(//

2fc

2210)( xcxccxp 2

210)( xcxccxf

2//

/

2)0()0()0()( xfxffxf

Page 8: Maclaurin and Taylor Polynomials Objective: Improve on the local linear approximation for higher order polynomials

Example 1• Find the local linear and local quadratic

approximations of ex at x = 0, and graph ex and the two approximations together.

Page 9: Maclaurin and Taylor Polynomials Objective: Improve on the local linear approximation for higher order polynomials

Example 1• Find the local linear and local quadratic

approximations of ex at x = 0, and graph ex and the two approximations together.

• f(x)= ex, so

• The local linear approximation is

• The local quadratic approximation is

1)0( 0/ ef1)0( 0 ef 1)0( 0// ef

xex 1

21

2xxe x

Page 10: Maclaurin and Taylor Polynomials Objective: Improve on the local linear approximation for higher order polynomials

Example 1• Find the local linear and local quadratic

approximations of ex at x = 0, and graph ex and the two approximations together.

• Here is the graph of the three functions.

Page 11: Maclaurin and Taylor Polynomials Objective: Improve on the local linear approximation for higher order polynomials

Maclaurin Polynomials• It is natural to ask whether one can improve the

accuracy of a local quadratic approximation by using a polynomial of degree 3. Specifically, one might look for a polynomial of degree 3 with the property that its value and the values of its first three derivatives match those of f at a point; and if this provides an improvement in accuracy, why not go on to polynomials of higher degree?

Page 12: Maclaurin and Taylor Polynomials Objective: Improve on the local linear approximation for higher order polynomials

Maclaurin Polynomials• We are led to consider the following problem:

Page 13: Maclaurin and Taylor Polynomials Objective: Improve on the local linear approximation for higher order polynomials

Maclaurin Polynomials• We will begin by solving this problem in the case

where x0 = 0. Thus, we want a polynomial

• such that)0()0(),...,0()0(),0()0(),0()0( ////// nn pfpfpfpf

nnxcxcxcxccxp ...)( 3

32

210

Page 14: Maclaurin and Taylor Polynomials Objective: Improve on the local linear approximation for higher order polynomials

Maclaurin Polynomials• But we know that

nn

nn

nn

nn

nn

cnnnxp

xcnnncxp

xcnnxccxp

xncxcxccxp

xcxcxcxccxp

)...2)(1()(

.

.)2)(1(...23)(

)1(...232)(

...32)(

...)(

33

///

232

//

12321

/

33

2210

Page 15: Maclaurin and Taylor Polynomials Objective: Improve on the local linear approximation for higher order polynomials

Maclaurin Polynomials• But we know that

• Thus we need

33//////

2////

1//

0

!323)0()0(

2)0()0(

)0()0(

)0()0(

ccpf

cpf

cpf

cpf

nn

nn

nn

nn

nn

cnnnxp

xcnnncxp

xcnnxccxp

xncxcxccxp

xcxcxcxccxp

)...2)(1()(

.

.)2)(1(...23)(

)1(...232)(

...32)(

...)(

33

///

232

//

12321

/

33

2210

Page 16: Maclaurin and Taylor Polynomials Objective: Improve on the local linear approximation for higher order polynomials

Maclaurin Polynomials• This yields the following values for the coefficients of

p(x)

!)0(

.

.!3)0(

!2)0(

)0(

)0(

///

3

/

2

/1

0

nfc

fc

fc

fc

fc

n

n

Page 17: Maclaurin and Taylor Polynomials Objective: Improve on the local linear approximation for higher order polynomials

Maclaurin Polynomials• This leads us to the following definition.

Page 18: Maclaurin and Taylor Polynomials Objective: Improve on the local linear approximation for higher order polynomials

Example 2

• Find the Maclaurin Polynomials p0 , p1, p2 , p3, and pn for ex.

Page 19: Maclaurin and Taylor Polynomials Objective: Improve on the local linear approximation for higher order polynomials

Example 2

• Find the Maclaurin Polynomials p0 , p1, p2 , p3, and pn for ex.

• We know that

• so

1)0()0()0()0()0( ////// nfffff

!;!

...2

1)(

621

!3)0(

2)0()0()0()(

21

!2)0()0()0()(

1)0()0()(

1)0()(

2

32///2///

3

22///

2

/1

0

memorizenxxxxp

xxxfxfxffxp

xxxfxffxp

xxffxp

fxp

n

n

Page 20: Maclaurin and Taylor Polynomials Objective: Improve on the local linear approximation for higher order polynomials

Example 2

• Find the Maclaurin Polynomials p0 , p1, p2 , p3, and pn for ex.

• The graphs of ex and all four approximations are shown.

Page 21: Maclaurin and Taylor Polynomials Objective: Improve on the local linear approximation for higher order polynomials

Taylor Polynomials• Up to now we have focused on approximating a

function f in the vicinity of x = 0. Now we will consider the more general case of approximating f in the vicinity of an arbitrary domain value x0.

Page 22: Maclaurin and Taylor Polynomials Objective: Improve on the local linear approximation for higher order polynomials

Taylor Polynomials• Up to now we have focused on approximating a

function f in the vicinity of x = 0. Now we will consider the more general case of approximating f in the vicinity of an arbitrary domain value x0.

• The basic idea is the same as before; we want to find an nth-degree polynomial p with the property that its value and the values of its first n derivatives match those of f at x0. However, rather than expressing p(x) in powers of x, it will simplify the computation if we express it in powers of x – x0; that is

nn xxcxxcxxccxp )(...)()()( 0

202010

Page 23: Maclaurin and Taylor Polynomials Objective: Improve on the local linear approximation for higher order polynomials

Taylor Polynomial• This leads to the following definition:

Page 24: Maclaurin and Taylor Polynomials Objective: Improve on the local linear approximation for higher order polynomials

Example 3• Find the first four Taylor Polynomials for lnx about

x = 2.

Page 25: Maclaurin and Taylor Polynomials Objective: Improve on the local linear approximation for higher order polynomials

Example 3• Find the first four Taylor Polynomials for lnx about

x = 2.• Let f(x) = lnx. Thus

3///

2//

/

/2)(

/1)(

/1)(

ln)(

xxf

xxf

xxf

xxf

4/1)2(

4/1)2(

2/1)2(

2ln)2(

///

//

/

f

f

f

f

Page 26: Maclaurin and Taylor Polynomials Objective: Improve on the local linear approximation for higher order polynomials

Example 3• Find the first four Taylor Polynomials for lnx about

x = 2.• This leads us to:

32412

81

21

3

281

21

2///

2

21/

1

0

)2()2()2(2ln)(

)2()2(2ln2)2()2()2)(2()2()(

)2(2ln)2)(2()2()(

2ln)2()(

xxxxp

xxxfxffxp

xxffxp

fxp 4/1)2(

4/1)2(

2/1)2(

2ln)2(

///

//

/

f

f

f

f

Page 27: Maclaurin and Taylor Polynomials Objective: Improve on the local linear approximation for higher order polynomials

Example 3• Find the first four Taylor Polynomials for lnx about

x = 2.• The graphs of all five polynomials are shown.

Page 28: Maclaurin and Taylor Polynomials Objective: Improve on the local linear approximation for higher order polynomials

Sigma Notation• Frequently we will want to express a Taylor

Polynomial in sigma notation. To do this, we use the notation f k(x0) to denote the kth derivative of f at x = xo , and we make the connection that f 0(x0) denotes f(x0). This enables us to write

nn

kn

k

k

xxnxfxxxfxfxx

kxf )(

!)(...))(()()(

!)(

00

00/

000

0

Page 29: Maclaurin and Taylor Polynomials Objective: Improve on the local linear approximation for higher order polynomials

Example 4• Find the nth Maclaurin polynomials for

(a) (b) (c)xcosxsinx11

Page 30: Maclaurin and Taylor Polynomials Objective: Improve on the local linear approximation for higher order polynomials

Example 4• Find the nth Maclaurin polynomials for

(a) (b) (c)

(a)

xcosxsinx11

xxf

xxf

xxf

xxf

cos)(

sin)(

cos)(

sin)(

///

//

/

1)0(

0)0(

1)0(

0)0(

///

//

/

f

f

f

f

Page 31: Maclaurin and Taylor Polynomials Objective: Improve on the local linear approximation for higher order polynomials

Example 4• Find the nth Maclaurin polynomials for

(a) (b) (c)

(a) This leads us to:

xcosxsinx11

!50

!300)(

0!3

00)(

!300)(

00)(0)(0)(

53

5

3

4

3

3

2

1

0

xxxxp

xxxp

xxxp

xxpxxp

xp

1)0(

0)0(

1)0(

0)0(

///

//

/

f

f

f

f

Page 32: Maclaurin and Taylor Polynomials Objective: Improve on the local linear approximation for higher order polynomials

Example 4• Find the nth Maclaurin polynomials for

(a) (b) (c)

(a) This leads us to:

xcosxsinx11

)!12()1(...

!7!5!3)(

12753

kxxxxxxpk

k

Page 33: Maclaurin and Taylor Polynomials Objective: Improve on the local linear approximation for higher order polynomials

Example 4• Find the nth Maclaurin polynomials for

(a) (b) (c)

(a) The graphs are shown.

xcosxsinx11

Page 34: Maclaurin and Taylor Polynomials Objective: Improve on the local linear approximation for higher order polynomials

Example 4• Find the nth Maclaurin polynomials for

(a) (b) (c)

(b) We start with:

xcosxsinx11

xxf

xxf

xxf

xxf

sin)(

cos)(

sin)(

cos)(

///

//

/

0)0(

1)0(

0)0(

1)0(

///

//

/

f

f

f

f

Page 35: Maclaurin and Taylor Polynomials Objective: Improve on the local linear approximation for higher order polynomials

Example 4• Find the nth Maclaurin polynomials for

(a) (b) (c)

(b) This leads us to:

xcosxsinx11

!6!4!21)(

!4!21)(

!21)(

1)(

642

6

42

4

2

2

0

xxxxp

xxxp

xxp

xp

Page 36: Maclaurin and Taylor Polynomials Objective: Improve on the local linear approximation for higher order polynomials

Example 4• Find the nth Maclaurin polynomials for

(a) (b) (c)

(b) This leads us to:

xcosxsinx11

)!2()1(...

!6!4!21)(

2642

kxxxxxpk

k

Page 37: Maclaurin and Taylor Polynomials Objective: Improve on the local linear approximation for higher order polynomials

Example 4• Find the nth Maclaurin polynomials for

(a) (b) (c)

(b) The graphs are shown.

xcosxsinx11

Page 38: Maclaurin and Taylor Polynomials Objective: Improve on the local linear approximation for higher order polynomials

Example 4• Find the nth Maclaurin polynomials for

(a) (b) (c)

You need to memorize these!

xcosxsinx11

)!12()1(...

!7!5!3sin

12753

kxxxxxxk

k

)!2()1(...

!6!4!21cos

2642

kxxxxxk

k

Page 39: Maclaurin and Taylor Polynomials Objective: Improve on the local linear approximation for higher order polynomials

Example 4• Find the nth Maclaurin polynomials for

(a) (b) (c)

You need to memorize these!

xcosxsinx11

)!12()1(...

!7!5!3sin

12753

kxxxxxxk

k

)!12()2()1(...

!7)2(

!5)2(

!3)2(22sin

12753

kxxxxxx

kk

Page 40: Maclaurin and Taylor Polynomials Objective: Improve on the local linear approximation for higher order polynomials

Example 4• Find the nth Maclaurin polynomials for

(a) (b) (c)

You need to memorize these!

xcosxsinx11

)!12()1(...

!7!5!3sin

12753

kxxxxxxk

k

)!12()()1(...

!7)(

!5)(

!3)(sin

12272523222

kxxxxxx

kk

Page 41: Maclaurin and Taylor Polynomials Objective: Improve on the local linear approximation for higher order polynomials

Example 4• Find the nth Maclaurin polynomials for

(a) (b) (c)

(c) We start with:

xcosxsinx11

24)(;6)(

;2)0(;1)0(;1)0(///////

///

xfxf

fff

Page 42: Maclaurin and Taylor Polynomials Objective: Improve on the local linear approximation for higher order polynomials

Example 4• Find the nth Maclaurin polynomials for

(a) (b) (c)

(c) We start with:

xcosxsinx11

15////

4///

3//

2/

)1(!)(;

)1(234)(;

)1(23)(

;)1(

2)(;)1(

1)(;11)(

kk

xkxf

xxf

xxf

xxf

xxf

xxf

24)0(;6)0(

;2)0(;1)0(;1)0(///////

///

ff

fff

Page 43: Maclaurin and Taylor Polynomials Objective: Improve on the local linear approximation for higher order polynomials

Example 4• Find the nth Maclaurin polynomials for

(a) (b) (c)

(c) This leads us to

• You should memorize this as well.

xcosxsinx11

nxxxx

...111 2

Page 44: Maclaurin and Taylor Polynomials Objective: Improve on the local linear approximation for higher order polynomials

The nth Remainder• It will be convenient to have a notation for the error

in the approximation . Accordingly, we will let denote the difference between f(x) and its nth Taylor polynomial: that is

• This can also be written as:

)(xRn

)()( xpxf n

Page 45: Maclaurin and Taylor Polynomials Objective: Improve on the local linear approximation for higher order polynomials

The nth Remainder• The function is called the nth remainder for the

Taylor series of f, and the formula below is called Taylor’s formula with remainder.

)(xRn

Page 46: Maclaurin and Taylor Polynomials Objective: Improve on the local linear approximation for higher order polynomials

The nth Remainder• Finding a bound for gives an indication of the

accuracy of the approximation . The following theorem provides such a bound.

• The bound, M, is called the Lagrange error bound.

)(xRn)()( xfxpn

Page 47: Maclaurin and Taylor Polynomials Objective: Improve on the local linear approximation for higher order polynomials

Example 6• Use an nth Maclaurin polynomial for to

approximate e to five decimal places.

xe

Page 48: Maclaurin and Taylor Polynomials Objective: Improve on the local linear approximation for higher order polynomials

Example 6• Use an nth Maclaurin polynomial for to

approximate e to five decimal places. • The nth Maclaurin polynomial for is

• from which we have

xe

!...

!21

!

2

0 kxxx

kx kn

k

k

xe

!1...

!2111

!10

1

nkee

n

k

k

Page 49: Maclaurin and Taylor Polynomials Objective: Improve on the local linear approximation for higher order polynomials

Example 6• Use an nth Maclaurin polynomial for to

approximate e to five decimal places.• Our problem is to determine how many terms to

include in a Maclaurin polynomial for to achieve five decimal-place accuracy; that is, we want to choose n so that the absolute value of the nth remainder at x = 1 satisfies

xe

000005.|)1(| nR

xe

Page 50: Maclaurin and Taylor Polynomials Objective: Improve on the local linear approximation for higher order polynomials

Example 6• Use an nth Maclaurin polynomial for to

approximate e to five decimal places.• To determine n we use the Remainder Estimation

Theorem with , and I being the interval [0, 1]. In this case it follows that

• where M is an upper bound on the value of for x in the interval [0, 1].

0,1,)( 0 xxexf x

)!1(|)1(|

nMRn

xe

xn exf )(1

Page 51: Maclaurin and Taylor Polynomials Objective: Improve on the local linear approximation for higher order polynomials

Example 6• Use an nth Maclaurin polynomial for to

approximate e to five decimal places.• However, is an increasing function, so its maximum

value on the interval [0, 1] occurs at x = 1; that is, on this interval. Thus, we can take M = e to

obtaineex

)!1(|)1(|

neRn

xe

xe

Page 52: Maclaurin and Taylor Polynomials Objective: Improve on the local linear approximation for higher order polynomials

Example 6• Use an nth Maclaurin polynomial for to

approximate e to five decimal places.• Unfortunately, this inequality is not very useful

because it involves e, which is the very quantity we are trying to approximate. However, if we accept that e < 3, then we can use this value. Although less precise, it is more easily applied.

)!1(3|)1(|

n

Rn

xe

Page 53: Maclaurin and Taylor Polynomials Objective: Improve on the local linear approximation for higher order polynomials

Example 6• Use an nth Maclaurin polynomial for to

approximate e to five decimal places.• Thus, we can achieve five decimal-place accuracy by

choosing n so that or

• This happens when n = 9.

000005.)!1(

3

n

xe

000,600)!1( n

Page 54: Maclaurin and Taylor Polynomials Objective: Improve on the local linear approximation for higher order polynomials

Homework

• Page 684• 1, 3, 7, 9, 11, 15-21 odd• 31, 32