Taylor Series Approximations - Math

Math 175
Notes and Learning Goals
Lesson 6-4
Taylor Series Approximations
• A function is called analytic if it converges to its Taylor series.
f (x) =
∞
X
an (x − c)n = a0 + a1 (x − c) + a2 (x − c)2 + a3 (x − c)3 + · · ·
n=0
• In this case the N -th order Taylor Polynomial is an approximation of f .
TN (x) =
N
X
an (x − c)n = a0 + a1 (x − c) + a2 (x − c)2 + · · · + aN (x − c)N
n=0
• For example the following graph shows the first few Taylor Polynomials for cos(x).
• Each additional term in the Taylor series makes the approximate closer and closer.
• The error in a Taylor polynomial approximation is related to both the number of terms and the
distance away from the center c.
• Taylor polynomials are important
in computation. They turn complicated calculations (even for
√
elementary functions like x, cos(x), ex , etc) into the operations addition, subtraction, multiplication and division.
• Lots of difficult integrals, limits, and formulas can be simplified by using a Taylor polynomial
approximation
• In many cases you can use just a few terms to get a decent approximation.
1
Taylor Polynomial Error
• The remainder term is the difference between the actual and approximate value
RN (x) = f (x) − TN (x) =
∞
X
f (n) (c)
n=0
n!
(x − c)n −
N
X
f (n) (c)
n=0
n!
(x − c)n =
∞
X
f (n) (c)
(x − c)n
n!
n=N +1
• The error in a Taylor polynomial approximation, TN (x), is
Error = |f (x) − TN (x)| = |RN (x)|
• It can be shown that the remainder term is bounded by
|RN (x)| ≤
M (x − c)N +1
(N + 1)!
Where M is the maximum value of |f N +1 (t)| on the interval [c, x]
• Finding M can be difficult for all except the simple functions.
• The examples in the assignments all use alternating series error estimation as follows.
Alternating Series Error
• In many cases the resulting series is an alternating series
∞
X
(−1)n an = a0 − a1 + a2 − a3 + a4 − a5 + · · ·
n=0
Where a0 > a1 > a2 > a3 > a4 > · · · > 0
• In the case were you alternating adding and subtracting smaller and smaller terms (that approach
zero) the error of the partial sum sN is at most the value of the next term in the series, aN +1 .
• This is useful to find the error in a particular calculation.
Example:
– cos(x) =
∞
X
(−1)n x2n
n=0
∞
X
– cos(0.3) =
n=0
(2n)!
(−1)n (0.3)2n
(2n)!
– The partial sum S3 is
cos(0.3) ≈ S3 = 1 −
(0.3)2 (0.3)4 (0.3)6
+
−
≈ 0.955336
2!
4!
6!
– The error is at most the n = 3 + 1 term:
(0.3)8 ≈ 1.627 × 10−9 = 0.000000001627
Error ≤ (8)! 2
Table of first few Taylor Polynomials
Order (N )
TN (x)
Description
0
T0 (x) = f (c)
Constant Approximation
(Value)
1
T1 (x) = f (c) + f 0 (c)(x − c)
Linear Approximation
(Equation of Tangent Line)
2
3
N
f 00 (c)
(x − c)2
2
Quadratic Approximation
f 00 (c)
f (3) (c)
(x − c)2 +
(x − c)3
2
6
Cubic Approximation
T2 (x) = f (c) + f 0 (c)(x − c) +
T3 (x) = f (c) + f 0 (c)(x − c) +
TN (x) =
N
X
f (n) (c)
n=0
n!
(x − c)n
3
(Concavity)