taylor series.pdf

TAYLOR POLYNOMIALS AND TAYLOR SERIES
The following notes are based in part on material developed by Dr. Ken Bube of the
University of Washington Department of Mathematics in the Spring, 2005.
1 Taylor Polynomials
The tangent line to the graph of y = f(x) at the point x = a is the line going through the
point (a, j(a)) that has slope f '(a). By the point-slope form of the equation of a line, its
equation is
Y- f(a) = f'(a)(x- a)
Y = f(a) + f'(a)(x- a)
As you have seen in Math 124, the tangent line is a very good approximation toy= f(x)
near x = a, as shown in Figure 1.
y
y=f(a)+f(a)(x -*<·a)
X
FIGURE 1. The line y = j(a) + j'(a)(x- a) tangent to the graph ofy = f(x)
at the point (a, f(a)).
We will give a name,
~(x),
to the function corresponding to the tangent line:
~(x) =
f(a) + f'(a)(x- a)
For x near x = a, we have
f(x)
z
~(x).
The tangent line function ~(x) is called the Taylor polynomial of degree one for f(x), centered
at x = a. Notice that it satisfies the two conditions
~(a)
f(a)
and
~'(a)=/'(a).
In other words, ~ (x) is the polynomial of degree one that has the same function value at x = a
and the same first derivative value at x = a as the original functions f(x).
We can get a better approximation, T2 (x) near x
= a,
using a parabola (a polynomial of degree
two). The formula for T2 (x) is
f"(a)
2
J;(x) = f(a) + f'(a)(x- a)+ - - ( x- a) .
2
T2 (x) is called the Taylor polynomial of degree two for f(x), centered at x
=a.
Since I; '(x) = f'(a)+ f"(a)(x- a) and T2 "(x) = f"(a), J;(x) satisfies the three conditions
T' 2 (a) = f'(a)
and
T2 "(a)= f"(a).
In other words, J;(x) is the polynomial of degree two that has the same function value
at x = a, the same first derivative value at x = a, and the same second derivative value at x
as the original function f(x).
Example 1.1
Find the Taylor polynomials of degrees one and two for f(x) =ex, centered at x = 0.
Solution: Since f(x)
= f'(x) = f"(x) =ex, we have f(O) = f'(O) = f"(O) = e0 =1, so the
Taylor polynomial of degree one (the tangent line to y =ex at the point (0, 1)) is
~ (X)
= j (0) + j '(0)(X -
0)
1+ X •
The Taylor polynomial of degree two (the parabola that best fits y
= ex
/"(0)
2
x2
J;(x) = f(O)+ f'(O)(x-0)+--(x-0) = 1+x+
2
2
near x = 0) is
.
=a
X
0
FIGURE 2. The Taylor
at x = 0. Notice that
polynomials~(x)
~ ( x)
and T2 (x) forf(x) =ex, centered
does a better job of matching f(x) near x = 0.
We can get an even better approximation, J;(x) near x =a, using a cubic (a polynomial of
degree three). The formula for J;(x) is
T, (x) = f( a)+ f'(a)(x- a)+ f';a) (x- a)'+ !"~(a) (x- a)'
J;(x)is call the Taylor polynomial of degree three for f(x). centered atx =a. A short
computation (Exercise 1.1, problem 3) shows that J;(x) satisfies the four conditions
I; (x) = f(a),
I; '(x) =/'(a),
I; "(x) =/"(a),
and
T. "'(x) = f"'(a) .
.)
In other words, J;(x) is the polynomial of degree three that has the same function value
at x = a, the same first derivative value at x = a, the same second derivative value at x = a, and
the same third derivative value at x =a, as the original function f(x).
Example 1.2
Find the Taylor polynomial of degree three for f(x) = sin x, centered at x = 5% .
Solution:
J(x)=sinx,
1(5%)=
Yz,
J'(x)=cosx,
1'(5%)
-%,
f"(x)=-sinx,
!"(5%)
-
1(x)=-cosx,
1"'(5%)=~%,
Yz,
FIGURE 3. The Taylor polynomial J;(x) for f(x) =sin x, centered at x =5%.
DEFINITION:
Let the function f and its first n derivatives exist on the closed interval
[x 0 , x 1]. Then, for a E (x 0 , x 1) and x E (x 0 , x 1) the nth degree Taylor polynomial off
at a is the nth degree polynomial Pn(x), given by
Pn(x)
f'(a)
= f(a) + -
(x - a)
11
f(n)(a)
+ - - (x -
at
n!
1
3!
n f(k)(a)(x - a)k
21
I
=
f"'(a)
+ - - (x -
(x - a) 2
Solution.
We have f(x) = sin x, f' (x)
=x
f'(O)
f"(O)
{1)
1!
2!
3!
= sin x
0, f'(O)
x5
x3
f"'(O) 3
x
3!
x5
51
6
120
+ - x + - - x2 +
x3
+ · ··
at 0.
=
cos x, f" (x) = -sin x, f"' (x)
= sin x, and f( 5 l(x) = cos x. Then f(O) =
= 0, f( 5 l(o) 1, and we obtain
P5(x) =f(O)
a) 3
k!
k=O
Calculate the fifth-degree Taylor polynomial of f(x)
f( 4 l(x)
f( 4 l(o)
EXAMPLE 2
f"(a)
+-
-cos x,
= 1, f"(O) = 0, f"'(O) =
f( 4 l(O)
f( 5 l(O)
41
51
-1,
+--x4 + - - x5
+-=x--+-.
=
Calculate the fifth-degree Taylor polynomial of f(x)
sin x at n/6.
±,
Solution. Using the derivatives found in Example 1, we have f(n/6) = f'(n/6) =
f"(n/6) =
f"'(n/6) = -.}3/2, J< 4 l(n/6) = i, and f( 5 l(rc/6)
Ji/2,
so that in this case
-±,
Ps(x) =
~ + .j3
2
2
(x- ~)- ~ [x-
1 [x
+-2
3
2
6
(n/6)]
4
4!
=
f'(x)
= f"(x) = · · · = f(
x2
x3
x4
21
31
41
2
(n/6)] 3
31
.j3 [x- (n/6)] 5
+2- - -5!- ­
Find the eighth-degree Taylor polynomial of f(x)
Here f(x)
.j3 [x-
(n/6)]2
21
8
= ex at
0.
l(x) =ex, and e0
xs
x6
x7
xs
51
61
7!
81
P(x)=l+x+-+-+-+-+-+-+-=
8
1, so that
8
xk
I-.
o ld
k=
EXAMPLE 4
Find the fifth-degree Taylor polynomial of f(x)
Solution.
= 1/(1
Here,
1
f(x)=--,
f'(x)
1-x
=
f'"(x)
Thus, f(O)
=
Ps(x)
6
(1 - x) 4
1, f'(O)
=
1
= ----:-­
(1­
24
f( 4 l(x) =
,
1, f"(O)
2x2
=
(1 - x) 5
=
2, f'"(O)
6x 3
+ 3! +
24x4
4!
(1 ­ x)
4
6, [( )(0)
= 24, f( 5 l(x) = 120, and
120x 5
=
1
+x+
=
1
+ x + x2 + x 3 + x 4 + x 5
2!
120
f( 5l(x) = - .
6
,
+ -5-!­
5
=
I xk.
k=O
Drm
In Problems 1-26, a function f, a positive integer n, and
a real number a are specified. Find the nth-degree Taylor
polynomial off at a. [Note: In some nth-degree Taylor
polynomials, the coefficient of xn is zero.]
I. f(x) = cos x; a = n/4; n = 6
2. f(x) = j;c; a
1; n = 4
3. f(x) = In x; a = e; n = 5
4. f(x) = ln (1 + x); a = 0; n
5
I
5. f(x) =-;a
I; n
= ---·
1+
12. f(x)
=
13.
14.
15.
16.
=4
1
11. f(x)
f(x)
f(x)
f(x)
f(x)
I
6. f(x)
7.
8.
9.
10.
=
+
I
= 0; n =
f(x) = tan x; a = 0;
f(x) = tan- 1 x; a =
f(x) = tan x; a = n;
f(x) = tan - i x; a=
21. f(x)
22. f(x)
23. f(x)
=
=
=
n= 4
0; n = 6
n= 4
I; n = 6
+ x + x2 + · · · + xn =
=
I; n
=
10
n
I
xk.
k=O
28. Show that the nth-degree Taylor polynomial of
f(x) = ln(I + x) at 0 is
x2
2
=
+
x3
3
x4
- -'-­ + ... + (- It
4
xk
n
I (- I)k
k= 1
-1
T.
I\
a= 0; n = 4
19. f('::) = eflx, j3 real; a = 0; n = 6
20. f(x) = sin(j3x), /3 real; a
0; n = 6
sin- 1 x; a = 0; n = 3
I +x +
a= 0; n = IO
2
ao + a1 x + a 2 x +
a
x- -
4
5
27. Show that the nth-degree Taylor polynomial of
f(x) = I/(I - x) at 0 is
I
0; n
a= 4; n = 3
1
a
=
=sinh x; a= 0; n = 4
= cosh x; a = 0; n
4
= In sin x; a = n/2; n = 3
= In cos x; a = 0; n 3
X
I
a
-
xn
1 -
n
24. f(x)
25. f(x)
26. f(x)
=
=
=
ex
2
;
sin
cos
a
= 0; n = 4
a = 0; n = 4
a = 0; n = 4
(x - e)
(x - e) 2
(x - e) 3
e
2e
3e
3. 1
+ - - - - -2- + - 3
7. x
+
1
17. 2
+
9. (x- rc)
1
x
3
+
. 2!
x2
23. (a 0
25. x 2
-
3 .5
+
. 3!
(fi3t
3
2
19. 1 +fix+
+
fi ) x +
( 2(
2
)
x
3
e) 4
(x
rc) 3
x3
+
(fi
(x- e) 5
11. 1 - x 2
3 .5 . 7 4
x
1
-
. 4!
4
+ 4T )
+
4
x
(fi
2
5
+ 5!)
+ a 1 + a 2 + a 3 ) + (a 1 + 2a 2 + 3a 3 )(x-
1)
x
5
(x- 1)
5. 1
+
13. x
1
+-
x
16
(p
+-
3
256
6
+ 6J)
x
6
+ (a 2 + 3a 3 )(x­
x2
+ (x-
+
- (x- 1) 3
- rc/2f
15.
5
35
2,048
65,536
+ - - x3 +
+ (x
x
4
1) 4