You are about to erase your work on this activity. Are you sure you want to do this?
Updated Version Available
There is an updated version of this activity. If you update to the most recent version of this activity, then your current progress on this activity will be erased. Regardless, your record of completion will remain. How would you like to proceed?
Mathematical Expression Editor
We study Taylor and Maclaurin series.
We’ve seen that we can approximate functions with polynomials, given that enough
derivative information is available. We have also seen that certain functions can be
represented by a power series. 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.
Let \(f(x)\) have derivatives of all orders at \(x=c\).
The Taylor series of \(f(x)\), centered at \(c\) is
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, any number of which (including an infinite
number) may be zero. When creating the Taylor polynomial of degree \(n\) for a function \(f(x)\)
at \(x=c\), we needed to evaluate \(f\), and the first \(n\) derivatives of \(f\), at \(x=c\). When creating the
Taylor series of \(f\), it helps to find a pattern that describes the \(n\)th derivative of \(f\) at \(x=c\).
Time for examples!
Compute the Taylor series for \(f(x) = \sin (x)\) centered at \(x=0\).
Since a pattern has emerged, we see that the Taylor series for \(\ln (x)\) is:
\begin{align*} (x-1) &- \frac {(x-1)^2}{\answer [given]{2}} + \frac {(x-1)^3}{\answer [given]{3}} - \frac {(x-1)^4}{\answer [given]{4}} + \cdots \\ &= \sum _{n=1}^\infty (-1)^{n+1}\frac {(x-1)^n}{\answer [given]{n}} \end{align*}
Finally, sometimes Taylor’s formula may not be the best way to compute the Taylor
series.
Compute the Taylor series for \(f(x) = \arctan (x)\) centered at \(x=0\).
If we try to use Taylor’s formula, we
must start by making a table of derivatives: \begin{align*} f(x) &= \arctan (x)\\ f'(x) &= \answer [given]{\frac {1}{1+x^2}}\\ f''(x) &= \answer [given]{\frac {-2x}{(1+x^2)^2}} \end{align*}
Hmm. This is getting messy. Let’s try to find the Taylor series via known power
series. We know that
we can find the
desired power series by integrating. Write with me \begin{align*} \int &\left (1 - x^2 + x^4 - x^6 + \cdots \right ) dx \\ &= \answer [given]{x - \frac {x^3}{3} + \frac {x^5}{5}} - \frac {x^7}{7} + \cdots +C \end{align*}
since \(\arctan (0) = 0\), \(C=0\), and we have our desired power series, which converges with radius of
convergence \(R=1\). However, note the interval of convergence may be different, and it is in
this case. First note that our power series can be written in summation
notation as
In both cases, the series
converges by the alternating series test. Hence the interval of convergence is \([\answer [given]{-1},\answer [given]{1}]\).
Above we implicitly used the following theorem:
The Taylor series centered at \(x=c\) of a polynomial in \((x-c)\) is exactly that polynomial and
the Taylor series of power series centered at \((x-c)\) is exactly that power series.
This is just saying that if you know a power series for a function, then using Taylor’s
formula will do nothing but give you the power series.
Since we designed Taylor polynomials to approximate functions, you might guess that
the Taylor series of a function is equal to the function (at least on the interval of
convergence for the Taylor series). This is false.
Is the Maclaurin series for \(f\) equal to \(f\) on the interval of convergence?
We’ll start by making a table of derivatives: \begin{align*} f(0) &= \answer [given]{1}\\ f'(0) &= \answer [given]{0}\\ f''(0) &=\answer [given]{0}\\ &\vdots \end{align*}
So our Maclaurin series for \(f\) is:
\[ 1+0+0+\cdots \]
This converges for all values of \(x\), and hence the radius
of convergence is \(R=\infty \), with interval of convergence \((-\infty ,\infty )\). However, \(1\ne f\) as functions.
It turns out that \(f\) is infinitely differentiable everywhere, but all of its derivatives
vanish at \(x=0\). Thus the Maclaurin series for \(f\) is just
\[ 1 + 0 + 0+ \cdots \]
The derivatives of \(f\) “go to \(0\)” as \(x\) goes
to zero faster than any polynomial, and so no polynomial term “detects” that this
function is not the horizontal line \(y=1\).
It is within your power to show that \(f\) is infinitely differentiable everywhere, and
to prove that \(f^{(k)}(0) = 0\). This is quite involved, and we will not do it here. If you
have the gumption, and the willpower, it would make a fantastic exercise.
We will find that “most of the time” they are equal, but we need to consider the
conditions that allow us to conclude this. Taylor’s theorem states that the error
between a function \(f(x)\) and its \(n\)th degree Taylor polynomial is \(R_n(x)\):
where \(M\) is the
maximum value of \(|f^{(n+1)}|\) on \([c,x]\). 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. This leads us to
our next theorem:
Function and Taylor Series Equality Let \(f(x)\) have derivatives of all orders at \(x=c\), let \(R_n(x)\), and
let \(I\) be an interval on which the Taylor series of \(f\) converges. If
for
every real number \(x\). Another way of phrasing this is that we want the remainder \(R_n(x)\) to
go to zero as \(n\) goes to infinity. We know that
where \(M\) is the maximum value of \(|f^{(n+1)}|\) on \([0,x]\).
We know \(f^{(n+1)}(b) = \answer [given]{e^b}\), since all the derivatives of \(e^x\) are just \(e^x\) Thus
proving that the Maclaurin series for \(e^x\) converges to \(e^x\) everywhere!
There is good news. A function \(f\) that is equal to its Taylor series, centered at any
point the domain of \(f(x)\), 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
check the remainder (as above) when we suspect something may not work as
expected.