Consider a function and a point . The derivative, , gives the instantaneous rate of change of at . Of all lines that pass through the point , the line that best approximates at this point is the tangent line; that is, the line whose slope (rate of change) is .
In Figure 9.9.1, we see a function graphed. The table below the graph shows that and ; therefore, the tangent line to at is . The tangent line is also given in the figure. Note that “near” , ; that is, the tangent line approximates well.
One shortcoming of this approximation is that the tangent line only matches the slope of ; it does not, for instance, match the concavity of . We can find a polynomial, , that does match the concavity without much difficulty, though. The table in Figure 9.9.1 gives the following information:
Therefore, we want our polynomial to have these same properties. That is, we need
This is simply an initial-value problem. We can solve this using the techniques first described in Section 5.1. To keep as simple as possible, we’ll assume that not only , but that . That is, the second derivative of is constant.
If , then for some constant . Since we have determined that , we find that and so . Finally, we can compute . Using our initial values, we know so We conclude that This function is plotted with in Figure 9.9.2.
We can repeat this approximation process by creating polynomials of higher degree that match more of the derivatives of at . In general, a polynomial of degree can be created to match the first derivatives of . Figure 9.9.2 also shows , whose first four derivatives at 0 match those of . (Using the table in Figure 9.9.1, start with and solve the related initial-value problem.)
As we use more and more derivatives, our polynomial approximation to gets better and better. In this example, the interval on which the approximation is “good” gets bigger and bigger. Figure 9.9.3 shows ; we can visually affirm that this polynomial approximates very well on . The polynomial is fairly complicated:
The polynomials we have created are examples of Taylor polynomials, named after the British mathematician Brook Taylor who made important discoveries about such functions. While we created the above Taylor polynomials by solving initial-value problems, it can be shown that Taylor polynomials follow a general pattern that make their formation much more direct. This is described in the following definition.
Let be a function whose first derivatives exist at .
The Taylor polynomial of degree of at is
A special case of the Taylor polynomial is the Maclaurin polynomial, where . That is, the Maclaurin polynomial of degree of is
Generally, we order the terms of a polynomial to have decreasing degrees, and that is how we began this section. This definition, and the rest of this chapter, reverses this order to reflect the greater importance of the lower degree terms in the polynomials that we will be finding.
Watch the video:
Taylor Polynomial to Approximate a Function, Ex 3 from https://youtu.be/UINFWG0ErSA
We will practice creating Taylor and Maclaurin polynomials in the following examples.
Find the Maclaurin polynomial for .
Use to approximate the value of .
Solution
We start with creating a table of the derivatives of evaluated at . In this particular case, this is relatively simple, as shown in Figure 9.9.4. ††margin: By the definition of the Maclaurin polynomial, we have
Using our answer from part 1, we have
To approximate the value of , note that It is very straightforward to evaluate : ††margin:
This is an error of about , or of the true value.
A plot of and is given in Figure 9.9.5.
Find the Taylor polynomial of at .
Use to approximate the value of .
Use to approximate the value of .
Solution
We begin by creating a table of derivatives of evaluated at . While this is not as straightforward as it was in the previous example, a pattern does emerge, as shown in Figure 9.9.6.
Using Definition 9.9.1, we have
We can compute using our work above: ††margin:
Since approximates well near , we approximate : ††margin:
This is a good approximation as a calculator shows that Figure 9.9.7 plots with . We can see that .
We approximate with :
This approximation is not terribly impressive: a hand held calculator shows that The graph in Figure 9.9.7 shows that provides less accurate approximations of as gets close to 0 or 2.
Surprisingly enough, even the 20 degree Taylor polynomial fails to approximate for , as shown in Figure 9.9.8. We’ll soon discuss why this is.
Taylor polynomials are used to approximate functions in mainly two situations:
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 ).
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.
In both situations, a critical piece of information to have is “How good is my approximation?” If we use a Taylor polynomial to compute , how do we know how accurate the approximation is?
We had the same problem when studying Numerical Integration. Theorem 8.7.1 provided bounds on the error when using, say, Simpson’s Rule to approximate a definite integral. These bounds allowed us to determine that, for example, using subintervals provided an approximation within of the exact value. The following theorem gives similar bounds for Taylor (and hence Maclaurin) polynomials.
Let be a function whose derivative exists on an open interval and let be in . Then, for each in , there exists between and such that
where
, where is between and .
The first part of Taylor’s Theorem states that , where is the 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 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 in Example 9.9.2.
Use Theorem 9.9.1 to find error bounds when approximating and with , the Taylor polynomial of degree 6 of at , as calculated in Example 9.9.2.
Solution
We start with the approximation of with . The theorem references . In our situation, this is asking “How big can the derivative of be on the interval ?” The seventh derivative is . The largest absolute value it attains on is 720. Thus we can bound the error as:
We computed ; using a calculator, we find , so the actual error is about (or ), which is less than our bound of . This affirms Taylor’s Theorem; the theorem states that our approximation would be within about one thousandth of the actual value, whereas the approximation was actually closer.
The maximum value of the seventh derivative of on again 720 (as the largest values come at ). Thus
This bound is not as nearly as good as before. Using the degree 6 Taylor polynomial at will bring us within 0.3 of the correct answer. As , our error estimate guarantees that the actual value of is somewhere between and . These bounds are not particularly useful.
In reality, our approximation was only off by about (or ). However, we are approximating ostensibly because we do not know the real answer. In order to be assured that we have a good approximation, we would have to resort to using a polynomial of higher degree.
We practice again. This time, we use Taylor’s theorem to find that guarantees our approximation is within a certain amount.
Find such that the Taylor polynomial of at approximates to within of the actual answer. What is ?
SolutionFollowing Taylor’s theorem, we need bounds on the size of the derivatives of . In the case of this trigonometric function, this is easy. All derivatives of cosine are or . In all cases, these functions are never greater than 1 in absolute value. We want the error to be less than . To find the appropriate , consider the following inequalities:
We find an that satisfies this last inequality with trial-and-error. When , we have ; when , we have . Thus we want to approximate with .
We now set out to compute . We again need a table of the derivatives of evaluated at . A table of these values is given in Figure 9.9.9. Notice how the derivatives, evaluated at , follow a certain pattern. All the odd powers of in the Taylor polynomial will disappear as their coefficient is 0. While our error bounds state that we need , our work shows that this will be the same as . ††margin:
Since we are forming our polynomial at , we are creating a Maclaurin polynomial, and:
We finally approximate :
Our error bound guarantee that this approximation is within of the correct answer. Technology shows us that our approximation is actually within about (or ) of the correct answer.
Figure 9.9.10 shows a graph of and . Note how well the two functions agree on about .
Find the degree 4 Taylor polynomial, , for at
Use to approximate .
Find bounds on the error when approximating with .
Solution
We begin by evaluating the derivatives of at . This is done in Figure 9.9.11. These values allow us to form the Taylor polynomial : ††margin:
As near , we approximate with .
The largest value the fifth derivative of takes on is when , at about . Thus
This shows our approximation is accurate to at least the first 2 places after the decimal. It turns out that our approximation has an error of , or . A graph of and is given in Figure 9.9.12. Note how the two functions are nearly indistinguishable on .
Most of this chapter has been devoted to the study of infinite series. This section has stepped aside from this study, focusing instead on finite summation of terms. In the next section, we will combine power series and Taylor polynomials into Taylor Series, where we represent a function with an infinite series.
What is the difference between a Taylor polynomial and a Maclaurin polynomial?
T/F: In general, approximates better and better as gets larger.
For some function , the Maclaurin polynomial of degree 4 is . What is ?
For some function , the Maclaurin polynomial of degree 4 is . What is ?
In Exercises 5–12, find the Maclaurin polynomial of degree for the given function.
In Exercises 13–20, find the Taylor polynomial of degree , at , for the given function.
In Exercises 21–24, approximate the function value with the indicated Taylor polynomial and give approximate bounds on the error.
Approximate with the Maclaurin polynomial of degree 3.
Approximate with the Maclaurin polynomial of degree 4.
Approximate with the Taylor polynomial of degree 2 centered at .
Approximate with the Taylor polynomial of degree 3 centered at .
Exercises 25–28 ask for an to be found such that approximates within a certain bound of accuracy.
Find such that the Maclaurin polynomial of degree of approximates within of the actual value.
Find such that the Taylor polynomial of degree of , centered at , approximates within of the actual value.
Find such that the Maclaurin polynomial of degree of approximates within of the actual value.
Find such that the Maclaurin polynomial of degree of approximates within of the actual value.
In Exercises 29–34, find the term of the indicated Taylor polynomial.
Find a formula for the term of the Maclaurin polynomial for .
Find a formula for the term of the Maclaurin polynomial for .
Find a formula for the term of the Maclaurin polynomial for .
Find a formula for the term of the Maclaurin polynomial for .
Find a formula for the term of the Maclaurin polynomial for .
Find a formula for the term of the Taylor polynomial for centered at .
In Exercises 35–36, approximate the solution to the given differential equation with a degree 4 Maclaurin polynomial.
,
,