Taylor Polynomial

Download as PDF

Ever wonder how your calculator instantly finds the sine of an angle or the value of ex? The answer lies in a powerful math tool called a Taylor polynomial, which uses simple building blocks to approximate much more complicated functions near a specific point.

What Is a Taylor Polynomial?

A Taylor polynomial is a special type of polynomial used to approximate more complicated functions near a specific point. Imagine you have a very curvy and complex road, but you want to describe a small piece of it using simple, straight sections of track. A Taylor polynomial does something similar for functions. It builds a simple, predictable polynomial function (like y=2x23x+5) that acts just like a more complex function (like y=cos(x)) as long as you stay close to a chosen starting point.

The core idea is to "match" the behavior of the complex function at that specific point. We start by matching the function's value. Then, for a better approximation, we match its slope (how steep it is). For an even better fit, we match its curvature (how much it bends). Each time we add a new term to our polynomial, we match another level of behavior, making our approximation more and more accurate around our chosen point.

These approximations are incredibly useful in science, engineering, and computer science because they allow us to replace difficult calculations with simpler arithmetic that computers can perform at lightning speed.

Why Do We Even Need to Approximate Functions?

It might seem strange to replace a perfectly good function with an approximation, but there are very important reasons to do so. Many functions that are essential in the real world are surprisingly difficult to calculate directly.

Consider functions like f(x)=sin(x), g(x)=ln(x), or h(x)=ex. There is no simple arithmetic recipe (using just addition, subtraction, multiplication, and division) to find that sin(15) is exactly 0.258819.... Your calculator doesn't have a giant list of every possible value. Instead, it uses a very accurate polynomial approximation to compute the value on the spot.

Here are a few key reasons why approximations are critical:

  • Speed: Polynomials only involve basic arithmetic. Computers are incredibly fast at these operations, allowing for rapid calculations in everything from video games to weather forecasting.
  • Simplicity: In many physics and engineering problems, using the exact function makes the equations impossible to solve. Replacing it with a Taylor polynomial can make the problem manageable while still giving a very accurate answer.
  • Predicting Behavior: Sometimes we only need to understand how a function behaves near a certain point. A simple linear or quadratic approximation can tell us if the function is increasing, decreasing, or at a peak or valley, which is often all the information we need.

How Do We Build an Approximation by 'Matching'?

The magic of a Taylor polynomial is in how it systematically matches a function's properties at a specific point, which we'll call x=a. Let's call our original, complicated function f(x) and our polynomial approximation P(x). We want to make P(x) look and act like f(x) near x=a.

We build the approximation in layers:

  1. Level 0 Match (Value): The most basic requirement is that our approximation has the same value as the function at our chosen point. We force P(a)=f(a). This is called a 0th-degree approximation, which is just a constant. It's not very good, but it's a start!
  2. Level 1 Match (Slope): To improve the fit, we should also match the steepness, or slope, of the function at x=a. A line that has the same value and the same slope as a curve at a point is called the tangent line. This gives us a 1st-degree (linear) approximation, which is much better.
  3. Level 2 Match (Curvature): A line is straight, but our original function is probably curved. The next step is to match the bend, or curvature, of the function at x=a. This requires adding an x2 term, giving us a 2nd-degree (quadratic) approximation. This parabola will "hug" the original function's curve much more closely than a straight line could.

By continuing this process—matching higher and higher orders of change—we can create polynomials of any degree that become increasingly accurate approximations of the original function near our point a.

How to Build a First-Degree Taylor Polynomial (A Linear Approximation)

A first-degree Taylor polynomial is simply a straight line that best approximates a function at a point. This line is formally known as the tangent line. To build it, we need two pieces of information about our function f(x) at our chosen center point x=a:

  1. The value of the function: f(a).
  2. The slope of the function: Let's call this m. In calculus, this is written as f(a).

The formula for the linear approximation, which we'll call P1(x), is based on the point-slope form of a line:

P_1(x) = f(a) + m \cdot (x-a)

This formula guarantees that at x=a, the value of P1(a) is f(a) and the slope of P1(x) is m, perfectly matching our function's value and slope at that one point.

Example 1

Find the linear approximation for the function f(x)=x near the point a=4.

Step 1: Find the function's value at a=4.
f(4)=4=2. Our line must pass through the point (4,2).

Step 2: Find the function's slope at a=4.
For this step, we'll be given the slope. The slope of the function f(x)=x at x=4 is m=14.

Step 3: Plug these values into the formula.
We use the formula P1(x)=f(a)+m(xa) with a=4, f(4)=2, and m=14.
P1(x)=2+14(x4)
This is the linear approximation. We can simplify it if we want: P1(x)=2+14x1=14x+1.

Step 4: Use the approximation.
Let's estimate 4.1. The exact value is tricky to find by hand. Using our approximation:
4.1P1(4.1)=2+14(4.14)=2+14(0.1)=2+0.025=2.025.
A calculator gives 4.12.0248, so our linear approximation is incredibly close!

How to Build a Second-Degree Taylor Polynomial (A Quadratic Approximation)

A linear approximation is good, but we can do better by matching the curvature of the function. This requires a second-degree polynomial, which is a parabola. To build it, we start with our linear approximation and add one more term. We need three pieces of information about our function f(x) at x=a:

  1. The value: f(a).
  2. The slope: m1 (which is f(a) in calculus).
  3. The curvature factor: c2. This value tells us how the function is bending. In calculus, it's calculated as f(a)2, where f(a) represents the concavity.

The formula for the quadratic approximation, P2(x), is:

P_2(x) = f(a) + m_1(x-a) + c_2(x-a)^2

This parabola has the same value, same slope, AND same curvature as our function f(x) at the point x=a, making it a much closer fit.

Example 2

Find the quadratic approximation for f(x)=cos(x) near the center point a=0. (Note: For trigonometric functions, x must be in radians!)

Step 1: Find the function's value at a=0.
f(0)=cos(0)=1.

Step 2: Find the function's slope at a=0.
The slope of cos(x) at x=0 is m1=0. (The top of the cosine wave is flat).

Step 3: Find the function's curvature factor at a=0.
For cos(x) at x=0, the curvature factor is c2=12. This negative value indicates the curve is bending downwards, like an upside-down bowl.

Step 4: Plug these values into the formula.
We use P2(x)=f(a)+m1(xa)+c2(xa)2 with a=0, f(0)=1, m1=0, and c2=12.
P2(x)=1+0(x0)+(12)(x0)2
P2(x)=112x2

Step 5: Use the approximation.
Let's estimate cos(0.2). Using our approximation:
cos(0.2)P2(0.2)=112(0.2)2=112(0.04)=10.02=0.98.
A calculator gives cos(0.2)0.9800665. Our simple quadratic approximation is extremely accurate!

What Is the General Formula for a Taylor Polynomial?

We can continue adding terms to our polynomial to match more and more properties of the function, making the approximation better and better. The Taylor polynomial of degree n for a function f(x) centered at x=a is given by a general formula. It looks a bit intimidating, but it's just an extension of the pattern we've already seen.

The formula requires values from calculus called derivatives. The first derivative, f(a), is the slope. The second derivative, f(a), is related to curvature, and so on. The general formula is:

P_n(x) = f(a) + f'(a)(x-a) + \frac{f''(a)}{2!}(x-a)^2 + \frac{f'''(a)}{3!}(x-a)^3 + \dots + \frac{f^{(n)}(a)}{n!}(x-a)^n

Let's break down the new parts:

  • f(n)(a): This is the n-th derivative of the function evaluated at a. It represents the n-th level of change in the function. For our purposes, these values will be given.
  • n!: This is "n factorial," which means n×(n1)××2×1. For example, 3!=3×2×1=6 and 4!=4×3×2×1=24. This factorial term is necessary to make sure the properties match up correctly.
Example 3

Find the third-degree Taylor polynomial for f(x)=ex centered at a=0.

Step 1: Find the required values for ex at a=0.
The function ex is very special. Its value and all of its derivatives at x=0 are equal to 1.
Value: f(0)=e0=1
1st Derivative (Slope): f(0)=1
2nd Derivative: f(0)=1
3rd Derivative: f(0)=1

Step 2: Calculate the factorials.
2!=2×1=2
3!=3×2×1=6

Step 3: Plug everything into the general formula up to degree 3.
P3(x)=f(0)+f(0)1!(x0)1+f(0)2!(x0)2+f(0)3!(x0)3
P3(x)=1+11x+12x2+16x3
P3(x)=1+x+12x2+16x3

Step 4: Use the approximation.
Let's estimate e0.1.
e0.1P3(0.1)=1+0.1+12(0.1)2+16(0.1)3
1+0.1+12(0.01)+16(0.001)
1+0.1+0.005+0.0001666...
1.1051666...
A calculator gives e0.11.1051709. Our third-degree polynomial is astonishingly accurate!

What Are Common Mistakes to Avoid?

When first learning about Taylor polynomials, it's easy to make a few common errors. Being aware of them can help you get the right answer more consistently.

  • Forgetting the (xa) Term: A frequent mistake is to write the coefficients correctly but forget to multiply them by the powers of (xa). Remember, it's not just f(a), it's f(a)(xa).
  • Using x Instead of a: The coefficients f(a),f(a),f(a), etc., are constants calculated at the specific center point a. Don't plug the variable x into the derivative terms.
  • Forgetting the Factorials: The denominators 2!,3!,4!, etc., are crucial. Forgetting them, especially for degrees higher than 1, will give you the wrong polynomial. Remember that 0!=1 and 1!=1, so they are often omitted in the first two terms.
  • Assuming the Approximation is Global: A Taylor polynomial is an excellent approximation near its center a. The farther you get from a, the more the polynomial will drift away from the original function. It is a local, not a global, approximation.
  • Using Degrees for Trig Functions: When creating or using Taylor polynomials for trigonometric functions like sin(x) or cos(x), the variable x must always be in radians. The formulas for their derivatives are only valid in radians.

Quick Summary and Reference

A Taylor polynomial is a tool for approximating a complex function f(x) near a specific point x=a using a simpler polynomial function. The key is to match the function's properties (value, slope, curvature, etc.) at that point. The more properties you match, the higher the degree of the polynomial and the better the approximation.

Here is a summary of the first few levels of approximation:

Degree (n)Approximation NameWhat It Matches at x=aFormula Term Added
0Constant ApproximationValuef(a)
1Linear ApproximationValue and Slopef(a)(xa)
2Quadratic ApproximationValue, Slope, and Curvaturef(a)2!(xa)2
3Cubic ApproximationValue, Slope, Curvature, and 'Jerk'f(a)3!(xa)3

The Maclaurin Polynomial is simply a special case of the Taylor polynomial where the center point is a=0. The examples for cos(x) and ex in this lesson were both Maclaurin polynomials.

Frequently Asked Questions

What's the difference between a Taylor polynomial and a Maclaurin polynomial?

A Maclaurin polynomial is just a specific type of Taylor polynomial. While a Taylor polynomial can be centered around any point x=a, a Maclaurin polynomial is always centered at x=0. They are often used because calculations can be simpler at zero.

Why are there factorials (like 2!, 3!, etc.) in the formula?

The factorial in the denominator of each term is a normalization constant. When you take derivatives of the polynomial Pn(x) to check if they match the derivatives of f(x) at the center point a, the factorials neatly cancel out, ensuring a perfect match. For example, the 2nd derivative of C2!x2 is just C.

How do I know how many terms of the polynomial to use?

The number of terms you need depends on the accuracy you require and how far you are from the center point a. For a quick estimate very close to a, a linear or quadratic approximation is often enough. For high-precision calculations like on a calculator, many more terms are used.

Does the approximation always get better if I add more terms?

Generally, yes, for most functions you'll encounter. Adding more terms (increasing the degree) will make the polynomial a better fit for the function over a wider range around the center point a. However, there are advanced cases where this is not true, but for functions like sine, cosine, and exponentials, more terms mean more accuracy.

Can you make a Taylor polynomial for any function?

No, a function must be "smooth" and well-behaved at the center point a. This means it must have a defined value, a defined slope, a defined curvature, and so on for as many terms as you need. Functions with sharp corners or breaks, like the absolute value function at x=0, cannot have a standard Taylor polynomial there.

Why is it named after 'Taylor'?

The concept is named after the English mathematician Brook Taylor, who introduced the general idea in the early 18th century (1715). The special case centered at zero is named after Scottish mathematician Colin Maclaurin, who made extensive use of this specific series.

How does my calculator use this to find sin(x)?

Your calculator's chip has a very efficient algorithm, like the CORDIC method, but the principle is the same. It uses a pre-programmed polynomial approximation with enough terms to guarantee a high degree of accuracy for any input. Because the calculations are just multiplication and addition, it can find the answer almost instantly.