Lecture 16

advertisement
16. Taylor polynomials
Objectives:
1. Approximate functions by polynomials
2. How to calculate the error term
3. Brush up your analytical skills
This topic is not in BZ.
References
H.Anton, Calculus with Analytic Geometry
S. Grossman, Calculus
G. Thomas & R. Finney, Calculus and analytic geometry
Most Calculus texts in the library will have something.
Introduction
Recall that a polynomial is a function of the form
f (x)  a0  a1 x1  a2 x 2  ....... an x n.
The number n is called the degree (or order) of
 The polynomial and the constants a0, a1,……,an are
The coeeficients of the polynomial.
In certain situations we may be asked to analyse the
Behaviour of a complicated function and an approximation
Will be sufficient.
Taylor polynomials are special polynomials which
are used extensively to do just that - to approximate
Complicated functions.
What do we notice about the graphs?
1. Each graph has the same value (y=1) at x=0.
2. Each polynomial approximtes f(x) near x=0.
3. The more terms we add to the polynomial, the
better our approximation is near x=0.
4. This is only true NEAR x=0!
How did we obtain the sequence of polynomials?
Consider again
f (x)  (1 x)
1
2
3

1
2
f (x)   (1 x)
4

Then
1
2
f (0)  (1 0)  1
And 

5

3
f (x)  (1 x) 2
8
1

2
1
f (x)  (1 x)
2
So

1

1
1
f (0)  (1 0) 2 
2
2

f (0)  
1
4


f (0) 

3
8
Then
p0 (x) 1 f (0)
p1 (x) 1
x
 f (0) f (0).x
2
x x2
x2
p2 (x)  1   f (0)  f (0).x  f (0).
2 82
2
x x x3
p2 (x)  1  
2 8 16
x2
x3
 f (0)  f (0).x  f (0).  f (0).
2
3!
pn (x)  f (0)  f (0).x  f (0).
x2
xn
 ....... f n (0).
2
n!
This is the nth degree Taylor polynomial (at x=0) for f(x).
We call this series the
Taylor polynomial of order n for f(x) about x=0.
• The Taylor polynomial is an approximation to f(x)
about x=0.
• We can specify the number of terms we want by
changing the n. The higher the n, the better the
approximation.
• We need to differentiate the function f, n times.
Example
Find the Taylor polynomial of order 3 about x=0 for
f(x)=sin(x).
Solution
f (x)  sin( x)  f (0)  sin( 0)  0

f (x)  cos(x)  f (0)  cos(0) 1

f (x)  sin( x)  f (0)  sin( 0)  0

So
f (x)  cos(x)
 f3(0)  cos(0)  1
x2
x
p3 (x)  f (0)  f (0).x  f (0).  f (0).
2
3!
2
3
x
x
 0 1.x
 0.  (1).
2
3!
3
x
 x
6
Example
Find the Taylor polynomial of order 4 about x=0 for
f(x)=e-x.
Solution
f (x)  e x  f (0)  e0  1

f (x)  e x  f (0)  e0  1

f (x)  e x  f (0)  e0  1

f (x)  e x  f (0)  e0  1
So
2
x3
x4
 x
p4 (x)  f (0)  f (0).x  f (0).  f (0).  f (iv) (0).
2
3!
4!
2
3
x
x
 1 x  

2 6
f (iv) (x)  e x  f (iv) (0)  e0  1
Example
Find the Taylor polynomial of order 4 about x=3 for
f(x)=1/x.
Solution
f (x) 


f (x)  
f (x) 

f (x)  
4
6
6
2
 f (3)    
4
x
81
27
3
2
1 x  3 (x  3) (x  3) (x  3)
 



3
9
27
81
243
2
3
1
1
 f (3)  
2
x
9
2
2
 f (3) 
3
x
27
(x  3)
(x  3)
pSo
(x)  f (3)  f (3)(x  3)  f (3) 
 f (3)
f
2
1
1
 f (3) 
x
3
3!
4

(iv)
24
24
8
(iv) 4
(x)  5  f (iv) (3) 

(xf  3)
x
243 81
(3)
4!
What if we want to approximate a function near some point
which is not zero?
There is a more general form of Taylor polynomial that we
can use.
The Taylor polynomial of order n for f(x) about x=c is
n
(x  c)2
(x

c)
pn (x)  f (c)  f (c).(x  c)  f (c).
 ....... f n (c).
2
n!
Note that when c=0 this is exactly the version we saw earlier.
You should now be
able to complete
Q’s 3 and 5(I)(ii)
Example Sheet 6
from the Orange Book.
Download