In Section 10.7 we learned to represent functions as
power series based on geometric series.
But how do we generalize this idea beyond geometric series,
and how can we prove that a function even has a power series representation?
In this section we answer these questions, and we learn to write Taylor and Maclaurin series,
specific types of power series for functions involving their derivatives at a certain point.
Doing so unlocks many possibilities, since polynomials are simple functions to construct, both in mathematics and its applications.
We discuss the following topics:
In Section 2.8
we constructed a tangent line \(y = L(x)\) to the curve \(y = f(x)\)
at some point \((a, f(a)).\)
(See Figure 1.)
An equation for \(L(x)\) is
\begin{equation}
L(x) = f(a) + f'(a) (x - a) \pd \label{eq:L(x)}
\end{equation}
This model takes \(f(a) = L(a)\) and \(f'(a) = L'(a).\)
In doing so, we approximate the function \(f\) using a first-degree polynomial
that intersects the curve at \(x = a\) and whose derivative at \(x = a\) is equal to \(f'(a).\)
But the polynomial would become an even better approximation of \(f\) if, at \(x = a,\)
its second, third, and fourth derivatives
also equaled the derivatives of \(f\) at \(a.\)
(The polynomial better approximates \(f\) if the rates of change are the same.)
Continuing this pattern, let's suppose that \(P^{(n)}(a) = f^{(n)}(a)\)
for any nonnegative integer \(n.\)
The general \(N\)th-degree polynomial for \(f\) centered at \(x = a\) is
\begin{equation}
P(x) = c_0 + c_1 (x - a) + c_2 (x - a)^2 + c_3 (x - a)^3 + c_4 (x - a)^4 + \cdots + c_N (x - a)^N \pd \label{eq:P(x)}
\end{equation}
Let's try to express the coefficients \(c_1, c_2, \dots,\) \(c_N\) in terms of the derivatives of \(f\) at \(a.\)
Repeated differentiation of \(P\) shows
\[
\ba
P'(x) &= c_1 + 2 c_2 (x - a) + 3 c_3 (x - a)^2 + 4 c_4 (x - a)^3 + \cdots + N c_N (x - a)^{N - 1} \cma \nl
P''(x) &= 2 c_2 + (3 \cdot 2) c_3 (x - a) + (4 \cdot 3) c_4 (x - a)^2 + \cdots + N (N - 1) c_N (x - a)^{N - 2} \cma \nl
P''' (x) &= (3 \cdot 2) c_3 + (4 \cdot 3 \cdot 2) c_4 (x - a) + \cdots + N (N - 1) (N - 2) c_N (x - a)^{N - 3} \cma \nl
&\vdotss \nl
P^{(N)}(x) &= N(N - 1)(N - 2) \cdot \, \cdots \, \cdot 2 \cdot 1 c_N \pd
\ea
\]
Letting \(x = a\) in the equations, we see that all the factors \((x - a)\) become \(0\) and so
\[P(a) = c_0 \cmaa P'(a) = c_1 \cmaa P''(a) = (2 \cdot 1) c_2 \cmaa P'''(a) = (3 \cdot 2 \cdot 1) c_3 \cmaa
P^{(N)}(a) = N! \, c_N \pd\]
We want \(P^{(n)}(a) = f^{(n)}(a),\) so we equate the expressions and solve for the coefficients:
\[c_0 = f(a) \cmaa c_1 = f'(a) \cmaa c_2 = \frac{f''(a)}{2!} \cmaa c_3 = \frac{f'''(a)}{3!} \cmaa
c_N = \frac{f^{(N)}(a)}{N!} \pd\]
Substituting these expressions into \(\eqref{eq:P(x)}\) gives
\begin{equation}
P(x) = f(a) + f'(a) (x - a) + \frac{f''(a)}{2!} (x - a)^2 + \frac{f'''(a)}{3!} (x - a)^3
+ \cdots + \frac{f^{(N)}(a)}{N!} (x - a)^N \pd
\label{eq:taylor-poly-N}
\end{equation}
We call this function an \(N\)th-degree Taylor polynomial
for \(f\) centered at \(x = a.\)
In fact, the linearization in \(\eqref{eq:L(x)}\)
is a first-degree Taylor polynomial centered at \(x = a.\)
Let's suppose that adding higher-degree terms to the polynomial—that is, increasing \(N\)—increases
the accuracy of the polynomial \(P\) in approximating \(f.\)
(See Animation 1.)
If we continue this pattern to all orders, then we attain a Taylor series:
\begin{equation}
\ba
T(x) &= f(a) + f'(a) (x - a) + \frac{f''(a)}{2!} (x - a)^2 + \frac{f'''(a)}{3!} (x - a)^3
+ \cdots \nl
&= \sum_{n = 0}^\infty \frac{f^{(n)}(a)}{n!} (x - a)^n \pd
\ea
\label{eq:taylor-series}
\end{equation}
This expansion is a special power series whose coefficients involve the derivatives of \(f\) at \(a.\)
In \(\eqref{eq:taylor-series}\) if \(a = 0,\) then the series becomes a Maclaurin series,
the special name given to a Taylor series centered at \(a = 0.\)
We have
\begin{equation}
\ba
T(x) &= f(0) + f'(0) x + \frac{f''(0)}{2!} x^2 + \frac{f'''(0)}{3!} x^3
+ \cdots \nl
&= \sum_{n = 0}^\infty \frac{f^{(n)}(0)}{n!} x^n \pd
\ea
\label{eq:maclaurin-series}
\end{equation}
Similarly, a Maclaurin polynomial uses only a few terms of a Maclaurin series
to approximate a function \(f.\)
TAYLOR SERIES AND MACLAURIN SERIES
If \(f\) has derivatives of all orders at \(a,\)
then the Taylor series of \(f\) centered at \(a\) is
\begin{equation}
\ba
T(x) &= f(a) + f'(a) (x - a) + \frac{f''(a)}{2!} (x - a)^2 + \frac{f'''(a)}{3!} (x - a)^3
+ \cdots \nl
&= \sum_{n = 0}^\infty \frac{f^{(n)}(a)}{n!} (x - a)^n \pd
\ea
\eqlabel{eq:taylor-series}
\end{equation}
For \(a = 0,\) the Maclaurin series
of \(f\) is
\begin{equation}
\ba
T(x) &= f(0) + f'(0) x + \frac{f''(0)}{2!} x^2 + \frac{f'''(0)}{3!} x^3
+ \cdots \nl
&= \sum_{n = 0}^\infty \frac{f^{(n)}(0)}{n!} x^n \pd
\ea
\eqlabel{eq:maclaurin-series}
\end{equation}
EXAMPLE 1
Find the fourth-degree Taylor polynomial for \(f(x) = \ln x\)
centered at \(a = 1.\)
We take \(N = 4\) derivatives of \(f(x) = \ln x\) at \(x = 1,\) as follows:
\[f'(x) = \frac{1}{x} \cmaa f''(x) = -\frac{1}{x^2} \cmaa f'''(x) = \frac{2}{x^3} \cmaa f^{(4)}(x) = -\frac{6}{x^4} \pd\]
We therefore see
\[
\ba
f(1) &= \ln 1 = 0 \cma \nl
f'(1) &= \frac{1}{1} = 1 \cma \nl
f''(1) &= -\frac{1}{1^2} = -1 \cma \nl
f'''(1) &= \frac{2}{1^3} = 2 \cma \nl
f^{(4)}(1) &= -\frac{6}{1^4} = -6 \pd
\ea
\]
So the Taylor polynomial is, following \(\eqref{eq:taylor-series}\) up to the fourth-degree term,
\[
\ba
T_4(x) &= 0 + 1(x - 1) + \frac{-1}{2!}(x - 1)^2 + \frac{2}{3!}(x - 1)^3 + \frac{-6}{4!}(x - 1)^4 \nl
&= \boxed{(x - 1) - \tfrac{1}{2} (x - 1)^2 + \tfrac{1}{3} (x - 1)^3 - \tfrac{1}{4} (x - 1)^4}
\ea
\]
Figure 2 shows the graphs of \(y = \ln x\)
and the Taylor polynomial \(y = T_4(x).\)
These curves are nearly identical for \(x\) close to the center, \(a = 1.\)
Yet for \(x\) farther from \(1,\) the polynomial deviates from the curve \(y = \ln x.\)
EXAMPLE 2
Determine the Maclaurin series for \(f(x) = e^x.\)
Find its interval of convergence and radius of convergence.
For all \(n\) we see \(f^{(n)}(x) = e^x,\)
so \(f^{(n)}(0) = e^0 = 1.\)
The Maclaurin series for \(e^x\) is, following \(\eqref{eq:maclaurin-series},\)
\[
\sum_{n = 0}^\infty \frac{f^{(n)}(0) x^n}{n!} = \sum_{n = 0}^\infty \frac{x^n}{n!}
= 1 + x + \frac{x^2}{2!} + \frac{x^3}{3!} + \cdots \pd
\]
To find the interval of convergence, we let \(a_n = x^n/n!\) and see
\[
\ba
L &= \lim_{n \to \infty} \abs{\frac{a_{n + 1}}{a_n}} \nl
&= \lim_{n \to \infty} \abs{\frac{x^{n + 1}}{(n + 1)!} \cdot \frac{n!}{x^n}} \nl
&= \lim_{n \to \infty} \abs{\frac{x}{n + 1}} = 0 \pd
\ea
\]
(See Section 10.7 to review
finding the interval of convergence.)
Since \(L = 0,\)
the Maclaurin series converges for all \(x.\)
Hence, the interval of convergence is \(\boxed{(-\infty, \infty)}\)
and the radius of convergence is \(\boxed{R = \infty}.\)
Taylor's Remainder Theorem
Up to this point, we have assumed
that a function \(f\) has a Taylor series expansion at \(x = a.\)
But for \(x\) in an interval \(I,\) a Taylor series may diverge;
or if it does converge in \(I,\) then it may not converge to \(f(x).\)
How do we know whether the Taylor series expansion equals \(f(x)\) over \(I \ques\)
For example, in Example 2 we showed that \(\sum_{n = 0}^\infty x^n/n!\)
converges, but we don't know whether the series converges to \(e^x.\)
(The series could converge but represent a different function.)
So if \(f\) has derivatives of all orders at \(a,\) then when does
\[f(x) = \sum_{n = 0}^\infty \frac{f^{(n)}(a)}{n!} (x - a)^n \ques\]
Let's define some quantity \(R_N(x)\) to be the remainder (or error)
of an \(N\)th-degree Taylor polynomial \(T_N(x).\)
This quantity, which can be positive or negative, is the amount by which our estimate \(T_N(x)\)
differs from the true function \(f(x).\)
We therefore assert that
\[
f(x) = \underbrace{T_N(x)}_{\text{approximation}} + \underbrace{R_N(x)}_{\text{remainder}} \pd
\]
[As an example, if \(f(3) = 5\) but our Taylor polynomial estimates it to be \(T_N(3) = 4,\)
then the remainder is \(R_N(3) = 1.\)]
If \(R_N(x) \to 0\) as \(N \to \infty,\)
then as we increase the degree \(N,\)
the Taylor series eventually becomes no different from \(f(x)\) over the interval \(I.\)
Hence, a function equals its Taylor series over \(I\) if and only if \(\lim_{N \to \infty} R_N(x) = 0.\)
We use Taylor's Remainder Theorem, given below, to attain a bound
for the remainder \(R_N(x).\)
(The error bound is also called the Lagrange Error Bound.)
TAYLOR'S REMAINDER THEOREM
Suppose that \(f\) has derivatives up to order \(N + 1.\)
If \(\abs{f^{(N + 1)}(x)} \leq M\) for \(\abs{x - a} \leq r,\)
then the remainder \(R_N(x)\) of the \(N\)th-degree Taylor polynomial satisfies
\[\abs{R_N(x)} \leq \frac{M}{(N + 1)!} \abs{x - a}^{N + 1} \cmaa \abs{x - a} \leq r \pd\]
PROOF FOR \(N = 1\)
We prove Taylor's Remainder Theorem for the case \(N = 1.\)
Given \(\abs{f^{(1 + 1)}(x)}\) \(= \abs{f''(x)} \leq M\) (from the theorem's conditions),
we begin by assuming that \(f''(x) \leq M.\)
So for \(\abs{x - a} \leq r,\) we have
\[\int_a^x f''(t) \di t \leq \int_a^x M \di t = M(x - a) \pd\]
Because an antiderivative of \(f''(t)\) is \(f'(t),\) the inequality becomes
\[f'(x) - f'(a) \leq M(x - a) \pd \]
Replacing \(x\) with a dummy variable \(t\) and integrating both sides from \(a\) to \(x,\) we see
\[
\ba
\int_a^x \parbr{f'(t) - f'(a)} \di t &\leq \int_a^x M(t - a) \di t \nl
f(x) - f(a) - f'(a) (x - a) &\leq \frac{M(x - a)^2}{2} \pd
\ea
\]
But since the first-degree Taylor polynomial is \(T_1(x) = f(a) + f'(a)(x - a),\)
and since \(f(x) - T_1(x)\) \(= R_1(x),\) we have
\[
\ba
f(x) - T_1(x) &\leq \frac{M(x - a)^2}{2} \nl
R_1(x) &\leq \frac{M(x - a)^2}{2} \pd
\ea
\]
Alternatively, if \(f''(x) \geq -M,\) then for \(\abs{x - a} \leq r\) we get
\[
\ba
\int_a^x f''(t) \di t &\geq \int_a^x -M \di t = -M(x - a) \nl
f'(x) - f'(a) &\geq -M(x - a) \nl
\int_a^x \parbr{f'(t) - f'(a)} \di t &\geq -\int_a^x M(t - a) \di t \nl
f(x) - f(a) - f'(a) (x - a) &\geq -\frac{M(x - a)^2}{2} \nl
f(x) - T_1(x) &\geq -\frac{M(x - a)^2}{2} \nl
R_1(x) &\geq -\frac{M(x - a)^2}{2} \nl
\implies \abs{R_1(x)} &\leq \frac{M(x - a)^2}{2} \pd
\ea
\]
For \(N = 2,\) we take \(\abs{f'''(x)} \leq M\)
and integrate three times—with similar ending steps to this proof for \(N = 1.\)
And for \(N \geq 3,\) we integrate \(N + 1\) times, following this procedure.
We can take this case to any \(N,\) thus proving the theorem for any \(N.\)
\[\qedproof\]
EXAMPLE 3
Prove that \(f(x) = e^x\) converges to its Maclaurin series, \(\sum_{n = 0}^\infty x^n/n! \,.\)
For some constant \(r\) such that \(\abs x \leq r,\)
we know \(\abs{f^{(N + 1)}(x)} = e^x\) \(\leq e^r\) for any \(N.\)
Thus, using \(a = 0\) and \(M = e^r\) in Taylor's Remainder Theorem, we see
\[\abs{R_N(x)} \leq \frac{e^r}{(N + 1)!} \abs{x}^{N + 1} \cmaa \abs x \leq r \pd\]
As \(N \to \infty,\) the right side of the inequality approaches \(0.\)
(A factorial grows faster than an exponential function, thus pushing the fraction to \(0.\))
The Squeeze Theorem therefore asserts that \(\lim_{N \to \infty} R_N(x) = 0.\)
In words, as we add more terms to the Taylor polynomial for \(e^x\) (increasing \(N\)),
the amount by which the polynomial differs from \(e^x\) decreases to \(0.\)
Thus, the Taylor series equals \(e^x.\)
The proof in Example 3 allows us to write
\begin{equation}
\ba
e^x &= 1 + x + \frac{x^2}{2!} + \frac{x^3}{3!} + \cdots \nl
&= \sum_{n = 0}^\infty \frac{x^n}{n!} \cmaa -\infty \lt x \lt \infty \pd
\ea
\label{eq:e^x-series}
\end{equation}
If we substitute \(x = 1,\) then we obtain a cute series representation for the number \(e \col\)
\[e = 1 + \frac{1}{1!} + \frac{1}{2!} + \frac{1}{3!} + \cdots \pd\]
This technique allows \(e\) to be calculated precisely,
and it is easier than using the limit \(e = \lim_{n \to \infty} (1 + 1/n)^n.\)
EXAMPLE 4
Find the Maclaurin series for \(f(x) = \sin x\)
and prove that it converges to \(\sin x\) for all \(x.\)
Taking derivatives of \(f(x) = \sin x\) at \(x = 0,\) we see
\[
\ba
f(0) &= \sin 0 = 0 \cma \nl
f'(0) &= \cos 0 = 1 \cma \nl
f''(0) &= -\sin 0 = 0 \cma \nl
f'''(0) &= -\cos 0 = -1 \cma \nl
f^{(4)}(0) &= \sin 0 = 0 \cma \nl
f^{(5)}(0) &= \cos 0 = 1 \cma \nl
&\vdotss
\ea
\]
Observe that the derivatives repeat in cycles of four.
Following \(\eqref{eq:maclaurin-series},\) the Maclaurin series is therefore
\[
\ba
T(x) &= 0 + 1x + \frac{0}{2!} x^2 + \frac{-1}{3!} x^3 + \frac{0}{4!} x^4 + \frac{1}{5!} x^5 + \cdots \nl
&= x - \frac{x^3}{3!} + \frac{x^5}{5!} - \frac{x^7}{7!} + \cdots \nl
&= \boxed{\sum_{n = 0}^\infty \frac{(-1)^n \, x^{2n + 1}}{(2n + 1)!}}
\ea
\]
Figure 3A displays the graph of the third-degree Maclaurin polynomial
for \(\sin x.\)
Likewise, Figure 3B
shows a fifth-degree Maclaurin polynomial, which better represents the curve \(y = \sin x.\)
In each model, the curve is nearly identical to \(\sin x\) near \(x = 0\) but deviates for farther \(x.\)
Convergence to \(\sin x\)
Now we prove that \(T(x) = \sin x\) for all \(x.\)
Since the derivatives of \(f(x) = \sin x\) are always either \(\pm \sin x\) or \(\pm \cos x,\)
whose maximum magnitude is \(1,\)
we use \(\abs{f^{(N + 1)}(x)} \leq 1.\)
Thus, for any \(N\) Taylor's Remainder Theorem asserts that the remainder in
the Maclaurin series satisfies
\[\abs{R_N(x)} \leq \frac{1}{(N + 1)!} \abs{x^{N + 1}} \pd\]
Because a factorial grows more rapidly than an exponential function,
the right side of the inequality approaches \(0\) if we take \(N \to \infty.\)
Hence, the Squeeze Theorem gives \(R_N(x) \to 0\) as \(N \to \infty.\)
In words, the amount by which the Maclaurin series differs from \(\sin x\)
becomes nonexistent if we add more and more terms.
Manipulating Taylor Series
In most cases, it is tedious to find a Taylor series
by repeated differentiation.
But as we discussed in Section 10.7,
we can manipulate power series by differentiation or integration.
Likewise, we can obtain Taylor series for many functions by using the coefficients of a known Taylor series—for example,
by replacing \(x\) with some other function.
For these reasons Example 4,
just as \(\eqref{eq:e^x-series}\) does, yields a landmark result that we'll reference
many times:
\begin{equation}
\ba
\sin x &= x - \frac{x^3}{3!} + \frac{x^5}{5!} - \frac{x^7}{7!} + \cdots \nl
&= \sum_{n = 0}^\infty \frac{(-1)^n \, x^{2n + 1}}{(2n + 1)!} \cmaa -\infty \lt x \lt \infty \pd
\ea
\label{eq:sin-series}
\end{equation}
EXAMPLE 5
Find the Maclaurin series for \(e^{x^2}.\)
Replacing \(x\) with \(x^2\) in \(\eqref{eq:e^x-series}\) gives
\[
\ba
e^{x^2} &= 1 + \par{x^2} + \frac{\par{x^2}^2}{2!} + \frac{\par{x^2}^3}{3!} + \cdots \nl
&= 1 + x^2 + \frac{x^4}{2!} + \frac{x^6}{3!} + \cdots \nl
&= \boxed{\sum_{n = 0}^\infty \frac{x^{2n}}{n!}}
\ea
\]
Compared to repeatedly taking derivatives of \(e^{x^2},\)
this substitution is easier and more gratifying.
Maclaurin Series for \(\cos x\)
To attain the Maclaurin series for \(\cos x,\)
we could compute derivatives of \(f(x) = \cos x\) at \(x = 0,\)
just as we did to attain the Maclaurin series for \(\sin x.\)
But since \(\textderiv{}{x} \par{\sin x} = \cos x,\)
a shortcut is to differentiate the series in \(\eqref{eq:sin-series} \col\)
\[
\ba
\deriv{}{x} (\sin x) &= \deriv{}{x} \par{x - \frac{x^3}{3!} + \frac{x^5}{5!} - \frac{x^7}{7!} + \cdots} \nl
&= 1 - \frac{x^2}{2!} + \frac{x^4}{4!} - \frac{x^6}{6!} + \cdots \pd
\ea
\]
We therefore announce that
\begin{equation}
\ba
\cos x &= 1 - \frac{x^2}{2!} + \frac{x^4}{4!} - \frac{x^6}{6!} + \cdots \nl
&= \sum_{n = 0}^\infty \frac{(-1)^n \, x^{2n}}{(2n)!} \cmaa -\infty \lt x \lt \infty \pd
\ea
\label{eq:cos-series}
\end{equation}
(We know the interval of convergence is \(-\infty \lt x \lt \infty\) because
the radius of convergence is preserved when we differentiate or integrate power series.)
EXAMPLE 6
Find the Maclaurin series for \(f(x) = x^3 \cos x.\)
It is too cumbersome to take derivatives of \(f(x) = x^3 \cos x.\)
Instead, we simply multiply the series in \(\eqref{eq:cos-series}\) by \(x^3 \col\)
\[
\ba
x^3 \cos x &= x^3 \par{1 - \frac{x^2}{2!} + \frac{x^4}{4!} - \frac{x^6}{6!} + \cdots} \nl
&= x^3 - \frac{x^5}{2!} + \frac{x^7}{4!} - \frac{x^9}{6!} + \cdots \nl
&= \boxed{\sum_{n = 0}^\infty \frac{(-1)^n \, x^{2n + 3}}{(2n)!}}
\ea
\]
EXAMPLE 7
Determine a series representation for the integral \(\int (\sin x/x) \di x.\)
A Taylor series proves useful for an integral with no elementary antiderivative.
Using the series in \(\eqref{eq:sin-series},\) we get
\[\frac{\sin x}{x} = \frac{1}{x} \sum_{n = 0}^\infty \frac{(-1)^n \, x^{2n + 1}}{(2n + 1)!}
= \sum_{n = 0}^\infty \frac{(-1)^n \, x^{2n}}{(2n + 1)!} \pd\]
Integrating the series (which we learned to do in Section 10.7),
we see
\[
\ba
\int \frac{\sin x}{x} \di x &= \int \sum_{n = 0}^\infty \frac{(-1)^n \, x^{2n}}{(2n + 1)!} \di x \nl
&= \sum_{n = 0}^\infty \frac{(-1)^n}{(2n + 1)!} \int x^{2n} \di x \nl
&= \boxed{C + \sum_{n = 0}^\infty \frac{(-1)^n \, x^{2n + 1}}{(2n + 1)(2n + 1)!}} \nl
\ea
\]
for some constant \(C.\)
In the next examples, we'll multiply and divide power series.
The best way to perform these operations is to take a few terms of each series,
and multiply and divide them like polynomials.
We then find the first few terms of the product or quotient,
attempting to uncover a pattern.
EXAMPLE 8
Write the fourth-degree Maclaurin polynomial for \(e^x \cos x.\)
The product \(e^x \cos x\) is, by \(\eqref{eq:e^x-series}\) and \(\eqref{eq:cos-series},\)
represented by the expansion
\[
\ba
e^x \cos x &= \par{\sum_{n = 0}^\infty \frac{x^n}{n!}} \par{\sum_{n = 0}^\infty \frac{(-1)^n \, x^{2n}}{(2n)!}} \nl
&= \par{1 + x + \frac{x^2}{2!} + \frac{x^3}{3!} + \frac{x^4}{4!} + \cdots}
\par{1 - \frac{x^2}{2!} + \frac{x^4}{4!} + \cdots} \pd
\ea
\]
Observe that in each set of parentheses, we expand the series up to the fourth-degree term.
This strategy ensures that as we multiply, we catch every term whose degree is four or lower.
Multiplying these polynomials, we see
\[
\ba
e^x \cos x &= \par{1 - \frac{x^2}{2!} + \frac{x^4}{4!} + \cdots} + \par{x - \frac{x^3}{2!} + \frac{x^5}{4!} + \cdots}
+ \par{\frac{x^2}{2!} - \frac{x^4}{(2!)^2} + \frac{x^6}{2! \cdot 4!} + \cdots} \nl
&+ \par{\frac{x^3}{3!} - \frac{x^5}{3! \cdot 2!} + \frac{x^7}{3! \cdot 4!} + \cdots}
+ \par{\frac{x^4}{4!} - \frac{x^6}{4! \cdot 2!} + \frac{x^8}{(4!)^2} + \cdots} \pd
\ea
\]
Because we need the fourth-degree Maclaurin polynomial,
let's collect only the like terms up to \(x^4.\)
Omitting any higher-order terms, we find the polynomial to be
\[
\ba
T_4(x) &= 1 + x + x^2 \par{-\frac{1}{2} + \frac{1}{2}} + x^3 \par{-\frac{1}{2!} + \frac{1}{3!}}
+ x^4 \par{\frac{1}{4!} - \frac{1}{(2!)^2} + \frac{1}{4!}} \nl
&= \boxed{1 + x - \frac{x^3}{3} - \frac{x^4}{6}}
\ea
\]
Beware of notation:
Since we omitted all terms past \(x^4,\) we cannot say
the polynomial equals \(e^x \cos x.\)
We can only write the equals sign if we consider the infinite series.
But we can say \(T_4(x) \approx e^x \cos x.\)
EXAMPLE 9
By dividing series, determine the Maclaurin series for \(\tan x.\)
Since \(\tan x\) \(= (\sin x)/(\cos x),\)
the Maclaurin series for \(\tan x\) is given by
\[
\frac{\ds \sum_{n = 0}^\infty \frac{(-1)^n \, x^{2n + 1}}{(2n + 1)!}}{\ds \sum_{n = 0}^\infty \frac{(-1)^n \, x^{2n}}{(2n)!}}
= \frac{x - \tfrac{1}{6} x^3 + \tfrac{1}{120} x^5 + \cdots}{1 - \tfrac{1}{2} x^2 + \tfrac{1}{24} x^4 + \cdots} \pd
\]
Considering only a few terms in each series, we use polynomial division to divide the polynomials.
\[
\require{enclose}
\begin{array}{rll}
x + \tfrac{1}{3} x^3 + \tfrac{2}{15} x^5 + \cdots \\[-3pt]
1 - \tfrac{1}{2} x^2 + \tfrac{1}{24} x^4 + \cdots
\enclose{longdiv}{x - \tfrac{1}{6} x^3 + \tfrac{1}{120} x^5 + \cdots \!}\kern-.2ex \nl
\begin{alignedat}{2}
x - \tfrac{1}{2} x^3 &+ \hspace{0.34em} \tfrac{1}{24} x^5 &&+ \cdots \nl
\hline
\tfrac{1}{3} x^3 &- \tfrac{1}{30} x^5 &&+ \cdots \nl
\tfrac{1}{3} x^3 &- \tfrac{1}{6} x^5 &&+ \cdots \nl
\hline
&\phantom{-} \; \tfrac{2}{15}x^5 &&+ \cdots
\end{alignedat}
\end{array}
\]
Thus,
\[\tan x = \boxed{x + \tfrac{1}{3} x^3 + \tfrac{2}{15} x^5 + \cdots}\]
Binomial Series
Whereas the Binomial Theorem enables us to expand \((a + b)^n\)
for positive integers \(n,\)
what if we want to expand \(f(x) = (1 + x)^k\)
for any number \(k \ques\)
Let's derive the Maclaurin series for \(f\) by taking derivatives:
\[
\baat{2}
&f(x) = (1 + x)^k \cma \lspace &&f(0) = 1 \cma \nl
&f'(x) = k (1 + x)^{k - 1} \cma \lspace &&f'(0) = k \cma \nl
&f''(x) = k(k - 1) (1 + x)^{k - 2} \cma \lspace &&f''(0) = k (k - 1) \cma \nl
&f'''(x) = k(k - 1)(k - 2) (1 + x)^{k - 3} \cma \lspace &&f'''(0) = k(k - 1)(k - 2) \cma \nl
&\vdotss \lspace &&\vdotss
\eaat
\]
Following \(\eqref{eq:maclaurin-series},\) we find
\[
(1 + x)^k = 1 + kx + \frac{k(k - 1)}{2!} x^2 + \frac{k(k - 1)(k - 2)}{3!} x^3 + \cdots \pd
\]
This expansion is called the binomial series, a special Maclaurin series
for a binomial raised to any power.
To write the general form, let's define binomial coefficients:
We use the notation
\[{k \choose n} = \frac{k(k - 1)(k - 2) \cdot \, \cdots \, \cdot (k - n + 1)}{n!} \cma\]
where \({k \choose n}\) is read as \(k\) choose \(n.\)
It turns out that these coefficients show up in many applications of probability with selections.
To attain the binomial series' interval of convergence, we use the Ratio Test with \(a_n\) as the \(n\)th term.
We first take the limit
\[
\ba
L &=
\lim_{n \to \infty} \abs{\frac{k(k - 1) \cdot \, \cdots \, \cdot (k - n + 1)(k - n) x^{n + 1}}{(n + 1)!}
\cdot \frac{n!}{k(k - 1) \cdot \, \cdots \, \cdot (k - n + 1) x^n} } \nl
&= \lim_{n \to \infty} \abs{\frac{k - n}{n + 1} x} \nl
&= \abs x \pd
\ea
\]
Because the series converges when \(L \lt 1,\) we need \(\abs x \lt 1,\)
or \(-1 \lt x \lt 1.\)
The series' convergence at the endpoints, \(x = \pm 1,\) cannot be generalized
since it depends on the value of \(k.\)
The binomial series indeed converges to \((1 + x)^k\) because \(R_N(x) \to 0\) as \(N \to \infty;\)
unfortunately, proving this limit is difficult and beyond the scope of this text.
BINOMIAL SERIES
If \(k\) is any real number and \(\abs x \lt 1,\) then \((1 + x)^k\)
has a binomial series expansion given by
\begin{equation}
\ba
(1 + x)^k &= 1 + kx + \frac{k(k - 1)}{2!} x^2 + \frac{k(k - 1)(k - 2)}{3!} x^3 + \cdots \nl
&= \sum_{n = 0}^\infty {k \choose n} x^n \cma
\ea
\label{eq:binomial-series}
\end{equation}
where the binomial coefficient is
\[{k \choose n} = \frac{k(k - 1)(k - 2) \cdot \, \cdots \, \cdot (k - n + 1)}{n!} \pd\]
EXAMPLE 10
Find the Maclaurin series for \(f(x) = \sqrt[3]{4x + 8}\)
and its radius of convergence.
Let's first rearrange the function to match the form \((1 + x)^k \col\)
\[f(x) = \sqrt[3]{8} \cdot \sqrt[3]{\frac{x}{2} + 1} = 2 \par{1 + \frac{x}{2}}^{1/3} \pd\]
Taking \(k = 1/3,\) we use the binomial series in \(\eqref{eq:binomial-series}\) by replacing \(x\) with \(x/2 \col\)
\[
\ba
f(x) &=
2 \parbr{1 + \frac{1}{3} \par{\frac{x}{2}} + \frac{\tfrac{1}{3} \par{\tfrac{1}{3} - 1}}{2} \par{\frac{x}{2}}^2
+ \frac{\tfrac{1}{3} \par{\tfrac{1}{3} - 1} \par{\tfrac{1}{3} - 2}}{6} \par{\frac{x}{2}}^3 + \cdots} \nl
&= \boxed{2 + \frac{x}{3} - \frac{x^2}{18} + \frac{5x^3}{324} + \cdots}
\ea
\]
The series converges when \(\abs{x/2} \lt 1\)—that is, when \(\abs x \lt 2\)—so the radius of convergence
is \(\boxed{R = 2}.\)
Let's now summarize the important Maclaurin series.
It is imperative to memorize these series because they appear in many situations.
The following tips may help with this process:
The Maclaurin series for \(e^x,\) \(1/(1 - x),\) and \((1 + x)^k\)
all have positive coefficients.
All other series in the table are alternating.
In the table, only the Maclaurin series for \(e^x,\) \(\sin x,\) and \(\cos x\)
converge for all \(x.\)
The inclusion of factorials in the denominators guarantees convergence—a comforting feature when analyzing infinite series.
Since \(\textderiv{}{x} (\sin x) = \cos x,\)
differentiating the terms of the Maclaurin series for \(\sin x\)
gives the terms of the Maclaurin series for \(\cos x.\)
The Maclaurin series for \(\sin x\) and \(\atan x\) are similar,
but \(\atan x\) has no factorials in its terms.
*The convergence at the endpoints \(x = \pm 1\) depends on the value of \(k.\)
EXAMPLE 11
Use a power series to approximate \(\int_0^1 e^{-x^2} \di x\)
with an error of less than \(0.01.\)
In \(\eqref{eq:e^x-series}\) we replace \(x\) with \(-x^2\) to attain a Maclaurin series for \(e^{-x^2}\col\)
\[
\ba
e^{-x^2} &= 1 + \par{-x^2} + \frac{\par{-x^2}^2}{2!} + \frac{\par{-x^2}^3}{3!} + \cdots \nl
&= 1 - x^2 + \frac{x^4}{2!} - \frac{x^6}{3!} + \cdots = \sum_{n = 0}^\infty \frac{(-1)^n \, x^{2n}}{n!} \pd
\ea
\]
Integrating this function from \(0\) to \(1,\) we see
\[
\ba
\int_0^1 e^{-x^2} \di x &= \int_0^1 \sum_{n = 0}^\infty \frac{(-1)^n \, x^{2n}}{n!} \di x \nl
&= \sum_{n = 0}^\infty \frac{(-1)^n}{n!} \int_0^1 x^{2n} \di x
= \sum_{n = 0}^\infty \frac{(-1)^n}{n!} \par{\frac{x^{2n + 1}}{2n + 1}} \intEval_0^1 \nl
&= \sum_{n = 0}^\infty \frac{(-1)^n}{n!} \par{\frac{(1)^{2n + 1}}{2n + 1}}
- \sum_{n = 0}^\infty \frac{(-1)^n}{n!} \par{\frac{(0)^{2n + 1}}{2n + 1}} \nl
&= \sum_{n = 0}^\infty \frac{(-1)^n}{n! (2n + 1)} \nl
&= 1 - \frac{1}{3} + \frac{1}{10} - \frac{1}{42} + \frac{1}{216} + \cdots \pd
\ea
\]
Applying the Alternating Series Error Bound, we seek the first term whose magnitude is less than \(0.01.\)
Observe that \(1/216 \lt 0.01,\) so we include all the terms before it—that is, the first four terms:
\[\int_0^1 e^{-x^2} \di x \approx 1 - \frac{1}{3} + \frac{1}{10} - \frac{1}{42} \approx \boxed{0.743}\]
which has an error of less than \(1/216 \approx 0.005.\)
EXAMPLE 12
For \(f(x) = \atan x,\) determine \(f^{(7)}(0).\)
Then show that \(f^{(2N)}(0) = 0\) for any positive integer \(N.\)
From the table Important Maclaurin Series,
the Maclaurin series for \(f(x) = \atan x\) is
\[f(x) = \sum_{n = 0}^\infty \frac{(-1)^n \, x^{2n + 1}}{2n + 1} \pd\]
Equating the seventh-degree term, \(-x^7/7,\) to the Maclaurin definition in \(\eqref{eq:maclaurin-series},\)
we see
\[
\ba
\frac{f^{(7)}(0)}{7!} x^7 &= -\frac{x^7}{7} \nl
\implies f^{(7)}(0) &= -\frac{7!}{7} = -6! = \boxed{-720}
\ea
\]
By similar logic, the Maclaurin series has a coefficient of \(0\) for each even-degree term.
(For this reason \(x^2,\) \(x^4,\) \(x^6, \dots\) do not appear in our summation.)
Accordingly, equating the Maclaurin definition to \(0\) shows, for any positive integer \(N,\)
\[
\frac{f^{(2N)}(0)}{(2N)!} x^{2N} = 0 \implies f^{(2N)}(0) = 0 \pd
\]
EXAMPLE 13
The third-degree Maclaurin polynomial for \(f(x) = \ln(1 + x)\) is used to approximate \(\ln \tfrac{1}{2}.\)
Using Taylor's Remainder Theorem, determine an interval in which the true value of \(\ln \tfrac{1}{2}\)
must reside.
The third-degree Maclaurin polynomial for \(f(x) = \ln(1 + x),\)
following the table Important Maclaurin Series, is
\[T_3(x) = x - \frac{x^2}{2} + \frac{x^3}{3} \pd\]
This polynomial approximates \(\ln \tfrac{1}{2}\) if we use \(x = -1/2.\)
Substituting this value, we see
\[
\ba
\ln \frac{1}{2} \approx T_3 \par{-\frac{1}{2}} &= -\frac{1}{2} - \frac{(-1/2)^2}{2} + \frac{(-1/2)^3}{3} \nl
&= -\frac{1}{2} - \frac{1}{8} - \frac{1}{24} \nl
&= -\frac{2}{3} \approx -0.667 \pd
\ea
\]
Because the series isn't alternating, we cannot use the Alternating Series Error Bound.
Instead, we use Taylor's Remainder Theorem:
The maximum value of \(\abs{f^{(4)}(x)}\) \(= 6/(x + 1)^4\)
over \(\parbr{-\tfrac{1}{2}, 0}\) is
\[M = \frac{6}{\par{-\tfrac{1}{2} + 1}^4} = 96 \pd\]
Hence, the error is bounded by
\[\abs{R_3 \par{-\frac{1}{2}}} \leq \frac{96}{4!} \abs{-\frac{1}{2}}^4 = \frac{1}{4} \pd\]
In words, our approximation \(T_3\par{-\frac{1}{2}}\) can differ from the true value of \(\ln \tfrac{1}{2}\)
by no more than \(1/4.\)
The interval in which \(\ln \tfrac{1}{2}\) must lie is therefore
\[
\baat{2}
-\frac{2}{3} - \frac{1}{4} &\leq \ln \frac{1}{2} &&\leq -\frac{2}{3} + \frac{1}{4} \nl
\underbrace{-\frac{11}{12}}_{\approx -0.917} &\leq \ln \frac{1}{2} &&\leq \underbrace{-\frac{5}{12}}_{\approx -0.417} \pd
\eaat
\]
Taylor Series and Maclaurin SeriesTaylor series and Maclaurin series are
types of power series whose coefficients use a function's derivatives at a point.
If \(f\) has derivatives of all orders at \(a,\)
then the Taylor series of \(f\) centered at \(a\) is
\begin{equation}
\ba
T(x) &= f(a) + f'(a) (x - a) + \frac{f''(a)}{2!} (x - a)^2 + \frac{f'''(a)}{3!} (x - a)^3
+ \cdots \nl
&= \sum_{n = 0}^\infty \frac{f^{(n)}(a)}{n!} (x - a)^n \pd
\ea
\eqlabel{eq:taylor-series}
\end{equation}
For \(a = 0,\) the Maclaurin series of \(f\) is
\begin{equation}
\ba
T(x) &= f(0) + f'(0) x + \frac{f''(0)}{2!} x^2 + \frac{f'''(0)}{3!} x^3
+ \cdots \nl
&= \sum_{n = 0}^\infty \frac{f^{(n)}(0)}{n!} x^n \pd
\ea
\eqlabel{eq:maclaurin-series}
\end{equation}
A Taylor polynomial includes only a few terms of a Taylor series,
and a Maclaurin polynomial uses only a few terms of a Maclaurin series.
Taylor's Remainder Theorem
Suppose that \(f\) has derivatives up to order \(N + 1.\)
If \(\abs{f^{(N + 1)}(x)} \leq M\) for \(\abs{x - a} \leq r,\)
then by Taylor's Remainder Theorem,
the remainder \(R_N(x)\) of the \(N\)th-degree Taylor polynomial satisfies
\[\abs{R_N(x)} \leq \frac{M}{(N + 1)!} \abs{x - a}^{N + 1} \cmaa \abs{x - a} \leq r \pd\]
(The error bound is also called the Lagrange Error Bound.)
A function equals its Taylor series over some interval \(I\) if and only if \(\lim_{N \to \infty} R_N(x) = 0.\)
Manipulating Taylor Series
It is tedious to obtain Taylor series by repeated differentiation.
But we can differentiate and integrate the Taylor series of a known function
to attain the Taylor series of a new function.
In addition, we can replace \(x\) with another expression—for example, replacing \(x\) with \(x^2\)—to
easily determine the Taylor series of a family of functions.
When we multiply or divide power series,
it is a good idea to consider only a few terms in each series
and multiply or divide them like polynomials.
Attempt to discover the pattern after inspecting the first few terms of the series for the product or quotient.
Binomial Series
If \(k\) is any real number and \(\abs x \lt 1,\) then \((1 + x)^k\)
has a special Maclaurin series called the binomial series:
\begin{equation}
\ba
(1 + x)^k &= 1 + kx + \frac{k(k - 1)}{2!} x^2 + \frac{k(k - 1)(k - 2)}{3!} x^3 + \cdots \nl
&= \sum_{n = 0}^\infty {k \choose n} x^n \cma
\ea
\eqlabel{eq:binomial-series}
\end{equation}
where the binomial coefficient is
\[{k \choose n} = \frac{k(k - 1)(k - 2) \cdot \, \cdots \, \cdot (k - n + 1)}{n!} \pd\]
The following table shows important Maclaurin series and their intervals of convergence.
*The convergence at the endpoints \(x = \pm 1\) depends on the value of \(k.\)
The following tips may help you memorize these series:
The Maclaurin series for \(e^x,\) \(1/(1 - x),\) and \((1 + x)^k\)
all have positive coefficients.
All other series in the table are alternating.
In the table, only the Maclaurin series for \(e^x,\) \(\sin x,\) and \(\cos x\)
converge for all \(x.\)
The inclusion of factorials in the denominators guarantees convergence—a comforting feature when analyzing infinite series.
Since \(\textderiv{}{x} (\sin x) = \cos x,\)
differentiating the terms of the Maclaurin series for \(\sin x\)
gives the terms of the Maclaurin series for \(\cos x.\)
The Maclaurin series for \(\sin x\) and \(\atan x\) are similar,
but \(\atan x\) has no factorials in its terms.