Manipulating Taylor Series
To find the Taylor series of complicated functions, it's often easiest to manipulate the Taylor series of simpler functions.
This post is part of the book Justin Math: Calculus. Suggested citation: Skycak, J. (2019). Manipulating Taylor Series. In Justin Math: Calculus. https://justinmath.com/manipulating-taylor-series/
Want to get notified about new posts? Join the mailing list and follow on X/Twitter.
To find the Taylor series of complicated functions, it’s often easiest to manipulate the Taylor series of simpler functions, such as those given below.
Multiplying by a Constant
For example, to compute the Taylor series of $xe^x$ centered at $x=0$, we can take the elementary Taylor series $e^x=\sum_{n=0}^\infty \frac{x^n}{n!}$ and multiply it by $x$.
Though not strictly necessary, we can make the exponent on the match the index of summation by changing the index of summation to $k=n+1$.
In this case, since we are multiplying the series by a constant, the interval of convergence of the series will stay the same: $-\infty < x < \infty$.
This is because a convergent series has a finite sum, and multiplying by a constant cannot cause a finite number to become infinite; whereas a divergent series has an infinite sum, and multiplying by a constant cannot cause an infinite number to become finite.
Multiplying Two Series
Similarly, to compute the Taylor series of $\frac{e^x}{1-x}$ around $x=0$, we can multiply the two elementary Taylor series $e^x = \sum_{n=0}^\infty \frac{x^n}{n!}$ and $\frac{1}{1-x} = \sum_{n=0}^\infty \frac{x^n}{n!}$.
Defining a new index of summation $m=n+k$, we can write the series in order of increasing powers of $x$.
The interval of convergence of a product of series is at least the intersection of the series’ individual intervals of convergence.
Here, recalling that the interval of convergence of the Taylor series of $e^x$ is $(-\infty,\infty)$ and the interval of convergence of the Taylor series of $\frac{1}{1-x}$ is $(-\infty, \infty)$, we determine that the interval of convergence for the Taylor series of $\frac{e^x}{1-x}$ must be at least the intersection $(-\infty, \infty) \cap (-1,1) = (-1, 1)$.
If we go through the trouble of performing a test of convergence, it’s possible that we might find a larger interval of convergence – but just based on the intervals of convergence of the two series being multiplied, we can say with certainty that the product converges for at least $-1 < x < 1$, without needing to perform any tests of convergence.
Adding Two Series
Sometimes, we can take advantage of the fact that it’s easier to add or subtract series than to multiply series.
For example, to find the Taylor series of $e^x(1-e^x)$ around $x=0$, one option is to multiply the Taylor series of $e^x$ and $1-e^x$.
However, an easier route is to simplify the expression to $e^x-e^{2x}$, and then subtract the Taylor series of $e^{2x}$ from the Taylor series of $e^x$. To compute the Taylor series of $e^{2x}$, we can substitute $2x$ for $x$ in the Taylor series of $e^x$.
Then, we can proceed with subtracting the Taylor series.
Again, the interval of convergence of a sum or difference of series is at least the intersection of the series’ individual intervals of convergence.
The series for $e^x$ converges for $-\infty < x < \infty$, so the series for $e^{2x}$ converges for $-\infty < 2x < \infty$, which simplifies to $-\infty < x < \infty$. The intersection is given by $(-\infty, \infty) \cap (-\infty, \infty) = (-\infty, \infty)$, so the interval of convergence of the series for $e^x-e^{2x}$ is at least $-\infty < x < \infty$.
Note that this interval contains all real numbers, so the interval can’t get any bigger. Thus, the interval of convergence of the series for $e^x-e^{2x}$ is $-\infty < x < \infty$.
Using Differentiation and Integration
We can also use differentiation and integration to simplify the process of finding Taylor series. For example, to find the Taylor series of $\sin^2 x$, one option is to multiply the series of $\sin x$ by itself – but an easier option is to differentiate to yield a simpler result, then find the Taylor series of the simpler result, and then integrate the Taylor series to get back to the original function.
To solve for the constant of integration, we can substitute $x=0$.
Thus, we have
Though not strictly necessary, we can clean up the series a bit by changing the index of summation to $k=n+1$.
Neither differentiating nor integrating a Taylor series changes its interval of convergence, so the interval of convergence of the series for $\sin^2 x$ is the same as the interval of convergence of the series for $\sin 2x$, which is $-\infty < x < \infty$.
Substitution
In the previous examples, we computed the series for $\sin 2x$ and $e^{2x}$ by substituting $2x$ for $x$ in the series for $\sin x$ and $e^x$. We can extend this idea to more clever substitutions.
For example, to compute the series of the function $\frac{1}{2+x^5}$, we can substitute $-\frac{x^5}{2}$ for $x$ in the elementary series $\frac{1}{1-x} = \sum_{n=0}^\infty x^n$.
After substitution, the interval of convergence becomes $-1 < -\frac{x^5}{2} < 1$, which simplifies to $-\sqrt[5]{2} < x < \sqrt[5]{2}$.
Exercises
Compute the Taylor series for the following functions, centered at $x=0$. (You can view the solution by clicking on the problem.)
$\begin{align*} 1) \hspace{.5cm} f(x) = x \ln (1+x^2) \end{align*}$
Solution:
$\begin{align*} &\sum\limits_{n=1}^\infty \frac{(-1)^{n+1} }{n}x^{2n+1} \\ & -1 < x \leq 1 \end{align*}$
$\begin{align*} 2) \hspace{.5cm} f(x) = \frac{1}{x^2} \arctan (2x^3) \end{align*}$
Solution:
$\begin{align*} &\sum\limits_{n=0}^\infty \frac{(-1)^n 2^{2n+1} }{2n+1}x^{6n+1} \\ & -\sqrt[3]{\frac{1}{2} } \leq x \leq \sqrt[3]{\frac{1}{2} } \end{align*}$
$\begin{align*} 3) \hspace{.5cm} f(x) = \frac{1}{1+2x} \end{align*}$
Solution:
$\begin{align*} &\sum\limits_{n=0}^\infty (-2)^n x^n \\ & -\frac{1}{2} < x < \frac{1}{2} \end{align*}$
$\begin{align*} 4) \hspace{.5cm} f(x) = \cos \left( \sqrt{ \pi x } \right) \end{align*}$
Solution:
$\begin{align*} &\sum\limits_{n=0}^\infty \frac{(-1)^n \pi^n}{(2n)!}x^n \\ & 0 \leq x \leq \infty \end{align*}$
$\begin{align*} 5) \hspace{.5cm} f(x) = \ln (e+x) \end{align*}$
Solution:
$\begin{align*} & 1+\sum\limits_{n=1}^\infty \frac{(-1)^{n+1} }{ne^n}x^n \\ & -e < x \leq e \end{align*}$
$\begin{align*} 6) \hspace{.5cm} f(x) = (\cos x + \sin x)(\cos x - \sin x) \end{align*}$
Solution:
$\begin{align*} &\sum\limits_{n=0}^\infty \frac{(-1)^n 2^{2n} }{(2n)!}x^{2n} \\ & -\infty < x < \infty \end{align*}$
$\begin{align*} 7) \hspace{.5cm} f(x) = \sin^2 (3x) \end{align*}$
Solution:
$\begin{align*} &\sum\limits_{n=1}^\infty \frac{(-1)^{n+1} 3^{2n} 2^{2n-1} }{(2n)!}x^{2n} \\ & -\infty < x < \infty \end{align*}$
$\begin{align*} 8) \hspace{.5cm} f(x) = \cos^2 (\pi x) \end{align*}$
Solution:
$\begin{align*} & 1 + \sum\limits_{n=1}^\infty \frac{(-1)^n \pi^{2n} 2^{2n-1} }{(2n)!}x^{2n} \\ & -\infty < x < \infty \end{align*}$
This post is part of the book Justin Math: Calculus. Suggested citation: Skycak, J. (2019). Manipulating Taylor Series. In Justin Math: Calculus. https://justinmath.com/manipulating-taylor-series/
Want to get notified about new posts? Join the mailing list and follow on X/Twitter.