Skip to main content
\(\require{cancel}\newcommand{\highlight}[1]{{\color{blue}{#1}}} \newcommand{\apex}{A\kern -1pt \lower -2pt\mbox{P}\kern -4pt \lower .7ex\mbox{E}\kern -1pt X} \newcommand{\colorlinecolor}{blue!95!black!30} \newcommand{\bwlinecolor}{black!30} \newcommand{\thelinecolor}{\colorlinecolor} \newcommand{\colornamesuffix}{} \newcommand{\linestyle}{[thick, \thelinecolor]} \newcommand{\bmx}[1]{\left[\hskip -3pt\begin{array}{#1} } \newcommand{\emx}{\end{array}\hskip -3pt\right]} \newcommand{\ds}{\displaystyle} \newcommand{\fp}{f'} \newcommand{\fpp}{f''} \newcommand{\lz}[2]{\frac{d#1}{d#2}} \newcommand{\lzn}[3]{\frac{d^{#1}#2}{d#3^{#1}}} \newcommand{\lzo}[1]{\frac{d}{d#1}} \newcommand{\lzoo}[2]{{\frac{d}{d#1}}{\left(#2\right)}} \newcommand{\lzon}[2]{\frac{d^{#1}}{d#2^{#1}}} \newcommand{\lzoa}[3]{\left.{\frac{d#1}{d#2}}\right|_{#3}} \newcommand{\plz}[2]{\frac{\partial#1}{\partial#2}} \newcommand{\plzoa}[3]{\left.{\frac{\partial#1}{\partial#2}}\right|_{#3}} \newcommand{\inflim}[1][n]{\lim\limits_{#1 \to \infty}} \newcommand{\infser}[1][1]{\sum_{n=#1}^\infty} \newcommand{\Fp}{F\primeskip'} \newcommand{\Fpp}{F\primeskip''} \newcommand{\yp}{y\primeskip'} \newcommand{\gp}{g\primeskip'} \newcommand{\dx}{\Delta x} \newcommand{\dy}{\Delta y} \newcommand{\ddz}{\Delta z} \newcommand{\thet}{\theta} \newcommand{\norm}[1]{\left\lVert#1\right\rVert} \newcommand{\vnorm}[1]{\left\lVert\vec #1\right\rVert} \newcommand{\snorm}[1]{\left|\left|\ #1\ \right|\right|} \newcommand{\la}{\left\langle} \newcommand{\ra}{\right\rangle} \newcommand{\dotp}[2]{\vec #1 \cdot \vec #2} \newcommand{\proj}[2]{\text{proj}_{\,\vec #2}{\,\vec #1}} \newcommand{\crossp}[2]{\vec #1 \times \vec #2} \newcommand{\veci}{\vec i} \newcommand{\vecj}{\vec j} \newcommand{\veck}{\vec k} \newcommand{\vecu}{\vec u} \newcommand{\vecv}{\vec v} \newcommand{\vecw}{\vec w} \newcommand{\vecx}{\vec x} \newcommand{\vecy}{\vec y} \newcommand{\vrp}{\vec r\, '} \newcommand{\vsp}{\vec s\, '} \newcommand{\vrt}{\vec r(t)} \newcommand{\vst}{\vec s(t)} \newcommand{\vvt}{\vec v(t)} \newcommand{\vat}{\vec a(t)} \newcommand{\px}{\partial x} \newcommand{\py}{\partial y} \newcommand{\pz}{\partial z} \newcommand{\pf}{\partial f} \newcommand{\mathN}{\mathbb{N}} \newcommand{\zerooverzero}{\ds \raisebox{8pt}{\text{``\ }}\frac{0}{0}\raisebox{8pt}{\textit{ ''}}} \newcommand{\deriv}[2]{\myds\frac{d}{dx}\left(#1\right)=#2} \newcommand{\myint}[2]{\myds\int #1\ dx= {\ds #2}} \DeclareMathOperator{\sech}{sech} \DeclareMathOperator{\csch}{csch} \newcommand{\primeskip}{\hskip.75pt} \newcommand{\plotlinecolor}{blue} \newcommand{\colorone}{blue} \newcommand{\colortwo}{red} \newcommand{\coloronefill}{blue!15!white} \newcommand{\colortwofill}{red!15!white} \newcommand{\abs}[1]{\left\lvert #1\right\rvert} \newcommand{\lt}{<} \newcommand{\gt}{>} \newcommand{\amp}{&} \)

Section8.8Taylor Series

In Section 8.6, we showed how certain functions can be represented by a power series function. In 8.7, we showed how we can approximate functions with polynomials, given that enough derivative information is available. In this section we combine these concepts: if a function \(f(x)\) is infinitely differentiable, we show how to represent it with a power series function.

Definition8.8.1Taylor and Maclaurin Series

Let \(f(x)\) have derivatives of all orders at \(x=c\text{.}\)

  1. The Taylor Series of \(f(x)\text{,}\) centered at \(c\) is \begin{equation*} \infser[0] \frac{f^{(n)}(c)}{n!}(x-c)^n. \end{equation*}

  2. Setting \(c=0\) gives the Maclaurin Series of \(f(x)\): \begin{equation*} \infser[0] \frac{f^{(n)}(0)}{n!}x^n. \end{equation*}

The difference between a Taylor polynomial and a Taylor series is the former is a polynomial, containing only a finite number of terms, whereas the latter is a series, a summation of an infinite set of terms. When creating the Taylor polynomial of degree \(n\) for a function \(f(x)\) at \(x=c\text{,}\) we needed to evaluate \(f\text{,}\) and the first \(n\) derivatives of \(f\text{,}\) at \(x=c\text{.}\) When creating the Taylor series of \(f\text{,}\) it helps to find a pattern that describes the \(n^\text{ th }\) derivative of \(f\) at \(x=c\text{.}\) We demonstrate this in the next two examples.

Example8.8.2The Maclaurin series of \(f(x) = \cos(x)\)

Find the Maclaurin series of \(f(x)=\cos(x)\text{.}\)


Example 8.8.2 found the Taylor Series representation of \(\cos(x)\text{.}\) We can easily find the Taylor Series representation of \(\sin(x)\) by recognizing that \(\int \cos(x)\ dx=\sin(x)\) and apply Theorem 8.6.7.

Example8.8.4The Taylor series of \(f(x)=\ln(x)\) at \(x=1\)

Find the Taylor series of \(f(x) = \ln(x)\) centered at \(x=1\text{.}\)


It is important to note that Definition 8.8.1 defines a Taylor series given a function \(f(x)\text{;}\) however, we cannot yet state that \(f(x)\) is equal to its Taylor series. We will find that “most of the time” they are equal, but we need to consider the conditions that allow us to conclude this.

Theorem 8.7.12 states that the error between a function \(f(x)\) and its \(n^\text{ th }\)–degree Taylor polynomial \(p_n(x)\) is \(R_n(x)\text{,}\) where \begin{equation*} \abs{R_n(x)} \leq \frac{\max\abs{\,f^{(n+1)}(z)}}{(n+1)!}\abs{(x-c)^{(n+1)}}. \end{equation*}

If \(R_n(x)\) goes to 0 for each \(x\) in an interval \(I\) as \(n\) approaches infinity, we conclude that the function is equal to its Taylor series expansion.

We demonstrate the use of this theorem in an example.

Example8.8.7Establishing equality of a function and its Taylor series

Show that \(f(x) = \cos(x)\) is equal to its Maclaurin series, as found in Example 8.8.2, for all \(x\text{.}\)


It is natural to assume that a function is equal to its Taylor series on the series' interval of convergence, but this is not the case. In order to properly establish equality, one must use Theorem 8.8.6. This is a bit disappointing, as we developed beautiful techniques for determining the interval of convergence of a power series, and proving that \(R_n(x)\to 0\) can be cumbersome as it deals with high order derivatives of the function.

There is good news. A function \(f(x)\) that is equal to its Taylor series, centered at any point the domain of \(f(x)\text{,}\) is said to be an analytic function, and most, if not all, functions that we encounter within this course are analytic functions. Generally speaking, any function that one creates with elementary functions (polynomials, exponentials, trigonometric functions, etc.) that is not piecewise defined is probably analytic. For most functions, we assume the function is equal to its Taylor series on the series' interval of convergence and only use Theorem 8.8.6 when we suspect something may not work as expected.

We develop the Taylor series for one more important function, then give a table of the Taylor series for a number of common functions.

Example8.8.8The Binomial Series

Find the Maclaurin series of \(f(x) = (1+x)^k\text{,}\) \(k\neq 0\text{.}\)


We learned that Taylor polynomials offer a way of approximating a “difficult to compute” function with a polynomial. Taylor series offer a way of exactly representing a function with a series. One probably can see the use of a good approximation; is there any use of representing a function exactly as a series?

While we should not overlook the mathematical beauty of Taylor series (which is reason enough to study them), there are practical uses as well. They provide a valuable tool for solving a variety of problems, including problems relating to integration and differential equations.

In Key Idea 8.8.9 (on the following page) we give a table of the Taylor series of a number of common functions. We then give a theorem about the “algebra of power series,” that is, how we can combine power series to create power series of new functions. This allows us to find the Taylor series of functions like \(f(x) = e^x\cos(x)\) by knowing the Taylor series of \(e^x\) and \(\cos(x)\text{.}\)

Before we investigate combining functions, consider the Taylor series for the arctangent function (see Key Idea 8.8.9). Knowing that \(\tan^{-1}(1) = \pi/4\text{,}\) we can use this series to approximate the value of \(\pi\text{:}\) \begin{align*} \frac{\pi}4 \amp = \tan^{-1}(1) = 1-\frac13+\frac15-\frac17+\frac19-\cdots\\ \pi \amp = 4\left(1-\frac13+\frac15-\frac17+\frac19-\cdots\right) \end{align*}

Unfortunately, this particular expansion of \(\pi\) converges very slowly. The first 100 terms approximate \(\pi\) as \(3.13159\text{,}\) which is not particularly good.

Key Idea8.8.9Important Taylor Series Expansions
Function and Series First Few Terms Interval of
Convergence }
\(\ds e^x = \infser[0] \frac{x^n}{n!}\) \(\ds 1+ x+\frac{x^2}{2!} + \frac{x^3}{3!}+\cdots\) \((-\infty,\infty)\)
\(\ds \sin(x) = \infser[0] (-1)^n\frac{x^{2n+1}}{(2n+1)!}\) \(\ds x-\frac{x^3}{3!}+\frac{x^5}{5!} - \frac{x^7}{7!}+\cdots\) \((-\infty,\infty)\)
\(\ds \cos(x) = \infser[0] (-1)^n\frac{x^{2n}}{(2n)!}\) \(\ds 1-\frac{x^2}{2!}+\frac{x^4}{4!} - \frac{x^6}{6!} +\cdots\) \((-\infty,\infty)\)
\(\ds \ln(x) = \infser(-1)^{n+1}\frac{(x-1)^n}{n}\) \(\ds (x-1)- \frac{(x-1)^2}{2} +\frac{(x-1)^3}{3}-\cdots\) \((0,2]\)
\(\ds \frac{1}{1-x} = \infser[0] x^n\) \(\ds 1+x+x^2+x^3+\cdots\) \((-1,1)\)
\(\small\ds (1+x)^k=\infser[0] \frac{k(k-1)\cdots\big(k-(n-1)\big)}{n!}x^n\) \(\ds 1+kx+\frac{k(k-1)}{2!}x^2 + \cdots\) \((-1,1)\) 1 
\(\ds \tan^{-1}(x) = \infser[0] (-1)^n\frac{x^{2n+1}}{2n+1}\) \(\ds x-\frac{x^3}{3}+\frac{x^5}{5}-\frac{x^7}{7}+\cdots\) \([-1,1]\)

Example8.8.11Combining Taylor series

Write out the first 3 terms of the Taylor Series for \(f(x) = e^x\cos(x)\) using Key Idea 8.8.9 and Theorem 8.8.10.

Example8.8.12Creating new Taylor series

Use Theorem 8.8.10 to create series for \(y=\sin(x^2)\) and \(y=\ln(\sqrt{x})\text{.}\)

Example8.8.13Using Taylor series to evaluate definite integrals

Use the Taylor series of \(e^{-x^2}\) to evaluate \(\ds \int_0^1e^{-x^2}\ dx\text{.}\)

Example8.8.14Using Taylor series to solve differential equations

Solve the differential equation \(y'=2y\) in terms of a power series, and use the theory of Taylor series to recognize the solution in terms of an elementary function.


Finding a pattern in the coefficients that match the series expansion of a known function, such as those shown in Key Idea 8.8.9, can be difficult. What if the coefficients in the previous example were given in their reduced form; how could we still recover the function \(y=e^{2x}\text{?}\)

Suppose that all we know is that \begin{equation*} a_0=1, a_1=2, a_2=2, a_3=\frac43, a_4=\frac23. \end{equation*}

Definition 8.8.1 states that each term of the Taylor expansion of a function includes an \(n!\text{.}\) This allows us to say that \begin{equation*} a_2=2=\frac{b_2}{2!}, a_3 = \frac43=\frac{b_3}{3!}, \text{ and } a_4 = \frac23=\frac{b_4}{4!} \end{equation*} for some values \(b_2\text{,}\) \(b_3\) and \(b_4\text{.}\) Solving for these values, we see that \(b_2=4\text{,}\) \(b_3 = 8\) and \(b_4=16\text{.}\) That is, we are recovering the pattern we had previously seen, allowing us to write \begin{align*} f(x) = \infser[0] a_nx^n \amp = \infser[0] \frac{b_n}{n!}x^n\\ \amp = 1+2x+ \frac{4}{2!}x^2 + \frac{8}{3!}x^3+\frac{16}{4!}x^4 + \cdots \end{align*}

From here it is easier to recognize that the series is describing an exponential function.

There are simpler, more direct ways of solving the differential equation \(y' = 2y\text{.}\) We applied power series techniques to this equation to demonstrate its utility, and went on to show how sometimes we are able to recover the solution in terms of elementary functions using the theory of Taylor series. Most differential equations faced in real scientific and engineering situations are much more complicated than this one, but power series can offer a valuable tool in finding, or at least approximating, the solution.

This chapter introduced sequences, which are ordered lists of numbers, followed by series, wherein we add up the terms of a sequence. We quickly saw that such sums do not always add up to “infinity,” but rather converge. We studied tests for convergence, then ended the chapter with a formal way of defining functions based on series. Such “series–defined functions” are a valuable tool in solving a number of different problems throughout science and engineering.

Coming in the next chapters are new ways of defining curves in the plane apart from using functions of the form \(y=f(x)\text{.}\) Curves created by these new methods can be beautiful, useful, and important.


Terms and Concepts