Last week, Ida discussed approximation by linear and quadratic functions.

advertisement
Last week, Ida discussed approximation by linear and quadratic functions.
This week, we will discuss approximation by higher-degree polynomials.
Let f (x) be an n-times differentiable function. The nth order Taylor polynomial for f (x), centered at a, is
1 ′
1
f (a)(x − a) + · · · + f (n) (a)(x − a)
1!
n!
(a Taylor polynomial centered at a = 0 is often called a Maclaurin Polynomial ).
Note that in the above expression, the approximation is centered at a and is
used to approximate f (x). In other words, the value f (a) and f ′ (a), . . . , f (n) (a)
are used to give an approximation for f (x).
This should be thought of as the best approximation to f (x) near x = a
among all polynomials of degree n or less.
Why is this the right expression for Tn (x)? Let’s consider the jth derivative
of Tn (x) at x = a, where j ≤ n. We can see that all of the terms before the
degree term will differentiate to zero if we take j derivatives, and all of the terms
after the degree j term will still have a factor of (x − a) in them after taking j
derivatives, and will therefore vanish at x = a. So the only term that doesn’t
(j)
vanish in Tn (a) is the degree j term, which comes out to f (j) (a). This shows
that the nth degree polynomial has the same jth derivatives as f (x) for every
j ≤ n.
Let’s quickly consider an example.
√
Example 0.1. Use a third-order Taylor polynomial in order to estimate 9.1.
√
√
If we define f (x) = x, then we have that f (9.1) = 9.1. Let’s consider the
derivatives of f (x):
Tn (x) = f (a) +
f (x) = x1/2
1
f ′ (x) = x−1/2
2
−1 −3/2
′′
f (x) =
x
4
3
f ′′′ (x) = x−5/2
8
If we plug in x = 9, we get
f (9) = 3
1
f ′ (9) =
6
−1
′′
f (9) =
108
1
f ′′′ (9) =
648
So the third-degree Taylor polynomial is
T3 (x) = 3 +
1 1
1 −1
1
1
· · (x − 9) + ·
· (x − 9)2 + ·
· (x − 9)3
1! 6
2! 108
3! 648
1
which comes out to
1
1
1
T3 (x) = 3 + (x − 9) −
(x − 9)2 +
· (x − 9)3
6
216
3888
we plug in x = 9.1 and note that x − 9 is
T3 (9.1) = 3 +
1
10 :
1
1
1
−
+
60 21600 3888000
So the third-degree Taylor polynomial is
T3 (x) = 3 +
1 1
1 −1
1
1
· · (x − 9) + ·
· (x − 9)2 + ·
· (x − 9)3
1! 6
2! 108
3! 648
which comes out to
1
1
1
T3 (x) = 3 + (x − 9) −
(x − 9)2 +
· (x − 9)3
6
216
3888
we plug in x = 9.1 and note that x − 9 is
T3 (9.1) = 3 +
1
10 :
1
1
1
−
+
.
60 21600 3888000
We can simplify this fraction if we √
want, but the point is that we managed to
approximate the irrational number 9.1 by a rational number.
Example 0.2. Use the fifth-order MacLaurin polynomial for sin(x) to approximate the value sin(1).
Let’s list out the derivatives of f (x) = sin(x):
f (x) = sin(x)
f ′ (x) = cos(x)
f ′′ (x) = − sin(x)
f (3) (x) = − cos(x)
f (4) (x) = sin(x)
f (5) (x) = cos(x)
So we get
f (0) = 0
f ′ (0) = 1
f ′′ (0) = 0
f (3) (0) = −1
f (4) (0) = 0
f (5) (0) = 1
2
This means that the fifth degree Taylor polynomial is
T5 (x) = 0+
1
1
1
1
1
·1·(x−0)+ ·0·(x−0)2 + ·−1·(x−0)3 + ·0·(x−0)4 + ·1·(x−0)5
1!
2!
3!
4!
5!
which comes out to
T5 (x) = x −
x3
x5
+
6
120
T5 (1) = 1 −
1
1
+
.
6 120
We can now plug in x = 1:
Notice that this approximation isn’t very good compared to the one in example
−1
. The point is that,
1; it’s not too hard to see that the next term should be 5040
as with the linear approximation, the quality of the approximation is worse the
farther the center of the Taylor polynomial is from the desired x-value.
Let’s do one more example:
Example 0.3. Use a 6th-degree Maclaurin polynomial to estimate the value of
e.
Because we’re using a Maclaurin polynomial, we should center our approximation at 0. Let f (x) = ex . We want to approximate f (1). So we first find
T6 (x):
f (x) = ex
f ′ (x) = ex
f ′′ (x) = ex
f (3) (x) = ex
f (4) (x) = ex
f (5) (x) = ex
f (6) (x) = ex
so
f (0) = 1
f ′ (0) = 1
f ′′ (0) = 1
f (3) (0) = 1
f (4) (0) = 1
f (5) (0) = 1
f (6) (0) = 1
So we get that the MacLaurin polynomial is
T6 (x) = 1+
1
1
1
1
1
1
·1·(x−0)+ ·1·(x−0)2 + ·1·(x−0)3 + ·1·(x−0)4 + ·1·(x−0)5 + ·1·(x−0)6
1!
2!
3!
4!
5!
6!
3
we plug in x = 1 and we get the well-known estimate for e:
T6 (1) = 1 + 1 +
1 1
1
1
1
+ +
+
+
.
2 6 24 120 720
4
Download