## Functions as Maclaurin and Taylor Series

### Learning Outcomes

• Write the terms of the binomial series
• Recognize the Taylor series expansions of common functions
• Recognize and apply techniques to find the Taylor series for a function

## The Binomial Series

Our first goal in this section is to determine the Maclaurin series for the function $f\left(x\right)={\left(1+x\right)}^{r}$ for all real numbers $r$. The Maclaurin series for this function is known as the binomial series. We begin by considering the simplest case: $r$ is a nonnegative integer. We recall that, for $r=0,1,2,3,4,f\left(x\right)={\left(1+x\right)}^{r}$ can be written as

$\begin{array}{}\\ f\left(x\right)={\left(1+x\right)}^{0}=1,\hfill \\ f\left(x\right)={\left(1+x\right)}^{1}=1+x,\hfill \\ f\left(x\right)={\left(1+x\right)}^{2}=1+2x+{x}^{2},\hfill \\ f\left(x\right)={\left(1+x\right)}^{3}=1+3x+3{x}^{2}+{x}^{3},\hfill \\ f\left(x\right)={\left(1+x\right)}^{4}=1+4x+6{x}^{2}+4{x}^{3}+{x}^{4}.\hfill \end{array}$

The expressions on the right-hand side are known as binomial expansions and the coefficients are known as binomial coefficients. More generally, for any nonnegative integer $r$, the binomial coefficient of ${x}^{n}$ in the binomial expansion of ${\left(1+x\right)}^{r}$ is given by

$\left(\begin{array}{c}r\hfill \\ n\hfill \end{array}\right)=\frac{r\text{!}}{n\text{!}\left(r-n\right)\text{!}}$

and

$\begin{array}{cc}\hfill f\left(x\right)& ={\left(1+x\right)}^{r}\hfill \\ & =\left(\begin{array}{c}r\hfill \\ 0\hfill \end{array}\right)1+\left(\begin{array}{c}r\hfill \\ 1\hfill \end{array}\right)x+\left(\begin{array}{c}r\hfill \\ 2\hfill \end{array}\right){x}^{2}+\left(\begin{array}{c}r\hfill \\ 3\hfill \end{array}\right){x}^{3}+\cdots +\left(\begin{array}{c}r\hfill \\ r - 1\hfill \end{array}\right){x}^{r - 1}+\left(\begin{array}{c}r\hfill \\ r\hfill \end{array}\right){x}^{r}\hfill \\ & ={\displaystyle\sum _{n=0}^{r}}\left(\begin{array}{c}r\hfill \\ n\hfill \end{array}\right){x}^{n}.\hfill \end{array}$

For example, using this formula for $r=5$, we see that

$\begin{array}{cc}\hfill f\left(x\right)& ={\left(1+x\right)}^{5}\hfill \\ & =\left(\begin{array}{c}5\hfill \\ 0\hfill \end{array}\right)1+\left(\begin{array}{c}5\hfill \\ 1\hfill \end{array}\right)x+\left(\begin{array}{c}5\hfill \\ 2\hfill \end{array}\right){x}^{2}+\left(\begin{array}{c}5\hfill \\ 3\hfill \end{array}\right){x}^{3}+\left(\begin{array}{c}5\hfill \\ 4\hfill \end{array}\right){x}^{4}+\left(\begin{array}{c}5\hfill \\ 5\hfill \end{array}\right){x}^{5}\hfill \\ & =\frac{5\text{!}}{0\text{!}5\text{!}}1+\frac{5\text{!}}{1\text{!}4\text{!}}x+\frac{5\text{!}}{2\text{!}3\text{!}}{x}^{2}+\frac{5\text{!}}{3\text{!}2\text{!}}{x}^{3}+\frac{5\text{!}}{4\text{!}1\text{!}}{x}^{4}+\frac{5\text{!}}{5\text{!}0\text{!}}{x}^{5}\hfill \\ & =1+5x+10{x}^{2}+10{x}^{3}+5{x}^{4}+{x}^{5}.\hfill \end{array}$

We now consider the case when the exponent $r$ is any real number, not necessarily a nonnegative integer. If $r$ is not a nonnegative integer, then $f\left(x\right)={\left(1+x\right)}^{r}$ cannot be written as a finite polynomial. However, we can find a power series for $f$. Specifically, we look for the Maclaurin series for $f$. To do this, we find the derivatives of $f$ and evaluate them at $x=0$.

$\begin{array}{cccccccc}\hfill f\left(x\right)& =\hfill & {\left(1+x\right)}^{r}\hfill & & & \hfill f\left(0\right)& =\hfill & 1\hfill \\ \hfill {f}^{\prime }\left(x\right)& =\hfill & r{\left(1+x\right)}^{r - 1}\hfill & & & \hfill f\prime \left(0\right)& =\hfill & r\hfill \\ \hfill f^{\prime\prime}\left(x\right)& =\hfill & r\left(r - 1\right){\left(1+x\right)}^{r - 2}\hfill & & & \hfill f^{\prime\prime}\left(0\right)& =\hfill & r\left(r - 1\right)\hfill \\ \hfill f^{\prime\prime\prime}\left(x\right)& =\hfill & r\left(r - 1\right)\left(r - 2\right){\left(1+x\right)}^{r - 3}\hfill & & & \hfill f^{\prime\prime\prime}\left(0\right)& =\hfill & r\left(r - 1\right)\left(r - 2\right)\hfill \\ \hfill {f}^{\left(n\right)}\left(x\right)& =\hfill & r\left(r - 1\right)\left(r - 2\right)\cdots \left(r-n+1\right){\left(1+x\right)}^{r-n}\hfill & & & \hfill {f}^{\left(n\right)}\left(0\right)& =\hfill & r\left(r - 1\right)\left(r - 2\right)\cdots \left(r-n+1\right)\hfill \end{array}$

We conclude that the coefficients in the binomial series are given by

$\frac{{f}^{\left(n\right)}\left(0\right)}{n\text{!}}=\frac{r\left(r - 1\right)\left(r - 2\right)\cdots \left(r-n+1\right)}{n\text{!}}$.

We note that if $r$ is a nonnegative integer, then the $\left(r+1\right)\text{st}$ derivative ${f}^{\left(r+1\right)}$ is the zero function, and the series terminates. In addition, if $r$ is a nonnegative integer, then the above equation for the coefficients agrees with $\left(\begin{array}{c}r\hfill \\ n\hfill \end{array}\right)=\frac{r\text{!}}{n\text{!}\left(r-n\right)\text{!}}$ for the coefficients, and the formula for the binomial series agrees with the equation that follows for the finite binomial expansion. More generally, to denote the binomial coefficients for any real number $r$, we define

$\left(\begin{array}{c}r\hfill \\ n\hfill \end{array}\right)=\frac{r\left(r - 1\right)\left(r - 2\right)\cdots \left(r-n+1\right)}{n\text{!}}$.

With this notation, we can write the binomial series for ${\left(1+x\right)}^{r}$ as

$\displaystyle\sum _{n=0}^{\infty }\left(\begin{array}{c}r\hfill \\ n\hfill \end{array}\right){x}^{n}=1+rx+\frac{r\left(r - 1\right)}{2\text{!}}{x}^{2}+\cdots +\frac{r\left(r - 1\right)\cdots \left(r-n+1\right)}{n\text{!}}{x}^{n}+\cdots$.

We now need to determine the interval of convergence for the binomial series of the above equation. We apply the ratio test. Consequently, we consider

$\begin{array}{cc}\hfill \frac{|{a}_{n+1}|}{|{a}_{n}|}& =\frac{{|r\left(r - 1\right)\left(r - 2\right)\cdots \left(r-n\right)|x||}^{n+1}}{\left(n+1\right)\text{!}}\cdot \frac{n\text{!}}{|r\left(r - 1\right)\left(r - 2\right)\cdots \left(r-n+1\right)|{|x|}^{n}}\hfill \\ & =\frac{|r-n||x|}{|n+1|}.\hfill \end{array}$

Since

$\underset{n\to \infty }{\text{lim}}\frac{|{a}_{n+1}|}{|{a}_{n}|}=|x|<1$

if and only if $|x|<1$, we conclude that the interval of convergence for the binomial series is $\left(-1,1\right)$. The behavior at the endpoints depends on $r$. It can be shown that for $r\ge 0$ the series converges at both endpoints; for $-1<r<0$, the series converges at $x=1$ and diverges at $x=-1$; and for $r<-1$, the series diverges at both endpoints. The binomial series does converge to ${\left(1+x\right)}^{r}$ in $\left(-1,1\right)$ for all real numbers $r$, but proving this fact by showing that the remainder ${R}_{n}\left(x\right)\to 0$ is difficult.

### Definition

For any real number $r$, the Maclaurin series for $f\left(x\right)={\left(1+x\right)}^{r}$ is the binomial series. It converges to $f$ for $|x|<1$, and we write

$\begin{array}{cc}\hfill {\left(1+x\right)}^{r}& ={\displaystyle\sum _{n=0}^{\infty}}\left(\begin{array}{c}r\hfill \\ n\hfill \end{array}\right){x}^{n}\hfill \\ & =1+rx+\frac{r\left(r - 1\right)}{2\text{!}}{x}^{2}+\cdots +\frac{r\left(r - 1\right)\cdots \left(r-n+1\right)}{n\text{!}}{x}^{n}+\cdots \hfill \end{array}$

for $|x|<1$.

We can use this definition to find the binomial series for $f\left(x\right)=\sqrt{1+x}$ and use the series to approximate $\sqrt{1.5}$.

### Example: Finding Binomial Series

1. Find the binomial series for $f\left(x\right)=\sqrt{1+x}$.
2. Use the third-order Maclaurin polynomial ${p}_{3}\left(x\right)$ to estimate $\sqrt{1.5}$. Use Taylor’s theorem to bound the error. Use a graphing utility to compare the graphs of $f$ and ${p}_{3}$.

Watch the following video to see the worked solution to Example: Finding Binomial Series.

You can view the transcript for “6.4.1” here (opens in new window).

### try it

Find the binomial series for $f\left(x\right)=\frac{1}{{\left(1+x\right)}^{2}}$.

## Common Functions Expressed as Taylor Series

At this point, we have derived Maclaurin series for exponential, trigonometric, and logarithmic functions, as well as functions of the form $f\left(x\right)={\left(1+x\right)}^{r}$. In the table below, we summarize the results of these series. We remark that the convergence of the Maclaurin series for $f\left(x\right)=\text{ln}\left(1+x\right)$ at the endpoint $x=1$ and the Maclaurin series for $f\left(x\right)={\tan}^{-1}x$ at the endpoints $x=1$ and $x=-1$ relies on a more advanced theorem than we present here. (Refer to Abel’s theorem for a discussion of this more technical point.)

Maclaurin Series for Common Functions
Function Maclaurin Series Interval of Convergence
$f\left(x\right)=\frac{1}{1-x}$ $\displaystyle\sum _{n=0}^{\infty }{x}^{n}$ $-1<x<1$
$f\left(x\right)={e}^{x}$ $\displaystyle\sum _{n=0}^{\infty }\frac{{x}^{n}}{n\text{!}}$ $\text{-}\infty <x<\infty$
$f\left(x\right)=\sin{x}$ $\displaystyle\sum _{n=0}^{\infty }{\left(-1\right)}^{n}\frac{{x}^{2n+1}}{\left(2n+1\right)\text{!}}$ $\text{-}\infty <x<\infty$
$f\left(x\right)=\cos{x}$ $\displaystyle\sum _{n=0}^{\infty }{\left(-1\right)}^{n}\frac{{x}^{2n}}{\left(2n\right)\text{!}}$ $\text{-}\infty <x<\infty$
$f\left(x\right)=\text{ln}\left(1+x\right)$ $\displaystyle\sum _{n=1}^{\infty }{\left(-1\right)}^{n+1}\frac{{x}^{n}}{n}$ $-1<x\le 1$
$f\left(x\right)={\tan}^{-1}x$ $\displaystyle\sum _{n=0}^{\infty }{\left(-1\right)}^{n}\frac{{x}^{2n+1}}{2n+1}$ $-1<x\le 1$
$f\left(x\right)={\left(1+x\right)}^{r}$ $\displaystyle\sum _{n=0}^{\infty }\left(\begin{array}{c}r\hfill \\ n\hfill \end{array}\right){x}^{n}$ $-1<x<1$

Earlier in the chapter, we showed how you could combine power series to create new power series. Here we use these properties, combined with the Maclaurin series in [link], to create Maclaurin series for other functions.

### Example: Deriving Maclaurin Series from Known Series

Find the Maclaurin series of each of the following functions by using one of the series listed in the table.

1. $f\left(x\right)=\cos\sqrt{x}$
2. $f\left(x\right)=\text{sinh}x$

Watch the following video to see the worked solution to Example: Deriving Maclaurin Series from Known Series.

You can view the transcript for “6.4.3” here (opens in new window).

### try it

Find the Maclaurin series for $\sin\left({x}^{2}\right)$.

### Try It

We also showed previously in this chapter how power series can be differentiated term by term to create a new power series. In the next example, we differentiate the binomial series for $\sqrt{1+x}$ term by term to find the binomial series for $\frac{1}{\sqrt{1+x}}$. Note that we could construct the binomial series for $\frac{1}{\sqrt{1+x}}$ directly from the definition, but differentiating the binomial series for $\sqrt{1+x}$ is an easier calculation.

### Example: Differentiating a Series to Find a New Series

Use the binomial series for $\sqrt{1+x}$ to find the binomial series for $\frac{1}{\sqrt{1+x}}$.

### try it

Find the binomial series for $f\left(x\right)=\frac{1}{{\left(1+x\right)}^{\frac{3}{2}}}$

In this example, we differentiated a known Taylor series to construct a Taylor series for another function. The ability to differentiate power series term by term makes them a powerful tool for solving differential equations. We now show how this is accomplished.