Section 5.6 Taylor Series
We have seen the usefulness of a power series representation of a function. In this section, we discuss a way of showing analyticity of a function. The key result is the following theorem.
Theorem 5.68. Taylor’s Theorem.
Suppose \(f \colon [a,b] \to \mathbb{R}\) has continuous derivatives up to order \(n\) and \(f^{(n+1)}\) exists on \((a,b)\text{.}\) Let \(x_0\) be a point in \([a,b]\text{.}\) Then for any \(x \in [a,b]\) other than \(x_0\text{,}\)
\begin{equation}
\begin{split}
f(x) = f(x_0) & + \frac{f'(x_0)}{1!}(x-x_0) +
\frac{f''(x_0)}{2!}(x-x_0)^2 + \cdots \\
& + \frac{f^{(n)}(x_0)}{n!}(x-x_0)^n +
\frac{f^{(n+1)}(c)}{(n+1)!}(x-x_0)^{n+1}
\end{split}\tag{5.7}
\end{equation}
for some \(c\) in between \(x\) and \(x_0\text{.}\)
Corollary 5.70.
Suppose
\(f\) satisfies the conditions in
Theorem 5.68 and there exists some
\(B \gt 0\) such that for all
\(n\) \(|f^{(n)}(c)| \le B\) for all
\(c \in [a,b]\) then
\(\lim_n
R_n(x) = 0\) and hence the Taylor series of
\(f\) at
\(x_0\text{,}\) converges to
\(f(x)\) for any
\(x \in [a,b]\)
Proof.
The statement is clearly true for \(x=x_0\text{.}\) Under the assumptions, for \(x \in [a,b]\) other than \(x_0\text{,}\)
\begin{equation*}
|R_n(x)| = \left|\frac{f^{(n+1)}(c)}{(n+1)!}(x-x_0)^{n+1}\right|
\le \frac{B}{(n+1)!}|x-x_0|^{n+1}.
\end{equation*}
It follows from
Proposition 5.20 that the last quantity tends to
\(0\) as
\(n \to \infty\text{.}\)
Let us see some applications
Example 5.71.
The exponential function \(f(x)=e^x\) has derivative of all orders on \(\mathbb{R}\) and \(f^{(n)}(x) = e^x\) for each \(n\text{.}\) So, for \(M \gt 0\text{,}\) \(|f^{(n)}(c)| = e^c \le e^M\) for each \(n\) and \(c \in [-M,M]\text{.}\) Therefore,
\begin{equation*}
e^x = f(x) = \sum_{n=0}^{\infty}
\frac{x^n}{n!}
\end{equation*}
for all \(x \in [-M,M]\text{.}\) Since \(M \gt 0\) is arbitrary, this shows that \(e^x\) is analytic on \(\mathbb{R}\text{.}\)
Example 5.72.
The function
\(\sin(x)\) has derivative of all orders on
\(\mathbb{R}\) and all of them are bounded by
\(1\) on
\(\mathbb{R}\text{.}\) Therefore, by
Corollary 5.70, for all
\(x
\in \mathbb{R}\text{,}\)
\begin{equation*}
\sin(x) = \sum_{n=0}^{\infty} (-1)^n \frac{x^{2n+1}}{(2n+1)!}
\end{equation*}
One important application of Taylor Series is that we can use it to estimate values of various functions.
Example 5.73.
Using Taylor’s theorem, we can find a range of values of \(x\) near \(x_0\) at which the function \(f(x)\) is approximated by the value at \(x\) of its n-th order Taylor polynomial at \(x_0\) to within a certain \(E \gt 0\text{.}\)
For example, let’s approximate \(\cos(x)\) by \(P_5(x)\) its 5th order Taylor polynomial at \(0\text{.}\) According to Taylor’s theorem, there exist some \(c\) between \(x\) and \(0\) such that
\begin{equation*}
|\cos(x)-P_5(x)|
= |R_5(x)| = \left|\frac{\cos^{(6)}(c)}{6!}x^6 \right| \le
\frac{1}{6!}|x|^6
\end{equation*}
So, if we want to make sure that the error of this approximation is within, say \(E = 0.000748\text{,}\) then it suffices to make sure
\begin{equation*}
\frac{|x|^6}{6!} \lt 0.000748.
\end{equation*}
Solving the inequality, yields, \(|x| \le (0.000748*6!)^{1/6}
\approx 0.902\text{.}\) This guarantees, for example, at \(x=1/2\) the value
\begin{equation*}
P_5(1/2) = 1- \frac{1}{2!}\left(\frac{1}{2}\right)^2 +
\frac{1}{4!}\left(\frac{1}{2}\right)^4 = \frac{337}{384} \approx
0.877604167.
\end{equation*}
is within \(0.000748\) from \(\cos(1/2)\text{.}\) Pretty good approximation that one can compute by hand.
Taylor series (expansion) can be used in computing limits.
Example 5.74.
To compute the limit
\begin{equation*}
\lim_{x \to 0} \frac{\ln(1-x) + x + \frac{x^2}{2}}{4x^3},
\end{equation*}
first recall that for \(x\) near \(0\text{,}\)
\begin{equation*}
\ln(1+x) = \sum_{n=0}^{\infty} (-1)^n \frac{x^{n+1}}{n+1}.
\end{equation*}
Thus, for \(x\) near \(0\text{,}\)
\begin{align*}
\ln(1-x) & = \ln(1+(-x)) = \sum_{n=0}^{\infty} (-1)^n
\frac{(-1)^{n+1}x^{n+1}}{n+1}\\
& = -\sum_{n=0}^{\infty} \frac{x^{n+1}}{n+1} = -x - \frac{x^2}{2}
- \frac{x^3}{3} - \sum_{n=3}^{\infty} \frac{x^{n+1}}{n+1}.
\end{align*}
And so,
\begin{align*}
\frac{\ln(1-x) + x + \frac{x^2}{2}}{4x^3} &
= -\frac{1}{4x^3}\frac{x^3}{3} - \frac{1}{4x^3}\sum_{n=3}^{\infty}
\frac{x^{n+1}}{n+1}\\
& = -\frac{1}{12} - \frac{1}{4x^3}\left( \frac{x^4}{4} +
\frac{x^5}{5} + \cdots\right)\\
& = -\frac{1}{12} - \frac{1}{4}\left( \frac{x}{4} +
\frac{x^2}{5} + \cdots\right) \to -\frac{1}{12}
\end{align*}
as \(x \to 0.\)
The binomial series is the Taylor series of the binomial function \((1+x)^{\alpha}, (\alpha \in
\mathbb{R})\) about \(0\text{.}\) One verifies directly that the binomial series is
\begin{equation}
\sum_{n=0}^{\infty} \binom{\alpha}{n} x^n\tag{5.9}
\end{equation}
where \(\binom{\alpha}{n} = \frac{\alpha(\alpha-1) \cdots
(\alpha-n+1)}{n!}\)
Here we state without proof the analyticity of
\((1+x)^{\alpha}\) about 0 and the interval of convergence of the binomial series. We proof part of it in
Appendix D. For a proof of the full statement, read this set of
notes
.
Theorem 5.75.
The interval of convergence \(I\) of the binomial series is
\begin{equation*}
\begin{cases}
[-1,1] & \mbox{if } \alpha \gt 0 \\
(-1,1] & \mbox{if } -1 \lt \alpha \lt 0 \\
(-1,1) & \mbox{if } \alpha \le -1.
\end{cases}
\end{equation*}
On \(I\) we have
\begin{equation*}
(1+x)^{\alpha} = \sum_{n=0}^{\infty} \binom{\alpha}{n} x^n.
\end{equation*}
Example 5.76.
Let us apply the binomial series to find the Taylor series expansion of \(f(x)=x^{\alpha}\) at \(x=3\text{.}\) We are going to express \(x^{\alpha}\) as a power series of the form \(\sum
a_n(x-3)^n\text{,}\) so we write \(x^{\alpha}\) as \((3+(x-3))^{\alpha}
= 3^{\alpha}(1+(x-3)/3)^{\alpha}\text{.}\) Expand the power as a binomial series and we get
\begin{equation*}
x^{\alpha} = 3^{\alpha}\sum_{n=0}^{\infty}
\binom{\alpha}{n}\frac{1}{3^n}(x-3)^n
\end{equation*}
So \(\ds a_n = \binom{\alpha}{n}\frac{3^{\alpha}}{3^n}\text{.}\) Since
\begin{equation*}
\left|\frac{a_{n+1}}{a_n}\right| =
\frac{1}{3}\left|\frac{\alpha}{n+1}-1\right| \to \frac{1}{3},
\end{equation*}
therefore, the radius of convergence of the Taylor series is
\(3\) and the convergence of the Taylor series the end points
\(x=0,6\) depends on
\(\alpha\) as in
Theorem 5.75. For example, if
\(\alpha > 0\text{,}\) the series converges at both end points and hence the interval of convergence is
\([0,6]\text{.}\)