We can approximate smooth functions with polynomials.

Polynomials can approximate some functions

In our study of mathematics, we’ve found that some functions are easier to work with than others. For instance, if you are doing calculus, typically polynomials are “easy” to work with because they are easy to differentiate and integrate. Other functions, like are more difficult to work with. However, there are polynomials that mimic the behavior of near zero.

PIC
Above we see a graph of along with the polynomial As we see, this polynomial approximates very well near zero. There are times when we would much rather work with a polynomial than any other type of function. Many of the ideas we discuss in this section should remind you of our work with linear approximation. In the case of linear approximation, we replaced a difficult function with a line, and used this line to approximate the function. Now, we want to replace our complicated function with a polynomial. This leads us to a question.

How do we produce approximating polynomials?

Cutting straight to the point, the approximating polynomials we’ll discuss are called Taylor polynomials and Maclaurin polynomials.

Consider . Which of the following is a Maclaurin polynomial for ?
Check out a plot of along with the plots of the correct answers above:
PIC
Consider . Which of the following is a Taylor polynomial centered at for ?
Check out a plot of along with the plots of the correct answers above.
PIC

In the previous example, why did we choose to use for the center? There are several reasons. We often like to use for the center of a Taylor polynomial (which is why such polynomials have a special name). In the case of , however, is undefined. So, we must choose a different center. Since we have to evaluate the function at the center, any center point we choose should be a value for which we know and can easily compute the function value. In the case of , the value we know best is , so is a good choice for the center. Of course, in general we can choose any center we like, but this will give us a different polynomial (and may make our calculations more difficult.)

Using , what is the approximate value of ?
Since approximates well near , we approximate : This is a good approximation as a calculator shows that
Using , what is approximate value of ?
We approximate with : This approximation is not terribly impressive: a hand held calculator shows that . Surprisingly enough, even the th degree Taylor polynomial fails to approximate for . We’ll soon discuss why this is.

You may be wondering, how exactly Taylor polynomials and Maclaurin polynomials approximate these functions. Here’s the idea: Suppose you have two functions and which are each as differentiable as we need them to be. If for some specific value we have that

then it makes sense that for all . The more derivatives we use, the better our approximation (usually) is. In that sense, we are just working with a better version of linear approximation – we could call this polynomial approximation! The Taylor and Maclaurin polynomials are “cooked up” so that their value and the value of their derivatives equals the value of the related function at . Check it out: here we see the third Maclaurin polynomial for : we see Note that in the case of sine, shares the function’s value at and shares the first derivatives, though the th derivative is different. Let’s see a graph to help us understand what is going on.
PIC
We can see that is a good approximation for near . Next, we quantify exactly how good our approximation is.

Taylor’s theorem

Again, let’s get to the point by stating Taylor’s theorem (which is a generalization of the mean value theorem):

The first part of Taylor’s theorem states that , where is the th order Taylor polynomial and is the remainder, or error, in the Taylor approximation. The second part gives bounds on how big that error can be. If the th derivative is large, the error may be large; if is far from , the error may also be large. However, the term in the denominator tends to ensure that the error gets smaller as increases.

The following example computes error estimates for the approximations of and made earlier.

We practice again. This time, we use Taylor’s theorem to find that guarantees our approximation is within a certain amount.

Connections to differential equations

Our final example gives a brief introduction for using Taylor polynomials to solve differential equations.

Taylor polynomials are very useful approximation in two basic situations:

(a)
When is known, but perhaps “hard” to compute directly. For instance, we can define as either the ratio of sides of a right triangle (“adjacent over hypotenuse”) or with the unit circle. However, neither of these provides a convenient way of computing . A Taylor polynomial of sufficiently high degree can provide a reasonable method of computing such values using only operations usually hard-wired into a computer (, , and ). However, even though Taylor polynomials could be used in calculators and computers to calculate values of trigonometric functions, in practice they generally aren’t. Other more efficient and accurate methods have been developed, such as the CORDIC algorithm.
(b)
When is not known, but information about its derivatives is known. This occurs more often than one might think, especially in the study of differential equations.