in section 4.1, we used the linearization l(x) to approximate a function f (x) near a point x =...

21

Upload: clement-pitts

Post on 20-Jan-2016

214 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: In Section 4.1, we used the linearization L(x) to approximate a function f (x) near a point x = a:Section 4.1 We refer to L(x) as a “first-order” approximation
Page 2: In Section 4.1, we used the linearization L(x) to approximate a function f (x) near a point x = a:Section 4.1 We refer to L(x) as a “first-order” approximation

In Section 4.1, we used the linearization L(x) to approximate a function f (x) near a point x = a:

We refer to L(x) as a “first-order” approximation to f (x) at x = a because f (x) and L(x) have the same value and the same first derivative at x = a:

, ' 'L a f a L a f a

A first-order approximation is useful only in a small interval around x = a. In this section we learn how to achieve greater accuracy over larger intervals using the higher-order approximations.

1 1y y m x x

Page 3: In Section 4.1, we used the linearization L(x) to approximate a function f (x) near a point x = a:Section 4.1 We refer to L(x) as a “first-order” approximation

In what follows, assume that f (x) is defined on an open interval I and that all higher derivatives f (k)(x) exist on I. Let a .IWe say that two functions f (x) and g (x) agree to order n at x = a if their derivatives up to order n at x = a are equal:

, ' ' , " " , '" '" ,

, n n

f a g a f a g a f a g a f a g a

f a g a

g(x) “approximates f (x) to order n” at x = a.

We define the nth Taylor polynomial centered at x = a as follows:

2' "

1! 2! !

nn

n

f a f a f aT x f a x a x a x a

n

Before proceeding to the examples, we write Tn(x) in summation notation:

0 !

jnj

nj

f aT x x a

j

Page 4: In Section 4.1, we used the linearization L(x) to approximate a function f (x) near a point x = a:Section 4.1 We refer to L(x) as a “first-order” approximation

0

1

2

2

2 3

3

'

1' "

21 1

' " "'2 6

T x f a

T x f a f a x a

T x f a f a x a f a x a

T x f a f a x a f a x a f a x a

The first few Taylor polynomials are:

2' "

1! 2! !

nn

n

f a f a f aT x f a x a x a x a

n

Note that T1(x) is the linearization of f (x) at a. Note also that Tn(x) is obtained from Tn−1(x) by adding on a term of degree n:

1 !

nn

n n

f aT x T x x a

n

'L x f x x a f a

0 !

jnj

nj

f aT x x a

j

Page 5: In Section 4.1, we used the linearization L(x) to approximate a function f (x) near a point x = a:Section 4.1 We refer to L(x) as a “first-order” approximation

THEOREM 1 The polynomial Tn(x) centered at a agrees with f (x) to order n at x = a, and it is the only polynomial of degree at most n with this property.

2

2 2

2 2

2 2

1' " ,

2' ' " , ' '

" " , " "

T x f a f a x a f a x a T a f a

T x f a f a x a T a f a

T x f a T a f a

This shows that the value and the derivatives of order up to n = 2 at x = a are equal.

By convention, we regard f (x) as the zeroeth derivative, and thus f (0)(x) is f (x) itself. When a = 0, Tn(x) is also called the nth Maclaurin polynomial.

The 4th Taylor Polynomial

of 1f x x

Page 6: In Section 4.1, we used the linearization L(x) to approximate a function f (x) near a point x = a:Section 4.1 We refer to L(x) as a “first-order” approximation

Maclaurin Polynomials for ex Plot the third and fourth Maclaurin polynomials for f (x) = ex. Compare with the linear approximation.

2 3

3

2 3 444

1 1' " '''

2 61 1 1

' " '''2 6 24

T x f a f a x a f a x a f a x a

T x f a f a x a f a x a f a x a f a x a

2 33

2 3 44

1 11

2 61 1 1

12 6 24

T x x x x

T x x x x x

0 !

jnj

nj

f aT x x a

j

1 !

nn

n n

f aT x T x x a

n

0a

Taylor

Polynomials

'L x f a f a x a

1L x x

Page 7: In Section 4.1, we used the linearization L(x) to approximate a function f (x) near a point x = a:Section 4.1 We refer to L(x) as a “first-order” approximation

2 3 444

1 1 1' " '''

2 6 24T x f a f a x a f a x a f a x a f a x a

Computing Taylor Polynomials Compute the Taylor polynomial T4(x) centered at a = 3 for 1.f x x

2 3 4

4

1 1 1 152 3 3 3 3

4 64 512 49,152T x x x x x

0 !

jnj

nj

f aT x x a

j

Keep practicing this pattern!

1/ 2 3/ 2

5/ 2 7 / 24 4

1 1' 1 , ; " 1 , ;

2 43 15

''' 1 , ; 1 , 8 1

1 1' 3 " 3

4 323 15

''' 3 3256 20486

f x x f x x

f x

f f

fx f x x f

A factor of each coefficient is the output of ...jf a

Page 8: In Section 4.1, we used the linearization L(x) to approximate a function f (x) near a point x = a:Section 4.1 We refer to L(x) as a “first-order” approximation

Linear Approximation The 4th Taylor Polynomial

Page 9: In Section 4.1, we used the linearization L(x) to approximate a function f (x) near a point x = a:Section 4.1 We refer to L(x) as a “first-order” approximation

k

1 1

1 the coefficient of 1 in are

1 ,

:!

1 11

!

!

k

n

k k

fx T x

k

kk

k

k

11 1 !kk kf x k x

4

2 3 4

Evaluate the derivatives up to degree at 1 and look for a pattern:

1 1 2 6ln , ' , " , '''

? ?

,

? a

f x x f x f x f x f xx x x x

Find the Taylor polynomials Tn(x) of f (x) = ln x centered at a = 1.

1

2 3 11 11 1 1 1

2 3

nn

nT x x x x xn

0! 1! 1

0 !

jnj

nj

f aT x x a

j

1 ln 1 0f a f

Page 10: In Section 4.1, we used the linearization L(x) to approximate a function f (x) near a point x = a:Section 4.1 We refer to L(x) as a “first-order” approximation

The derivatives form a repeating pattern of period 4:

0 1

22 3

2 44 5

1

11

2!1 1

1 Do you see a pattern?2! 4!

T x T x

T x T x x

T x T x x x

Cosine Find the Maclaurin polynomials of f (x) = cos x.

4

Evaluate the derivatives up to degree :

cos , ' sin , " cos , ''' sin ,

???

cosf x x f x x f x x f x x f x x

f (j)(x)= f (j+4)(x) . The derivatives at x = 0 also form a pattern:

4 5 6 7 80 ' 0 '' 0 ''' 0 0 0 0 0 0 f f f f f f f f f

1 0 1 0 1 0 1 0 1

2 4 6 22 2 1

1 1 1 11 1 , in 0,1, 2,...

2! 4! 6! 2 !n n

n nT x T x x x x x nn

Coefficients!

2' "

1! 2! !

nn

n

f a f a f aT x f a x a x a x a

n

1 !

nn

n n

f aT x T x x a

n

Page 11: In Section 4.1, we used the linearization L(x) to approximate a function f (x) near a point x = a:Section 4.1 We refer to L(x) as a “first-order” approximation

Scottish mathematician Colin Maclaurin (1698–1746) was a professor in Edinburgh. Newton was so impressed by his work that he once offered to pay part of Maclaurin’s salary.

Would you like to see the accuracy of the

Maclaurin polynomial approximations of cos ?y x

Horizon

Page 12: In Section 4.1, we used the linearization L(x) to approximate a function f (x) near a point x = a:Section 4.1 We refer to L(x) as a “first-order” approximation

2 2

2

1 21 2 1 2

2!

2 2

R R R

R h R h R h

h h

R h R h

How far is the horizon? Valerie is at the beach, looking out over the ocean. How far can she see? Use Maclaurin polynomials to estimate the distance d, assuming that Valerie’s eye level is h = 1.7 m above ground. What if she looks out from a window where her eye level is 20 m? Valerie can see a distance d = Rθ, the length

of the circular arc AH.

22

1cos 1

2!

RT

R h

Our key observation is that θ is close to zero (both θ and h are much smaller than shown in the figure), so we lose very little accuracy if we replace cos θ by its second Maclaurin polynonomial 2

2

1cos 1

2!x T x x

Not drawn

to scale...

, in radians!d r

MaclaurinPolynomials

Page 13: In Section 4.1, we used the linearization L(x) to approximate a function f (x) near a point x = a:Section 4.1 We refer to L(x) as a “first-order” approximation

How far is the horizon? Valerie is at the beach, looking out over the ocean. How far can she see? Use Maclaurin polynomials to estimate the distance d, assuming that Valerie’s eye level is h = 1.7 m above ground. What if she looks out from a window where her eye level is 20 m? Valerie can see a distance d = Rθ, the length

of the circular arc AH.

22

1cos 1

2!

RT

R h

2 2

2

1 21 2 1 2

2!

2 2

R R R

R h R h R h

h h

R h R h

Furthermore, h is very small relative to R, so we may replace R + h by R to obtain

22

hd R R Rh

R

Page 14: In Section 4.1, we used the linearization L(x) to approximate a function f (x) near a point x = a:Section 4.1 We refer to L(x) as a “first-order” approximation

Valerie can see a distance d = Rθ, the length of the circular arc AH.

22

1cos 1

2!

RT

R h

2 2

2

1 21 2 1 2

2!

2 2

R R R

R h R h R h

h h

R h R h

Furthermore, h is very small relative to R, so we may replace R + h by R to obtain

The earth’s radius is approximately R ≈ 6.37 × 106 m, so

2 3569 md Rh h

In particular, we see that d is proportional to .h

Valerie’s eye level is h = 1.7 m 3569 1. 4567 3 md

3569 20 15,961 md

22

hd R R Rh

R

Page 15: In Section 4.1, we used the linearization L(x) to approximate a function f (x) near a point x = a:Section 4.1 We refer to L(x) as a “first-order” approximation

THEOREM 2 Error Bound Assume that f (n+1)(x) exists and is continuous. Let K be a number such that |f (n+1)(u)| ≤ K for all u between a and x. Then

where Tn(x) is the nth Taylor polynomial centered at x = a.

1

1 !

n

n

x af x T x K

n

Using the Error Bound Apply the error bound to |ln 1.2 − T3(1.2)|where T3(x) is the third Taylor polynomial for f (x) = lnx at a = 1. Check your result with a calculator.

2 3

3

1 11 1 1

2 3T x x x x

2

3

1'

1"

2'''

f xx

f xx

f xx

0 1 2 3, , , T x T x T x T x

Page 16: In Section 4.1, we used the linearization L(x) to approximate a function f (x) near a point x = a:Section 4.1 We refer to L(x) as a “first-order” approximation

Using the Error Bound Apply the error bound to

|ln 1.2 − T3(1.2)|

where T3(x) is the third Taylor polynomial for f (x) = ln x at a = 1.Step 1. Find a value of K.

Therefore, we find a value of K such that |f (4)(u)| ≤ K for all u between a = 1 and x = 1.2. As we computed earlier, f (4)(x) = −6x−4

1

1 !

n

n

x af x T x K

n

The size of the error depends on the size of the 1 derivative.st

n

4

2 3 4

1 1 2 6ln , ' , " , ''' , f x x f x f x f x f x

x x x x

6K Step 2. Apply the error bound.

1 4

3 0.01.2 1

ln 1.2 1.2 61

0! !

44

0n

x aT K

n

Step 3. Check the result.

0.0004 3 1.2T

Page 17: In Section 4.1, we used the linearization L(x) to approximate a function f (x) near a point x = a:Section 4.1 We refer to L(x) as a “first-order” approximation

Observe that ln x and T3(x) are indistinguishable near x = 1.2.

Page 18: In Section 4.1, we used the linearization L(x) to approximate a function f (x) near a point x = a:Section 4.1 We refer to L(x) as a “first-order” approximation

Approximating with a Given Accuracy Let Tn(x) be the nth Maclaurin polynomial for f (x) = cos x. Find a value of n such that

| cos 0.2 − Tn(0.2)| < 10−5

Step 1. Find a value of K.

0 1 1nf x K Step 2. Find a value of n.

1

1 !

n

n

x af x T x K

n

1 10.2 0 0.2

cos0.2 0.2 11 ! 1 !

n n

nT Kn n

1

50.210

1 !

n

n

It’s not possible to solve this inequality for n, but we can find a suitable n by checking several values:

2 3 4n

10.2

1 !

n

n

0.0013 56.67 10 6 52.67 10 10 4n

Page 19: In Section 4.1, we used the linearization L(x) to approximate a function f (x) near a point x = a:Section 4.1 We refer to L(x) as a “first-order” approximation

n nR x f x T x The error in Tn(x) is the absolute value |Rn(x)|.

Rn(x) can be represented as an integral.

Taylor’s Theorem: Version I Assume that f (n+1)(x) exists and is continuous. Then

11

!

xn n

n n

a

R x f x T x x u f u dun

Taylor’s Theorem: Version II (Lagrange) Assume f (n+1)(x) exists and is continuous. Then

11,

1 !

for some between and .

nn

n n

f cR x f x T x x a

n

c a x

The th remainder of the Taylor Polynomial...n

Page 20: In Section 4.1, we used the linearization L(x) to approximate a function f (x) near a point x = a:Section 4.1 We refer to L(x) as a “first-order” approximation

For reference, we will include a table of standard Maclaurin and Taylor polynomials.

Page 21: In Section 4.1, we used the linearization L(x) to approximate a function f (x) near a point x = a:Section 4.1 We refer to L(x) as a “first-order” approximation