Nathan Wakefield, Christine Kelley, Marla Williams, Michelle Haver, Lawrence Seminario-Romero, Robert Huben, Aurora Marks, Stephanie Prahl, Based upon Active Calculus by Matthew Boelkins
Section7.7Applications of Taylor Series
Motivating Questions
How can we use the Taylor series that we already know to build new ones?
How can we use Taylor series to approximate values of functions or irrational numbers?
How can we use Taylor series to put several functions in order, near a specific value?
We have now built several examples of Taylor series using the definition, and we have seen in the process that nearly all of the work needed to find a Taylor series is done in finding the coefficients. This can be done for any function by taking derivatives; however, some functions have very complicated derivatives, and the process of finding these derivatives can take a serious amount of time and effort.
Recall the Taylor series expansions about \(x=0\) for the following important functions:
Important Taylor Series and their Intervals of Convergence
Note: for a real number \(a \) and integer \(k \geq 1 \text{,}\) \(\binom{a}{k}=\frac{a(a-1)\cdots(a-k+1)}{k!} \text{.}\) We take \(\binom{a}{0}=1 \) for all \(a \in \mathbb{R} \text{.}\)
In many situations, we can use the Taylor series that we already know to find Taylor series for more complicated functions, as illustrated in the next example.
Example7.66
The goal of this problem is to find the Taylor series centered at 0 for \(f(x)=\sin(x^2)\text{.}\)
Find the first two derivatives of \(f(x)\text{.}\) Explain why each time you take another derivative, the result has more terms than the previous derivative. For example, the second derivative has more terms than the first derivative.
Take the Taylor series for \(\sin y \) about \(y=0\) and then substitute \(y=x^2\text{.}\) Simplify this and you have the Taylor series for \(\sin(x^2)\text{.}\)
Verify that the derivatives you found in part (a) match the Taylor series from part (b).
What is the radius of convergence of the Taylor series for \(\sin(x^2)\text{?}\)
Notice that each time we take a further derivative, we will use at least one of the product rule or the chain rule on each existing term. Thus, there will always be more terms than the previous derivative had.
The constant term of the series should be \(f(0)=\sin(0)=0.\) The coefficient of the \(x\) term of the series should be \(f'(0)=0 \cdot \cos(0)=0.\) The coefficient of the \(x^2\) term of the series should be \(\frac{f''(0)}{2} = \frac{2\cos(0)- 4(0)\sin(0)}{2}=\frac{2}{2}=1.\) All match!
Since the Taylor series for \(\sin(y)\) has radius of convergence \(R=\infty\text{,}\) the Taylor series for \(\sin(x^2)\) also has radius of convergence \(R=\infty\text{.}\)
We can also use Taylor series to obtain approximations of function values, and put functions in order. We will develop these methods in this section.
SubsectionNew Taylor Series from Old
There are several ways we can obtain Taylor series expansions for functions using known Taylor series expansions for different related functions. This includes the method of substitution, multiplying Taylor series, and differentiating and integrating Taylor series. The following examples will showcase these methods.
Example7.67
Our goal in this example is to find a power series expansion for \(f(x) = \frac{1}{1+x^2}\) centered at \(x=0\text{.}\)
While we could use the methods of Section7.6 and differentiate \(f(x) = \frac{1}{1+x^2}\) several times to look for patterns and find the Taylor series for \(f(x)\text{,}\) we seek an alternate approach because of how complicated the derivatives of \(f(x)\) quickly become.
What is the Taylor series expansion for \(g(x) = \frac{1}{1-x}\text{?}\) What is the interval of convergence of this series?
How is \(g(-x^2)\) related to \(f(x)\text{?}\) Explain, and then substitute \(-x^2\) for \(x\) in the power series expansion for \(g(x)\text{.}\) Given the relationship between \(g(-x^2)\) and \(f(x)\text{,}\) how is the resulting series related to \(f(x)\text{?}\)
For which values of \(x\) will this power series expansion for \(f(x)\) be valid? Why?
We write \(f(t)=\frac{1}{\sqrt{1+2t}} = (1+2t)^{-\frac{1}{2}}.\) Note that the Taylor series about \(0 \) for the function \((1+x)^{-\frac{1}{2}} \) is given by
For the series to coverge, we need \(2t \) to fall in the interval \((-1, 1) \text{,}\) which means the interval of convergence is \((-1/2, 1/2) \text{.}\)
Example7.70
Let \(f\) be the function given by the Taylor series expansion
which is the series expansion for \(-\cos(x)\) as expected.
Our work in Example7.70 holds more generally. The corresponding theorem, which we will not prove, states that we can differentiate a power series for a function \(f\) term by term and obtain the series expansion for \(f'\text{,}\) and similarly we can integrate a series expansion for a function \(f\) term by term and obtain the series expansion for \(\int f(x) \ dx\text{.}\) For both, the radius of convergence of the resulting series is the same as the original, though it is possible that the convergence status of the various series may differ at the endpoints. The formal statement of the Power Series Differentiation and Integration Theorem follows.
Power Series Differentiation and Integration Theorem
and that the series converges absolutely to \(f(x)\) on the interval \(-r \lt x \lt r\text{.}\) Then, the power series \(\sum_{k=1}^{\infty} kc_kx^{k-1}\) obtained by differentiating the power series for \(f(x)\) term by term converges absolutely to \(f'(x)\) on the interval \(-r \lt x \lt r\text{.}\) That is,
Similarly, the power series \(\sum_{k=0}^{\infty} c_k\frac{x^{k+1}}{k+1}\) obtained by integrating the power series for \(f(x)\) term by term converges absolutely on the interval \(-r \lt x \lt r\text{,}\) and
This theorem validates the steps we took in Example7.70. It tells us that we can differentiate and integrate term by term on the interior of the interval of convergence, but it does not tell us what happens at the endpoints of this interval. We always need to check what happens at the endpoints separately. More importantly, we can use use the approach of differentiating or integrating a series term by term to find new series.
Example7.71
We can use Taylor series to approximate definite integrals to which known techniques of integration do not apply. We will illustrate this in this exercise with the definite integral \(\int_0^1 \sin(x^2) \,dx\text{.}\)
Integrate the Taylor series for \(\sin(x^2)\) term by term to obtain a power series expansion for \(\int \sin(x^2)\,dx\text{.}\)
Use the result from part (a) to explain how to evaluate \(\int_0^1 \sin(x^2) \ dx\text{.}\) Determine the number of terms you will need to approximate \(\int_0^1 \sin(x^2) \,dx\) to 3 decimal places.
To evaluate \(\int_0^1 \sin(x^2) \ dx\text{,}\) we evaluate the antiderivative \(\sum_{k=0}^{\infty} (-1)^k\frac{x^{4k+3}}{(2k+1)!(4k+2)}\) at \(1\) and \(0\) and subtract. So
The resulting series is an alternating series, so we can find a value of \(n\) that makes the \(n\)th partial sum of the series approximate the sum of the series to \(3\) decimal places by determining a value of \(n\) such that
SubsectionUsing Taylor Series to Approximate Numbers and Function Values
There are many applications of Taylor series, but most are based on the idea of using Taylor series to approximate function values. For example, say we have a function \(f(x)\) and we knew the Taylor series for \(f(x)\) and we really need to get an approximate value for \(f(1)\text{.}\) Assuming that the Taylor series converges for \(x=1\text{,}\) we can then substitute \(x=1\) into the series, and use the first few terms of the series to approximate the number. Of course, using more terms of the series gives a better approximation. The examples below walk through how this is done in more details, and highlights some of the different ways in which it can be useful.
Example7.73
Find a series expansion centered at \(x = 0\) for \(\arctan(x)\text{,}\) as well as its interval of convergence.
Recall that \(\arctan(1)=\frac{\pi}{4}\text{,}\) and therefore \(4\arctan(1)=\pi\text{.}\) Use the first \(n\) terms of the Taylor series for \(\arctan(x)\) with \(n=1,2,3,4,5\) to get approximate values for \(\pi\text{,}\) and fill in the table below.
While we could differentiate \(\arctan(x)\) repeatedly and look for patterns in the derivative values at \(x = 0\) in an attempt to find the Maclaurin series for \(\arctan(x)\) from the definition, it turns out to be far easier to use a known series in an insightful way. By thinking of the right-hand side as a geometric series, we can see that
It follows that we can integrate the series for \(\frac{1}{1+x^2}\) term by term to obtain the power series expansion for \(\arctan(x)\text{.}\) Doing so, we find that
converges both when \(x = -1\) and when \(x = 1\text{;}\) in each case, we have an alternating series with terms \(\frac{1}{2k+1}\) that decrease to \(0\text{,}\) and thus the interval of convergence for the series expansion for \(\arctan(x)\) in Equation(7.26) is \(-1 \le x \le 1\text{.}\)
To make the computations a little easier, let's write out the first five terms of the Taylor series explicitly:
Since we know that \(\pi\) is about 3.14159, we haven't gotten extremely accurate yet, but we are getting there, and continuing to use more terms would yield more accuracy.
Example7.76
For values near 0, put the following functions in order from smallest to largest:
\(\sin(y^2) \)
\(1-\cos(y) \)
\(\ln(1+y^2) \)
Use the first four terms of the Taylor series for \(\sin(y^2)\) to estimate the value of \(\sin(1)\text{.}\)
Consider the series \(1 - \frac{2^2}{2!} + \frac{2^4}{4!} - \frac{2^6}{6!} + \cdots \text{.}\) This is the Taylor series for some function centered at \(0 \) evaluated at some value \(x = a \text{.}\) What is the function \(f(x) \text{?}\) What is the sum of the series?
where \(x=2\) has been plugged in. We can recognize that this is the Taylor series for \(\cos(x)\) centered at 0, and since it converges for all real numbers \(x\text{,}\) the sum of the series must be \(\cos(2)\text{.}\)
SubsectionUsing Taylor Series to Evaluate Limits
One big takeaway from our study of Taylor series is that they behave just like polynomials. For instance, differentiation and integration of Taylor series can be done term-by-term. In the same spirit, we can apply our knowledge about limits of polynomials to compute limits involving complicated functions by replacing them with their Taylor series. Here are some examples:
Example7.78
Evaluate the following limits by first finding a Taylor series expansion of each function, and then evaluating the limit of the series term-by-term.
The Taylor series for \(\cos(x) \) about \(0 \) is \(1-\frac{x^{2}}{2!}+\frac{x^{4}}{4!}-\cdots \text{.}\) By composing with \(x^{2}\) and subtracting the resulting series from \(1 \text{,}\) we obtain
The Taylor series for \(\ln(x+1) \) about \(0 \) is \(x-\frac{x^{2}}{2}+\frac{x^{3}}{3}-\cdots \text{.}\) By composing with \(x^{6} \text{,}\) we reach
While many limits like the ones above can also be evaluated using other methods, such as L'Hopital's Rule, the Taylor series approach often turns out to be easier. Because Taylor series behave like polynomials, to take the limit of a Taylor series we only need to know the dominant (first) term!
SubsectionSummary
Taylor series for complicated functions can often be found by manipulating Taylor series for known functions. Some techniques for manipulation are addition, substraction, multiplication, division, substitution, differentiation, and integration.
Taylor series are especially useful to approximate function values, where of course the accuracy of the approximation can be improved by using more terms in the series. These approximations have various applications.
In this exercise, we will investigate how the center of a Taylor series can affect the accuracy of the estimation it provides.
Use a seven-degree Taylor polynomial about \(a=0\) for \(\sin(x)\) to approximate \(\sin(3)\text{.}\)
Find the seventh-degree Taylor polynomial about \(a=\pi\) for \(\sin(x)\text{,}\) and use it to approximate \(\sin(3)\text{.}\)
Use a calculator to find the value of \(\sin(3)\text{.}\) Given that 3 is much closer to \(\pi\) than it is to 0, do your two approximations make sense?