Skip to main content

Section 9.3 How to Build Taylor Series

Let’s first clear the air: we’ve been talking about Taylor Polynomials that are partial sums of some larger infinite series. Then we talked about Power Series, a generic structure of an infinite series of power functions of \(x\text{.}\) We want to combine these together, and name the specific power series that these Polynomial Approximations are partial sums of.

Definition 9.3.1. Taylor Series.

If \(f(x)\) is an infinitely differentiable function at \(x=a\text{,}\) then the Taylor series expansion of \(f(x)\) centered at \(x=a\) is:
\begin{equation*} \sum_{k=0}^\infty \frac{f^{(k)}(a)}{k!}(x-a)^k\text{.} \end{equation*}
Now that we have named these Taylor series, we want to work on constructing these Taylor series for a given function. In this section, we’ll investigate a couple of ways that we can do this.

Subsection Constructing Directly

We saw in Section 9.1 Polynomial Approximations of Functions that we can use the idea of a polynomial partial sum to build out a Taylor series representation for a function.
We’ll need to build a bunch of terms for some Taylor polynomial, and then we can hopefully extrapolate afterwards. We want to come up with a general formula to define these terms, so that we can write the explicit formula in the infinite series, but we know that this, in general, is a difficult task! It’s hard to find these explicit formulas for the terms in these series.
It’s not impossible, though! You can remind yourself of how we’ve done this! We found (and speculated about) the Taylor series for \(f(x)=e^x\text{,}\) \(f(x)=\sin(x)\text{,}\) and \(f(x)=\cos(x)\) (all centered at \(x=0\)) in Activity 9.1.1 Build a Polynomial and Activity 9.1.3 Partial Sums of What?.

Activity 9.3.1. Constructing a Taylor Series Directly.

Let’s work on this! To be honest, the goal here is to realize how difficult this can be.
Let’s consider the function \(f(x)=\tan(x)\text{.}\) We’re going to build a Taylor polynomial approximating \(f(x)\) centered at \(x=0\text{.}\)
(a)
We’re going to build a 4th degree polynomial approximating \(f(x)=\tan(x)\text{.}\) In order to do this, we’ll need to find the coefficients for the 5 terms.
Table 9.3.2. Coefficients for Polynomial Approximation
\(k\) \(f^{(k)}(x)\) \(f^{(k)}(a)\) \(\dfrac{f^{(k)}(a)}{k!}\)
\(k=0\) \(f(x)=\tan(x)\) \(f(0)=\fillinmath{XXXXX}\) \(\fillinmath{XXXXX}\)
\(k=1\) \(f'(x)=\fillinmath{XXXXX}\) \(f'(0)=\fillinmath{XXXXX}\) \(\fillinmath{XXXXX}\)
\(k=2\) \(f''(x)=\fillinmath{XXXXX}\) \(f''(0)=\fillinmath{XXXXX}\) \(\fillinmath{XXXXX}\)
\(k=3\) \(f'''(x)=\fillinmath{XXXXX}\) \(f'''(0)=\fillinmath{XXXXX}\) \(\fillinmath{XXXXX}\)
\(k=4\) \(f^{(4)}(x)=\fillinmath{XXXXX}\) \(f^{(4)}(0)=\fillinmath{XXXXX}\) \(\fillinmath{XXXXX}\)
\(k=5\) \(f^{(5)}(x)=\fillinmath{XXXXX}\) \(f^{(5)}(0)=\fillinmath{XXXXX}\) \(\fillinmath{XXXXX}\)
(b)
Now we can use these coefficients to construct the polynomial! These coefficients should all be on power functions in the form \((x-a)^k\) for \(k=0,1,...,5\text{.}\) These (added together) will form your polynomial, \(p_5(x)\text{.}\)
(c)
Can you find a general explicit formula for the terms? If you’re having a hard time with this, what could you do to try to make this easier? Why is this difficult?
Hint.
How many more derivatives do you think you’ll need to find before you get a non-zero term? How many non-zero terms do you think you’d need to find before you can guess the pattern?
We’re going to stop there. This series is famously difficult to work with. We won’t generate the whole Taylor series this way, and this strategy really doesn’t work well for functions like this (where the derivatives are pretty annoying to find).

Subsection Connections To Other Taylor Series

A (hopefully) more useful strategy is to collect the Taylor series that we know, and then try to build a series for a function based on how that function relates. We saw this in Theorem 9.2.4 Operations on Power Series and Theorem 9.2.5 Differentiating and Integrating Power Series.

Activity 9.3.2. Connecting to Another Series.

Let’s start with some “known” series.
\begin{align*} \frac{1}{1-x} \amp = \sum_{k=0}^\infty x^k \amp \text{on }(-1,1)\\ e^x \amp = \sum_{k=0}^\infty \frac{x^k}{k!} \amp \text{on } (-\infty,\infty)\\ \sin(x) \amp = \sum_{k=0}^\infty \frac{(-1)^k x^{2k+1}}{(2k+1)!} \amp \text{on } (-\infty,\infty)\\ \cos(x) \amp = \sum_{k=0}^\infty \frac{(-1)^k x^{2k}}{(2k)!} \amp \text{on } (-\infty,\infty) \end{align*}
We’re going to build a Taylor series for a logarithmic function:
\begin{equation*} y=\ln(1+x)\text{.} \end{equation*}
(a)
In order to start, we’re going to find a Taylor series for \(g(x)=\dfrac{1}{1+x}\text{.}\) Which of the “known” series above is this most similar to? How is it different?
(b)
Find a Taylor series for \(g(x)=\dfrac{1}{1+x}\) by using Theorem 9.2.4. Can you connect this series to the known series by multiplying or composing something?
Hint.
Note that \(1+x = 1-(-x)\text{.}\)
Solution.
We’re going to connect \(g(x)=\dfrac{1}{1+x}\) to the geometric Taylor series for \(f(x) = \dfrac{1}{1-x}\text{.}\) We can note that \(g(x)=f(-x)\text{.}\)
\begin{align*} f(-x) \amp = \sum_{k=0}^\infty (-x)^k \\ \amp = \sum_{k=0}^{\infty} (-1)^k x^k \end{align*}
(c)
Notice that the function we’re trying to get a Taylor series for, \(y=\ln(1+x)\text{,}\) is an antiderivative of \(g(x)=\dfrac{1}{1+x}\text{.}\) Antidifferentiate the series you found above, using Theorem 9.2.5 Differentiating and Integrating Power Series. We know that at \(x=0\text{,}\) \(y=0\text{,}\) so use this information to find specific constant that we need when we antidifferentiate.
Solution.
\begin{align*} G(x) \amp = \int g(x)\;dx \\ G(x) \amp = \int \left(\sum_{k=0}^{\infty}(-1)^k x^k\right)\;dx\\ \amp = \sum_{k=0}^\infty (-1)^k \int x^k\;dx\\ \amp = \sum_{k=0}^\infty \frac{(-1)^k x^{k+1}}{k+1} + C \end{align*}
We want \(G(0)=0\text{,}\) so we need to let \(C=0\text{.}\)
So:
\begin{equation*} \ln(1+x) = \sum_{k=0}^{\infty} \frac{(-1)^k x^{k+1}}{k+1}\text{.} \end{equation*}
Sometimes this is written as:
\begin{equation*} \ln(1+x) = \sum_{k=1}^{\infty} \frac{(-1)^{k+1} x^{k}}{k} \end{equation*}
(d)
What is the interval of convergence for this new series? How does that relate to the interval of convergence of the “known” series you started with?
Solution.
We can apply the Ratio Test:
\begin{align*} \lim_{k\to\infty} \frac{|x|^{k+2}}{k+2}\cdot \frac{k+1}{|x|^{k+1}} \amp = \lim_{k\to\infty} \frac{|x|(k+1)}{k+2}\\ \amp = |x| \end{align*}
So we know that the series will converge for \(|x|\lt 1\text{.}\) Now we can test the endpoints at \(x=-1\) and \(x=1\text{.}\)
Case: \(x=-1\)
\begin{equation*} \sum_{k=0}^{\infty} \frac{-1}{k+1} \end{equation*}
This is the negative harmonic series, and so the series diverges at \(x=-1\text{.}\)
Case: \(x=1\)
\begin{equation*} \sum_{k=0}^{\infty} \frac{(-1)^k}{k+1} \end{equation*}
This is the alternating harmonic series, and so the series converges at \(x=1\text{.}\)
So, the interval of convergence is \((-1,1]\text{.}\)
We’re going to try this again with a different function as the goal!

Activity 9.3.3. Connecting to Yet Another Series.

Here, again, are some updated “known” series
\begin{align*} \frac{1}{1-x} \amp = \sum_{k=0}^\infty x^k \amp \text{on }(-1,1)\\ e^x \amp = \sum_{k=0}^\infty \frac{x^k}{k!} \amp \text{on } (-\infty,\infty)\\ \sin(x) \amp = \sum_{k=0}^\infty \frac{(-1)^k x^{2k+1}}{(2k+1)!} \amp \text{on } (-\infty,\infty)\\ \cos(x) \amp = \sum_{k=0}^\infty \frac{(-1)^k x^{2k}}{(2k)!} \amp \text{on } (-\infty,\infty)\\ \ln(1+x) \amp = \sum_{k=0}^\infty \frac{(-1)^k x^{k+1}}{k+1} \amp \text{on } (-1,1] \end{align*}
We’re going to build a Taylor series for a logarithmic function:
\begin{equation*} y=\tan^{-1}(x)\text{.} \end{equation*}
(a)
In order to start, we’re going to find a Taylor series for \(g(x)=\dfrac{1}{1+x^2}\text{.}\) Which of the “known” series above is this most similar to? How is it different?
(b)
Find a Taylor series for \(g(x)=\dfrac{1}{1+x^2}\) by using Theorem 9.2.4. Can you connect this series to the known series by multiplying or composing something?
Hint.
Note that \(1+x^2 = 1-(-x^2)\text{.}\)
Solution.
We’re going to connect \(g(x)=\dfrac{1}{1+x^2}\) to the geometric Taylor series for \(f(x) = \dfrac{1}{1-x}\text{.}\) We can note that \(g(x)=f(-x^2)\text{.}\)
\begin{align*} f(-x^2) \amp = \sum_{k=0}^\infty (-x^2)^k \\ \amp = \sum_{k=0}^{\infty} (-1)^k x^{2k} \end{align*}
(c)
Notice that the function we’re trying to get a Taylor series for, \(y=\tan^{-1}(x)\text{,}\) is an antiderivative of \(g(x)=\dfrac{1}{1+x^2}\text{.}\) Antidifferentiate the series you found above, using Theorem 9.2.5 Differentiating and Integrating Power Series. We know that at \(x=0\text{,}\) \(y=0\text{,}\) so use this information to find specific constant that we need when we antidifferentiate.
Solution.
\begin{align*} G(x) \amp = \int g(x)\;dx \\ G(x) \amp = \int \left(\sum_{k=0}^{\infty}(-1)^k x^{2k}\right)\;dx\\ \amp = \sum_{k=0}^\infty (-1)^k \int x^{2k}\;dx\\ \amp = \sum_{k=0}^\infty \frac{(-1)^k x^{2k+1}}{2k+1} + C \end{align*}
We want \(G(0)=0\text{,}\) so we need to let \(C=0\text{.}\)
So:
\begin{equation*} \tan^{-1}(x) = \sum_{k=0}^{\infty} \frac{(-1)^k x^{2k+1}}{2k+1}\text{.} \end{equation*}
(d)
What is the interval of convergence for this new series? How does that relate to the interval of convergence of the “known” series you started with?
Solution.
We can apply the Ratio Test:
\begin{align*} \lim_{k\to\infty} \frac{|x|^{2(k+1)+1}}{2(k+1)+1}\cdot \frac{2k+1}{|x|^{2k+1} \amp = \lim_{k\to\infty} \frac{|x|^{2k+3}}{2k+3}\cdot \frac{2k+1}{|x|^{2k+1}}\\ \amp = \lim_{k\to\infty} \frac{|x|^2 (2k+3)}{2k+1}\\ \amp = |x|^2 \end{align*}
So we know that the series will converge for \(x^2\lt 1\text{.}\) Now we can test the endpoints at \(x=-1\) and \(x=1\text{.}\)
Case: \(x=-1\)
\begin{equation*} \sum_{k=0}^{\infty} \frac{(-1)^{k+1}}{2k+1} \end{equation*}
This series converges by the Alternating Series Test.
Case: \(x=1\)
\begin{equation*} \sum_{k=0}^{\infty} \frac{(-1)^k}{2k+1} \end{equation*}
This series converges by the Alternating Series Test.
So, the interval of convergence is \([-1,1]\text{.}\)
Now we can update our list of “known” series!

Known Taylor Series.

\begin{align*} \frac{1}{1-x} \amp = \sum_{k=0}^\infty x^k \amp \text{on }(-1,1)\\ e^x \amp = \sum_{k=0}^\infty \frac{x^k}{k!} \amp \text{on } (-\infty,\infty)\\ \sin(x) \amp = \sum_{k=0}^\infty \frac{(-1)^k x^{2k+1}}{(2k+1)!} \amp \text{on } (-\infty,\infty)\\ \cos(x) \amp = \sum_{k=0}^\infty \frac{(-1)^k x^{2k}}{(2k)!} \amp \text{on } (-\infty,\infty)\\ \ln(1+x) \amp = \sum_{k=0}^\infty \frac{(-1)^k x^{k+1}}{k+1} \amp \text{on } (-1,1]\\ \tan^{-1}(x) \amp = \sum_{k=0}^\infty \frac{(-1)^k x^{2k+1}}{2k+1} \amp \text{on } [-1,1] \end{align*}
Most importantly, we can use these two activities as a framework for a more general way of constructing Taylor series representations of functions. If we can link the function we’re interested in to one of the functions with a “known” Taylor series, then we can use the link between functions as a way of linking the respective Taylor series.
That is, if we know the Taylor series for \(f(x)\) and we want to find the Taylor series for a different function \(g(x)\) where \(g(x)\) is some sort of transformed version of \(f(x)\text{,}\) then we can list the transformations or changes to \(f(x)\) in order to produce \(g(x)\text{,}\) and apply those transformations or changes to the Taylor series for \(f(x)\text{.}\)
Two rectangles, one labeled "Taylor Series Context" and the other, beside it, labeled "Function Context." Inside the "Taylor Series Context" rectangle is a power series with an arrow labeled "apply operation A" pointing towards a transformed power series. Inside the "Function Context" rectangle is a function f(x) with an arrow labeled "apply operation A" pointing towards A(f(x)). Two arrows connect the power series and the function as well as the transformed versions, labeled "equivalent on IOC".
Figure 9.3.3. Constructing a Taylor series from a related series.
So when the operation \(A\) is something from either Theorem 9.2.4 Operations on Power Series or Theorem 9.2.5 Differentiating and Integrating Power Series, then we can apply these operations to the Taylor series of \(f(x)\) in order to construct the Taylor series of \(A(f(x))\text{.}\) Interestingly enough, we can note that the intervals of convergence can be mostly constructed from these same transformations: there might be some changes to the inclusion of the endpoints based on differentiation and integration.
Now that we have a convenient way of constructing Taylor series for conveniently linked functions, we should think about how we might use these Taylor series representations of functions.

Practice Problems Practice Problems

1.

What is the difference between a Taylor Polynomial approximation for \(f(x)\) centered at \(x=a\) and the Taylor Series for \(f(x)\) centered at \(x=a\text{?}\)

2.

Given the geometric power series \(\displaystyle \sum_{k=0}^\infty x^k = \dfrac{1}{1-x}\) for \(|x|\lt 1\text{,}\) find the Taylor series representations for the following functions. Make sure to explain, for each, how it connects to the geometric Taylor series. Also, report the interval of convergence for each.
(c)
\(\dfrac{1}{x^2-1} = -\dfrac{1}{1-x^2}\)

3.

or each of the following functions, explain how they are related to \(f(x) = \sin(x)\text{.}\) Then, use the connections you describe to find the Taylor Series for the function given by relating it to the Taylor Series for \(\sin(x)\text{.}\)

4.

Find a Taylor Series for each of the following functions. Report the center and interval of convergence for each.
(e)
\(f(x) = x^3\tan^{-1}(x^2)\)
(f)
\(f(x) = \sqrt[5]{x^7}\ln(x+1)\)