Applications of Taylor Series
What You’ll Learn
Section titled “What You’ll Learn”In this lesson you’ll see Taylor series in action: approximating function values, estimating errors, and understanding why these approximations work so well in practice.
The Concept
Section titled “The Concept”Taylor Polynomials
Section titled “Taylor Polynomials”The nth-degree Taylor polynomial centered at a is the first n + 1 terms of the Taylor series
This is your approximation. The more terms you keep, the better it matches f(x) near the center.
The Remainder (Error Bound)
Section titled “The Remainder (Error Bound)”The error when using the polynomial instead of the actual function is bounded by the Lagrange remainder
for some c between a and x. You don’t know exactly what c is, but you can bound the (n+1)th derivative on the interval to get a worst-case error estimate.
The key insight: the (n+1) factorial in the denominator grows extremely fast, which is why Taylor approximations get accurate so quickly with just a few terms.
Worked Examples
Section titled “Worked Examples”Example 1: Approximating e
Use the Maclaurin series for e to the x to approximate e (that is, evaluate at x = 1) using terms up to degree 4.
The actual value is e = 2.71828…, so the error is about 0.01. Not bad for just 5 terms.
We can bound the error using the remainder. The 5th derivative of e to the x is still e to the x, and on [0, 1] the maximum is e itself (less than 3)
The actual error (0.00995) is well within this bound.
Each curve shows how the error grows as you move away from x = 0. Higher-degree polynomials (green, blue) keep the error tiny over a much wider range. Near x = 0, all approximations are excellent.
Example 2: Approximating sin(0.1)
Use the Maclaurin series for sin x with the first two nonzero terms
At x = 0.1
The actual value is 0.0998334…, so the error is less than 0.0000004. For small x, even two terms give extraordinary accuracy because the next term involves x to the 5th, which is (0.1)⁵ = 0.00001, divided by 120.
Example 3: Approximating square root of 1.1
Use the Taylor polynomial for f(x) = sqrt(x) centered at x = 1, degree 2.
The derivatives at x = 1
The degree-2 polynomial is
At x = 1.1
The actual value is sqrt(1.1) = 1.04881…, so the error is about 0.00006. The third derivative of sqrt(x) is 3/(8x^(5/2)), which at x = 1 gives 3/8. The remainder bound is
The actual error fits within this bound.
Real-World Application
Section titled “Real-World Application”Taylor approximations are used constantly in computing:
- Game engines approximate sin, cos, and exp with degree-3 or degree-5 polynomials for speed
- Physics simulations linearize equations near equilibrium using degree-1 Taylor polynomials
- Machine learning uses Taylor expansions to analyze how loss functions behave near optima
- Financial models approximate option pricing formulas with polynomial expansions
- Scientific computing uses error bounds to determine how many terms are needed for a given precision