\input homework_macros.tex

%\distiller
\printer

\def\dd#1#2{\frac{d#1}{d#2}}
\toks0={
8.10 p. 686:   5,  7, 19, 23, 24, 31, 35, 41.
}
\def\Li{\displaystyle\lim_{n\to\infty}}
\def\Sum#1{\displaystyle\sum_{#1}^\infty}
\def\Int{\displaystyle\int}

\SN{\jobname}
\np$\cos\sqrt x$.
Since $\cos x =\Sum{n=0}\Frac{(-1)^nx^{2n}}{(2n)!}$,
$\cos\sqrt x =\Sum{n=0}\Frac{(-1)^n(\sqrt x)^{2n}}{(2n)!}=
\Sum{n=0}\Frac{(-1)^n x^{n}}{(2n)!}$.
This is actually an example of a mistake in the book.
The power series representation is correct, but it is not a
Maclaurin series because the function $\cos\sqrt x$ does not
have a Maclaurin series since it does not even exist on an open
interval containing $0$.

\np$xe^x$.
Since $e^x=\Sum{n=0}\Frac{x^n}{n!}$,
$xe^x=\Sum{n=0}\Frac{x^{n+1}}{n!}$.
This is a power series which represents the function everywhere,
hence in an open interval containing $0$ and it must therefore be the 
Maclaurin series.

\np
The polynomial $x-\Frac{x^3}{6}$ is sum of the first two terms
in the Macluarin series for 
$\sin x=\Sum{n=0}\Frac{(-1)^nx^{2n+1}}{(2n+1)!}$.
The error formula says that for any fixed $x$, there exists at
least one number $z$ between $0$ and $x$ so that
$\sin x-\Bigl(x-\Frac{x^3}{6}\Bigr)=\Frac{-(\cos z) x^4}{4!}$.
{\bf However} instead of thinking of $x-\Frac{x^3}{6}$ as the 
degree $3$ Macluarin polynomial, think of it as
$x-\Frac{x^3}{6}+0\cdot x^4$ which is the degree $4$ Macluarin
polynomial.
Now the error formula says that
for any fixed $x$, there exists at
least one number $z$ between $0$ and $x$ so that
$\sin x-\Bigl(x-\Frac{x^3}{6}\Bigr)=\Frac{(\sin z) x^5}{5!}$.
Hence
$\Big\vert\sin x-x-\Frac{x^3}{6}\Big\vert\leq
\Frac{\vert x\vert^5}{5!}$ since whatever $z$ is, 
$\vert\sin z\vert\leq 1$.

\item{} The problem is asking for the set of $x$ for which we are
sure that 
$\Big\vert\sin x-x-\Frac{x^3}{6}\Big\vert<5\cdot 10^{-4}$.
We will be sure of this as long as
$\Frac{\vert x\vert^5}{5!}=\Frac{\vert x\vert^5}{120}<5\cdot 10^{-4}$,
or $\vert x\vert^5< 600\cdot 10^{-4}=6\cdot 10^{-2}$, 
or
$\vert x\vert <\root 5\of{.06}$.
The fifth root of $.06$ is a bit bigger than $0.569679$ so for
$\vert x\vert\leq0.569679$, it follows that
$\Big\vert\sin x-x-\Frac{x^3}{6}\Big\vert<5\cdot 10^{-4}$.
The book's solution
$\vert x\vert<\root 5\of{.06}$ is fine and it is indeed true that
$\root 5\of{.06}<0.56968$. 
However,  for any
$x$ with $\root 5\of{.06}<\vert x\vert <0.56968$
you are NOT sure that
$\Big\vert\sin x-x-\Frac{x^3}{6}\Big\vert<5\cdot 10^{-4}$.

\np
The Remainder Estimation Theorem says that
$\vert e^x-\bigl(1+x+\frac{x^2}{2}\bigr)\vert=\Frac{e^z x^3}{3!}$
for some $z$ between $0$ and $x$.
The problem restricts $x$ to $\vert x\vert<0.1$ so $z$ must also
satisfy $\vert z\vert < 0.1$ and since $e^x$ is an increasing
function $0<e^z<e^{0.1}$.
Since $x^3$ is an increasing function as well,
$\Frac{e^z x^3}{3!}<\Frac{e^{0.1} (0.1)^3}{3!}=\Frac{e^{0.1}}{6000}$.
The usual next step here is to notice that $e<3$ so
$e^{0.1}<3^{0.1}$ and haul out your calculator.
Just for fun, we can also proceed as follows.
We need an upper estimate for $e^{0.1}$ which we can get if
we have a lower estimate for
$e^{-0.1}=\Sum{n=0}\Frac{(-1)^n}{10^n n!}$.
 This is an alternating series to which the Alternating Series Test
applies (you check the necessary conditions).
Hence $e^{-0.1}>1-\frac1{10}=0.9$ so $e^{0.1}<\frac{10}9$
and hence 
$\vert e^x-\bigl(1+x+\frac{x^2}{2}\bigr)\vert<\Frac{10}{9\cdot 6000}=
\Frac{1}{5400}<1.851852\cdot 10^{-5}$, a bit better than the
answer in the back of the book.

\np
The Alternating Series Test says that for $-0.1<x<0$ we can replace
the series by the polynomial with error bounded by the next term.
As we remarked above, the hypotheses for the Alternating Series
Test do hold in this problem.
Hence $\vert e^x-\bigl(1+x+\frac{x^2}{2}\bigr)\vert<
\Frac{\vert x\vert^3}{6}<\Frac{(0.1)^3}{6}=\Frac{1}{6000}$
which is a bit better than the answer in \#23.
All this means is that our control of the error for
$x$ between $-0.1$ and $0$ is better than our control of the
error for $x$ between $0$ and $0.1$.

\np
$\sin(0.1)$ since $\sin x=\Sum{n=0}\Frac{(-1)^nx^{2n+1}}{(2n+1)!}$.

\np
Multiply $e^x=\Sum{n=0}\Frac{x^n}{n!}$ and 
$\sin x=\Sum{n=0}\Frac{(-1)^nx^{2n+1}}{(2n+1)!}$
and work out the first five nonzero terms.
This is an exercise in polynomial multiplication and keeping
track of what you are doing {\sl because\/} you only need five
nonzero terms.
The first five nonzero terms for $e^x$ are just the first five terms,
$1+x+\Frac{x^2}{2}+\Frac{x^3}{6}+\Frac{x^4}{24}$.
The next term has degree $6$.
The $\sin x$ series starts off $x-\Frac{x^3}{6}+\Frac{x^5}{120}$ and the
next term has degree $7$.
We multiply the $e^x$ approximation by $x$, $-\Frac{x^3}{6}$ and
$\Frac{x^5}{120}$ and just keep the terms of degree $5$ or less.
$$\matrix{
e^x\sin x=&x&+&x^2&+&\Frac{x^3}{2}&+&\Frac{x^4}{6}&+&\Frac{x^5}{24}&+\cdots\cr
&&&&-&\Frac{x^3}{6}&-&\Frac{x^4}{6}&-&\Frac{x^5}{6\cdot 2}&+\cdots\cr
&&&&&&&&+&\Frac{x^5}{120}&+\cdots\cr
&&&&&&&&&&\ \vdots\cr}$$
so $e^x\sin x= x+x^2+\Frac{x^3}{3}+0-\Frac{x^5}{30}$.

We have had bad luck and have only gotten four nonzero terms
so we try again with $1+x+\Frac{x^2}{2}+\Frac{x^3}{6}+\Frac{x^4}{24}
+\Frac{x^5}{120}$

We multiply the $e^x$ approximation by $x$, $-\Frac{x^3}{6}$ and
$\Frac{x^5}{120}$ and just keep the terms of degree $6$ or less.
$$\matrix{
e^x\sin x=&x&+&x^2&+&\Frac{x^3}{2}&+&\Frac{x^4}{6}&+&
\Frac{x^5}{24}&+&\Frac{x^6}{120}&+\cdots\cr
&&&&-&\Frac{x^3}{6}&-&\Frac{x^4}{6}&-&\Frac{x^5}{6\cdot 2}&-&
\Frac{x^6}{6\cdot6}&+\cdots\cr
&&&&&&&&+&\Frac{x^5}{120}&+&\Frac{x^6}{120}&+\cdots\cr
&&&&&&&&&&&&\ \vdots\cr}$$
so $e^x\sin x= x+x^2+\Frac{x^3}{3}-\Frac{x^5}{30}-\Frac{x^6}{90}+\cdots$.

\np
If $f$ has a continuous 2nd derivative in an interval around $a$, then
for a fixed $x$,
$f(x)=f(a)+f^\prime(a)(x-a)+\Frac{f^{\prime\prime}(c_2)}{2}(x-a)^2$
for some $c_2$ between $x$ and $a$.
If $a$ is a critical point for $f$, $f^\prime(a)=0$, so
$f(x)=f(a)+\Frac{f^{\prime\prime}(c_2)}{2}(x-a)^2$.

\itemitem{a)} If there is some interval around $a$ so that
$f^{\prime\prime}\leq0$ in this interval,
then $f(x)-f(a)\leq 0$ for all $x$ in this interval since $c_2$
is in the interval.
Hence $a$ is a local maximum for $f$.

\itemitem{b)} If there is some interval around $a$ so that
$f^{\prime\prime}\geq0$ in this interval,
then $f(x)-f(a)\geq 0$ for all $x$ in this interval since $c_2$
is in the interval.
Hence $a$ is a local minimum for $f$.

\item{}Notice that if $f^{\prime\prime}(a)<0$, then by continuity,
 $f^{\prime\prime}(x)<0$ for all $x$ in some interval around $a$;
if $f^{\prime\prime}(a)>0$, then by continuity,
 $f^{\prime\prime}(x)>0$ for all $x$ in some interval around $a$.
This is the usual version of the Second Derivative Test for local
max/min.

Also note that if $f^{\prime\prime}(a)=0$ (when the usual 
Second Derivative Test does not apply) we could expand further
using Taylor's Theorem and develop tests.
Loosely speaking, if $f$ has lots of derivatives in a neighborhood 
of $a$, and if $f^\prime(a)=\cdots =f^{(k-1)}(a)=0$ and
$f^{(k)}(a)\neq 0$, then,  if $k$ is odd, the point $a$ is neither
a local max. nor a local min.
If $k$ is even and $f^{(k)}(a)> 0$, then $a$ is a local min.:
if $k$ is even and $f^{(k)}(a)< 0$, then $a$ is a local max.

\end