\magnification=\magstep1
\centerline{Mathematics 36, section 5 -- Advanced Placement Calculus}
\centerline{Discussion 2 -- Taylor Series}
\centerline{October 1, 1999}
\bigskip
\noindent
{\it Background}
\bigskip
Yesterday, we introduced the {\it Taylor series\/} of a function $f(x)$
at $x = a$.  As long as we can compute derivatives of $f$ of all orders
at $x = a$, the Taylor series is defined and looks like this:
$${\rm Taylor\ series\ of} f = \sum_{k=0}^\infty {f^{(k)}(a) \over k!} (x - a)^k$$
For example, the Taylor series of $f(x) = e^x$ at $a = 0$ looks like:
$\sum_{k=0}^\infty {x^k \over k!} $
since $f^{(k)}(0) = 1$ for all $k$.  
Today we want to investigate the questions: 
\medskip
\item{1)}  If we substitute $x = c$, does the Taylor series of $f$
evaluated at $x = c$ ``add up to $f(c)$''?  
\item{2)}  Does that work for all $c$?  Some $c$?  Which ones?
\medskip
\noindent
Recall that in class yesterday, we saw that the answer to question 1
for a particular $x$ value is ``yes'' exactly when the error in the 
Taylor approximation with the $n$th degree polynomial:
$$E_n(x) = f(x) - p_n(x) = f(x) - \sum_{k=0}^n {f^{(k)}(a) \over k!} (x - a)^k$$
{\it goes to zero as $n \to \infty$}.

For example, for $f(x) = {1\over x + 1}$, at $a = 0$, the error is 
$$E_n(x) = {1\over x + 1} - (1 - x + x^2 - \cdots +(-1)^n x^n)
={(-1)^{n+1} x^{n+1} \over x + 1}.$$
This goes to zero as $n \to \infty$ only when $|x| < 1$.
\bigskip
\noindent
{\it Discussion Questions}
\bigskip
\item{A)}  Consider the Taylor series for $f(x) = \sin(x)$ at 
$a = 0$.  As we know from Lab 3, by the Theoretical Error Bound
for Taylor polynomial approximations,
$$|E_n(x)| = |\sin(x) - p_n(x)| \le {1 \over (n+1)!} |x|^{n+1}$$
(since all derivatives of $\sin(x)$ are bounded above by $M = 1$
for all $x \in {\bf R}$).
\itemitem{1)}  If $|x| \le 1$, then it is pretty clear that 
$E_n(x) \to 0$ as $n \to \infty$.  Explain why.  (What does the 
error bound do as $n \to \infty$?)
\itemitem{2)}  Now take an $x > 1$, like $x = 4$.  What happens to the 
error bound ${4^{n+1} \over (n+1)!}$ as $n \to \infty$?  (Try some
experiments using a calculator -- evaluate the error bound
for $n = 2,3,4,5,6,10,20$ at least and think about what that says for
the size of the error.)
\itemitem{3)}  Repeat part 2 if $x = 10$.  You might want to take 
$n = 2,3,4,5,10,11,12,15,20$ here.
\itemitem{4)}  Now let's try to find a general pattern here. 
Let $x = c$ be any fixed number.  Note
that if we go from one $n$ to the next integer $n + 1$, the corresponding
error bounds are
$$ {c^{n+1} \over (n+1)!} \qquad {\rm and} \qquad {c^{n+2} \over (n+2)!}$$
The error bound for $n+1$ can be rewritten like this:
$${c^{n+2} \over (n+2)!} = {c\cdot c^{n+1} \over (n+2)\cdot (n+1)!}
= {c \over n+2} \cdot {c^{n+1} \over (n+1)!},$$
which shows something interesting.  What will happen as $n \to \infty$ here
(recall $c$ is fixed)?
How does that explain what you saw in parts 2 and 3 with $c = 4$ and $c = 10$.
\itemitem{5)}  What is your conclusion here?  For which 
$x$ does the Taylor series of $\sin(x)$ ``add up to'' $\sin(x)$?
\bigskip
\item{B)}  Now consider the Taylor series for $f(x) = e^x$ at 
$a = 0$.  By the Theoretical Error Bound
for Taylor polynomial approximations,
$$|E_n(x)| = |e^x - p_n(x)| \le {M \over (n+1)!} |x|^{n+1}$$
if $f^{(n+1)}(z) \le M$ for all $z \in [-x, x]$.
\itemitem{1)}  Take an $x > 1$, like $x = 4$.  
Explain why you could use $M = 3^4 = 81$ in the error bound.
What happens to the 
error bound ${81\cdot 4^{n+1} \over (n+1)!}$ as $n \to \infty$?  (Try some
experiments using a calculator -- evaluate the error bound
for $n = 2,3,4,5,6,10,20$ at least and think about what that says for
the size of the error.)
\itemitem{2)}  Repeat part 1 if $x = 10$.  (What is one $M$ you can 
use?)  You might want to take 
$n = 2,3,4,5,10,11,12,15,20$ here.
\itemitem{3)}  Now let's try to find a general pattern here. 
Let $x = c$ be any fixed number.  Note
that if we go from one $n$ to the next integer $n + 1$, what
are the corresponding
error bounds, and what is the ratio between them?
What will happen as $n \to \infty$ here
(recall $c$ is fixed)?
How does that explain what you saw in parts 1 and 2 with $c = 4$ and $c = 10$.
\itemitem{4)}  What is your conclusion here?  For which 
$x$ does the Taylor series of $e^x$ ``add up to'' $e^x$?
\bigskip
\noindent
{\it Assignment}
\bigskip
Group write-ups due Tuesday, October 5.
\bye