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
Taylor series are a computational tool.
1 Using series to approximate special constants
You probably know that \(\pi \approx 3.14159\). Have you ever wondered how this kind of approximation is
obtained? There are many ways to do it, but one way is to use Taylor series! Here is a
plan for approximating \(\pi \) using a series:
Find a function which takes a nice number (like \(0\), or \(1\), or \(\frac {1}{2}\)) as an input and
returns something involving \(\pi \) (like \(\pi \), or \(\frac {\pi }{2}\), or \(1/\pi \)) as an output.
Make sure that this function has a Taylor series which we can compute
easily.
Plug the nice number into the Taylor series: We now have an algorithm
for approximating \(\pi \).
The idea is to use the following fact:
\[ \arctan (1) = \frac {\pi }{4} \]
If you recall, we found that Taylor series for
arctangent already, by substituting \(z=-x^2\) into the geometric series \(\frac {1}{1-z}\) to find the series for \(\frac {1}{1+x^2}\),
and then integrating this series to find the series for \(\arctan (x)\):
We need to find \(k\) such that \begin{align*} |a_{k+1}| &<\frac {1}{100}\\ \answer [given]{\frac {4}{2(k+1)+1}} &< \frac {1}{100}\\ \answer [given]{\frac {2k+3}{4}} &> 100\\ \answer [given]{2k+3} &> 400\\ \answer [given]{2k} &> 397\\ \answer [given]{k} &> 397/2 \end{align*}
Since \(k\) is a whole number, we would need to sum \(\answer [given]{199}\) terms just to be assured that you’ve
found an approximation within \(\frac {1}{100}\) of \(\pi \)! Even then, you have to be careful not to
accumulate too many rounding errors when performing the computations.
Part of the reason the series above converges so slowly is that the series is not
absolutely convergent. Also \(1\) is the right endpoint of the interval of convergence for \(\arctan (x)\):
It just barely makes the cut between convergent and not convergent! There are more
advanced series for \(\pi \) which converge much more quickly, for example Ramanujan’s
formula:
This series computes eight additional decimal places for \(\pi \) with each term of
the series. Amazing! What about other approximations? You already know
one way to compute the number \(e\): As
Finally, we’ll show how to use Taylor series to obtain arbitrary precision when
dealing with square-roots.
Use a Taylor series to approximate \(\sqrt [3]{50}\) with four terms. Without computing the actual
value of \(\sqrt [3]{50}\), what accuracy can you guarantee?
We start by finding a Taylor series for \(f(x) = \sqrt [3]{x}\)
centered around \(x=64\). We choose \(64\) because it is a perfect cube that is near \(50\). Now we make
a table of derivatives going up to the \(4\)th derivative of \(f\), since we will need this
to compute the precision of our estimation.
As long as \(g'(a) \neq 0\). This is exactly L’Hôpital’s rule! Let’s use this in a L’Hôpital’s rule
situation, without invoking L’Hôpital’s rule directly:
It might not seem like Taylor series would be much help evaluating limits at infinity,
since Taylor series are all about approximating a function close to some given finite
point. It turns out that we can still use Taylor series to study function behavior at
infinity by transforming the function:
Composing with \(\frac {1}{z}\) “moves infinity to zero,”
and we can then use Maclaurin series to study the behavior. Let’s see that in
action:
You should be able to handle it from here using the
Taylor series method: \begin{align*} \lim _{t \to 0} \frac {2\cos (t^2) - t^4-2}{t^8} &= \lim _{t \to 0} \frac {2(1-\frac {t^4}{2!}+\frac {t^8}{4!}-\frac {t^{12}}{6!}+\cdots ) - t^4-2}{t^8}\\ &= \lim _{t \to 0} \frac {\frac {2t^8}{4!}-\frac {2t^{12}}{12!}+\cdots }{t^8}\\ &=\lim _{t \to 0} \frac {2}{4!}-\frac {2t^4}{6!} +\cdots \\ &=\answer [given]{\frac {1}{12}} \end{align*}
Sometimes we get a series as an answer to some problem (For instance, in the next
section we will find series solutions to differential equations), but we would really like
a closed form expression. A closed form expression is one that can be evaluated in
a finite number of steps. For example
In fact, the series we are interested in is
exactly the derivative of this series! Write \begin{align*} \frac {d}{dx} &1+ x+x^2 + x^3+x^4+\cdots && |x|<1\\ &=1 + 2x + 3x^2 + 4x^3 + \cdots && |x|<1\\ &=\sum _{n=1}^\infty nx^{n-1}. \end{align*}