\documentclass[11pt]{article}


\usepackage{amsfonts}
\usepackage{rotate}

\renewcommand{\labelenumi}{\underline{\underline{\bf\theenumi.}}\ }

\setlength{\hoffset}{-1in}
\setlength{\textwidth}{160mm}
\setlength{\parindent}{0pt}
\setlength{\voffset}{-1in}
\setlength{\textheight}{235mm}
\setlength{\parindent}{0pt}
\setlength{\parskip}{1ex}

\def\R{\mathbb{R}}
\def\abs#1{\mathopen|#1\mathclose|}

\let\Dst=\displaystyle
\let\Tst=\textstyle

\let\eps=\varepsilon

\def\artanh{\mathop{\rm artanh}}
\def\arcosh{\mathop{\rm arcosh}}
\def\arsinh{\mathop{\rm arsinh}}

\def\rmk#1{_{\makebox[0pt][l]{%
      \raisebox{-2.5ex}{\kern-0.6em$\uparrow$}%
      \raisebox{-5.5ex}{\makebox[0pt]{\footnotesize$#1$}}%
}}}
%% using these to `arrow' a substitution info beneath an equal sign.


\begin{document}

%\centerline{\bf Sample Solutions to Homework }
%\centerline{\bf
%UTK -- M148 -- Honors Calculus II -- Spring 2015}
%\centerline{\bf
%Jochen Denzler}


\setcounter{page}{30}

\begin{quote}
\underline{\underline{\bf 37.}} 
The parabolas $y=(x-2)^2$ and $x=(y-2)^2$ intersect to form a
`quadrangle' with curved sides. Find the coordinates of the intersection
points. (Two can be guessed, the other two need calculation). 
Then calculate the area of this `quadrangle'. Make sure to split the
integral appropriately, depending on which formulas apply for the `upper' and
`lower' boundary curves. 
\end{quote}
{\bf Solution: } Here is a figure

\begin{minipage}{240bp}
\begin{picture}(225,225)
\put(0,0){\special{psfile=hwk37fig.eps}}
\end{picture}
\end{minipage}
\begin{minipage}{7cm}
To find the intersections of the curves $x=(y-2)^2$ and $y=(x-2)^2$,
we solve these two equations simultaneously, by plugging one into the
other: 
$$
x=\Bigl((x-2)^2-2\Bigr)^2
$$
which simplifies to 
$$
x^4-8x^3+20x^2-17x+4=0
$$
Fortunately we can guess the solutions $x=1$ and $x=4$
here. Factorization (via long division of polynomials) gives
$x^4-8x^3+20x^2-17x+4=(x-1)(x-4)(x^2-3x+1)$.
So the other two solutions are $x=\frac{3\pm\sqrt5}{2}$. 
\end{minipage}

The corresponding values for $y$ are obtained by plugging these
$x$-values into $y=(x-2)^2$. We get the coordinates of the vertices
$$\Tst
A{:}\; (\frac{3-\sqrt5}{2}, \frac{3+\sqrt5}{2})
\qquad
B{:}\; (1, 1)
\qquad
C{:}\; (\frac{3+\sqrt5}{2}, \frac{3-\sqrt5}{2})
\qquad
D{:}\; (4,4)
$$
The area of the quadrangle is
$$
\int_{x_A}^{x_B} \Bigl(2+\sqrt{x} - (x-2)^2\Bigr)\,dx 
+
\int_{x_B}^{x_C} \Bigl(2+\sqrt{x} - (2-\sqrt{x})\Bigr)\,dx 
+ 
\int_{x_C}^{x_D} \Bigl(2+\sqrt{x} - (x-2)^2\Bigr)\,dx
$$
or equivalently
$$
\int_{x_A}^{x_D} \Bigl(2+\sqrt{x} - (x-2)^2\Bigr)\,dx 
-
\int_{x_B}^{x_C} \Bigl(2-\sqrt{x} - (x-2)^2\Bigr)\,dx 
$$
\begingroup
\marginparsep=-2em
\marginparwidth=8em
The second version is a tad quicker: it evaluates to 
\marginpar{Not obvious but true:\\ $\frac{3\pm\sqrt5}2 =
  \Bigl(\frac{\sqrt5\pm1}2\Bigr)^2$.\\[1ex] This will allow us to avoid
  nested square roots from the $(\ldots)^{3/2}$ terms.}
$$
\begin{array}{l}\Dst
\left[
2x+ \frac23 x^{3/2} - \frac13(x-2)^3
\right]_{\frac{3-\sqrt5}{2}}^4 
-
\left[
2x- \frac23 x^{3/2} - \frac13(x-2)^3
\right]_1^{\frac{3+\sqrt5}{2}}
\\[2ex]\Dst\kern3em\mbox{}
=
8+\frac{16}{3}-\frac83 - (3-\sqrt5) -
\frac23\Bigl(\frac{3-\sqrt5}{2}\Bigr)^{3/2} 
+\frac13 \Bigl(\frac{-1-\sqrt5}{2}\Bigr)^3 
\\[2ex]\Dst\kern5em\mbox{}
-(3+\sqrt{5}) + \frac23\Bigl(\frac{3+\sqrt5}{2}\Bigr)^{3/2} 
+\frac13 \Bigl(\frac{-1+\sqrt5}{2}\Bigr)^3 
+2 -\frac23+\frac13
\\[2ex]\Dst\kern3em\mbox{}
=
\frac{19}{3} 
- \frac23 \Bigl(\frac{\sqrt5 -1}{2}\Bigr)^3 
+ \frac23\Bigl(\frac{\sqrt5 +1}{2}\Bigr)^3
-\frac13 \Bigl(\frac{1+\sqrt5}{2}\Bigr)^3 
+\frac13 \Bigl(\frac{-1+\sqrt5}{2}\Bigr)^3 
\\[2ex]\Dst\kern3em\mbox{}
=\frac{19}{3}+ \frac13 \left(\Bigl(\frac{\sqrt5+1}{2}\Bigr)^3 -
                             \Bigl(\frac{\sqrt5-1}{2}\Bigr)^3\right) 
=\frac{23}{3}
\end{array}
$$
\endgroup

\bigskip

\begin{quote}
\underline{\underline{\bf 38.}} 
A cognac glass has the shape of a ``sphere with a cap cut off''. See figure 
for a cross section. 
If the radius of the ball is $R$ and the glass takes up three fourths of the 
vertical diameter, what is the volume? (Yes I know these glasses are
not meant to be filled to the brim, but calculate the total volume
anyways.) 
\end{quote}
{\bf Solution: }

\begin{minipage}{150bp}
\begin{picture}(138,220)
\put(0,0){\special{psfile=hwk38fig.eps}}
\put(123,144){$\frac32R$}
%\put(67,25){\bf Fig.\ for \#38}
\end{picture}
\end{minipage}\hfill
\begin{minipage}{10cm}
If we make the $z$-axis vertical and put the origin in the center of
the sphere, the horizontal cross sections are circles with radius
$\sqrt{R^2-z^2}$. 
\\
The cross section area is therefore $\pi(R^2-z^2)$. 
\\ The range of~$z$ is from $-R$ to $\frac12R$. 

\medskip
Therefore the volume of the glass is 
$$
V= \int_{-R}^{R/2}\pi(R^2-z^2)\,dz =
\pi\left[R^2z-\frac13z^3\right]_{-R}^{R/2}
= \frac{9\pi}8 R^3
$$
\end{minipage}


\begin{quote}
\underline{\underline{\bf 39.}} 
Two cylinders, each with a circular cross section of $R$ intersect in
such a way that their axes meet at a right angle.  What is the volume
of the intersection body? I find it difficult to draw, but Rogawski
(Sec 6.2, Hwk 21 of the 2008 edition) has a figure of it, and also
some hints. 
\end{quote}

{\bf Solution: }
Suppose the axes of the cylinders are the $x$-- and
the $y$--axis. 
We take horizontal slices parallel to the $x$--$y$--plane. These
planes (at height $z$, with $z$ ranging from $-R$ to~$R$) intersect
each cylinder in a parallel strip. 
For instance, at $z=0$, the strips would be $-R\le y \le R$ for one
cylinder, and $-R\le x\le R$ for the other. The width of the strip
becomes smaller for other values of~$z$. Since the cross section is a
circle, the width of the strip is $2\sqrt{R^2-z^2}$. 

The intersection of the body in question with the horizontal plane at
height $z$ is therefore a square with sidelength $2\sqrt{R^2-z^2}$,
and therefore has area $4(R^2-z^2)$. 

The volume of the intersection body is 
$$
V=\int_{-R}^R 4(R^2-z^2)\,dz = 4\left[R^2z-\frac13z^3\right]_{-R}^R = \frac{16}{3}R^3
$$

{\sf
Plausibility check: The ball of radius $R$, centered at the origin, is
contained in each of the cylinders and therefore in the intersection
body as well. Its volume (which is known to be $\frac43\pi R^3$) must
therefore be smaller than the volume of the body that we have just
calculated. Indeed $\frac43\pi < \frac{16}3$. }

\begin{quote}
\underline{\underline{\bf 40:}}
A glass has the shape of a circular cylinder. It is initially full
with water. We pour out some water carefully by leaning the glass
sideways until the surface of the remaining water touches the bottom
of the glass along a diameter. What percentage of the water remains in
the glass? 

Assume the radius is $R$ and the height $h$, but express the remaining
volume as a fraction of the total volume $\pi R^2h$. 

Note/Hint: There are at least three ways of doing the problem. One in which
the slices are rectangles, one in which the slices are right
triangles, and one in which the slices are segments of a circle. 
Set up integrals for all three of them. 

Evaluate the integral obtained in at least two of the ways. 
[Hints abridged here]
\iffalse
The figure above shows various
sections of the glass, which is standing, with the water (grey) `frozen' in
place, centered at the origin of
the $x$--$y$--plane. The vertical axes is the $z$ axis.

Rectangles: 
slices parallel to the $y$--$z$--plane, different slices have
different $x$. 
\\
Triangles: 
slices parallel to the $x$--$z$--plane, different slices have
different $y$
\\
Circular segments:
slices parallel to the $x$--$z$--plane, different slices have
different $z$
\fi
\end{quote}
{\bf Solution: }

\begin{minipage}{10cm}
{\sc Version 1: }\\
 We slice perpendicular to the $x$--axis (parallel to
the $y$--$z$--plane).  The slice at location $x$ with thickness
$\Delta x$ is drawn (bold) in the figure. 

\begin{picture}(140,170)
\put(0,0){\special{psfile=hwk40fig3a.eps}}
\end{picture}
\end{minipage}
\kern3em
\begin{minipage}{135bp}
\fbox{%
\begin{picture}(135,220)
\put(0,0){\special{psfile=hwk40fig.eps}}
\put(70,5){footprint}
\put(85,165){vertical} 
\put(85,152){cross} 
\put(85,139){section}
\put(85,126){(at $y=0$)}
%
\put(65,10){\rule{3pt}{60pt}}
\put(65,100){\rule{3pt}{64pt}}
 \end{picture}%
}
\end{minipage}

\vskip1ex
The slice is a rectangle whose basis footprint has the width $2
\sqrt{R^2-x^2}$, and whose height is (by proportions) $\frac{h}{R} x$.

\vskip1ex
The slices range from $x=0$ to $x=R$. 

\vskip1ex
We conclude the volume is 
$$
%\begin{array}{l}\Dst
V = \int_0^R 2\frac{h}{R} x \sqrt{R^2-x^2}\,dx
%\\[2ex]\Dst
%\phantom{V} 
= 
\frac{h}{R} \left[-\frac23(R^2-x^2)^{3/2}\right]_{x=0}^{x=R} 
= \frac23 h R^2
%\end{array}
$$


\vskip2ex

\begin{minipage}{135bp}
\fbox{%
\begin{picture}(135,220)
\put(0,0){\special{psfile=hwk40fig.eps}}
\put(70,5){footprint}
\put(85,165){vertical} 
\put(85,152){cross} 
\put(85,139){section}
\put(85,126){(at $y=0$)}
%
\put(40,38.5){\rule{40pt}{3pt}}
%
\put(40,13.5){\rule{32pt}{3pt}}
\put(40,98.5){\rule{32pt}{3pt}}
%\put(70.5,98.5){\rule{3pt}{76pt}}
\put(40,100){\special{" 5 setmiterlimit 3 setlinewidth 0 0 moveto 32 80 lineto 32 0
    lineto closepath stroke}}
 \end{picture}%
}
\end{minipage}
\kern3em
\begin{minipage}{10cm}
{\sc Version 2: }\\
We slice perpendicular to the $y$-axis (i.e., parallel to the
$x$--$z$--plane. The slice at $y=0$ is seen in the cross section, with
the footprint of that section a radius along the $x$--axis. 

\hfill\begin{picture}(140,170)
\put(0,0){\special{psfile=hwk40fig3b.eps}}
\end{picture}
\end{minipage}


\vskip1ex
A slice for different $y$ (say in front of the originally drawn
vertical cross section -- meaning negative~$y$) along with its
footprint is also outlined in the figure on the left.

\vskip1ex
The cross sections are right triangles whose basis extends from $x=0$
to some $y$--dependent $x_{max}$, namely $x_{max}= \sqrt{R^2-y^2}$. 
The slope of the hypotenuse is the same for all these triangles,
namely $h/R$. So the height of the triangle is $(h/R)x_{max}$. The
area is therefore $\frac12\,\frac hR (R^2-y^2)$ and we get
$$
V=\int_{-R}^R \frac{h}{2R}(R^2-y^2)\, dy = \frac23 hR^2
$$

\vskip3ex

\begin{minipage}{10cm}
{\sc Version 3: }
We slice horizontally, i.e., parallel to the $x$--$y$--plane and
perpendicular to the $z$ axis. The slices will be segments of a disk,
with the cut--off at some $x=a$ (where $a$ depends on the slice, i.e.,
on~$z$). 

\begin{picture}(90,100)
\put(0,0){\special{psfile=hwk40fig2.eps}}
\end{picture}
\end{minipage}
\hfill
\begin{minipage}{140pt}
\begin{picture}(140,170)
\put(0,0){\special{psfile=hwk40fig3c.eps}}
\end{picture}
\end{minipage}


Specifically, at $z=0$, we have $a=0$; and at $z=h$, we have
$a=R$; in between, the cutoff is proportional to $z$. So we have $a(z) =
\frac zh R$. 

In a first step we need to figure out the area of the cross section: 
$$
\begin{array}{l}\Dst
A(z) = \int_{a(z)}^R 2\sqrt{R^2-x^2}\,dx = 
\rmk{x=R\sin\varphi}
\int_{\arcsin(z/h)}^{\pi/2}2R^2\cos^2\varphi\,d\varphi
= R^2\Bigl[\varphi +
  \sin\varphi\cos\varphi\Bigr]_{\arcsin(z/h)}^{\pi/2}
\\[7ex] \Dst
\phantom{A(z)}= 
R^2\left( \frac{\pi}{2}-\arcsin\frac zh -\frac zh \sqrt{1-(\frac zh)^2}
\,\right)
\end{array}
$$
The same area could also have been obtained by elementary geometry as
the difference of an area of a sector (with opening angle $2\arccos
\frac aR$) and a triangle with basis $2\sqrt{R^2-a^2}$ and
height~$a$. Namely, the area would be obtained as $R^2\arccos\frac aR
-a \sqrt{R^2-a^2}$. This is the same, in view of $a/R=z/h$ and
$\arccos t = \frac\pi 2-\arcsin t$. 

We now can obtain the volume as an integral over all slices, with $z$
ranging from $0$~to~$h$:

$$
V = \int_0^h R^2 \left( \frac{\pi}{2}-\arcsin\frac zh -\frac zh \sqrt{1-(\frac zh)^2}
\,\right)\, dz = \rmk{z=hu\,,\;dz=h\,du}
R^2h \int_0^1({\Tst\frac\pi2}-\arcsin u)\,du - R^2h\int_0^1 u\sqrt{1-u^2}\,du
$$
Treat the 1st integral with IBP, integrating 1 and differentiating all
the rest. The second integral is a straightforward substitution (no
trig sub needed). 
$$
\begin{array}{l}\Dst
V= R^2h \Bigl[u({\Tst\frac\pi2}-\arcsin u)\Bigr]_0^1 -
R^2h\int_0^1\frac{-u\,du}{\sqrt{1-u^2}}
-R^2h\left[-\frac13(1-u^2)^{3/2}\right]_0^1
\\[2ex]\Dst
\phantom{V} = 
0 - R^2h \left[\sqrt{1-u^2}\right]_0^1 - \frac{R^2h}{3}
=
\frac23 R^2h
\end{array}
$$

Either method gives a volume of $\frac23 R^2h$, which is a fraction of
$\frac{2}{3\pi}\approx 21.2\%$ of the capacity $\pi R^2 h$ of the glass. 

\newpage

\begin{quote}
\underline{\underline{\bf 41:}}
(a)
Given a torus that is obtained by rotating a circle of radius~$r$,
centered at $x=R$ on the $x$--axis,  about the $y$--axis, use the
shell method to calculate its volume. (The answer should of course
coincide with the answer $V=2\pi^2r^2R$ obtained by slicing in class.)

(b) {\sf (abridged text)}
Now assume $R<r$, so the circle that rotates about the $y$ axis
intersects the $y$--axis. We only cosider the part of the circle that
is in $x\ge0$, let it rotate about the $y$--axis. Use the shell method
to find the volume of the rotation body. 
\end{quote}


{\bf Solution: }

\begin{minipage}{200bp}
\begin{picture}(180,94)
\put(0,0){\special{psfile=hwk41fig.eps}}
\end{picture}
\end{minipage}\hfill
\begin{minipage}{240bp}
(a) The figure shows a slice of thickness $dx$ at distance $x$ from the
$y$--axis. Upon rotation about the $y$-axis, a cylindrical shell
arises. 

\vskip1ex
The circle describing the cross section itself is given by
$(x-R)^2+y^2=r^2$, so the height  of the slice is
$2\sqrt{r^2-(x-R)^2}$. Here $x$ ranges from $R-r$ to $R+r$.
\end{minipage}
\vskip1ex

The volume of the torus is therefore 
$$
\!\!
\begin{array}{l}\Dst
V= \int_{R-r}^{R+r} 2\pi x\,2\sqrt{r^2-(x-R)^2}\,dx
=\rmk{x-R=u} 4\pi\int_{-r}^r (u+R)\sqrt{r^2-u^2}\,du
=\rmk{u=r\sin\theta}
4\pi\int_{-\pi/2}^{\pi/2}(r\sin\theta+R)r^2\cos^2\theta\,d\theta
\\[6ex]\Dst
\phantom{V} = 
4\pi r^3\left[-\frac{\cos^3\theta}{3}\right]_{-\pi/2}^{\pi/2} 
+ 4\pi Rr^2\int_{-\pi/2}^{\pi/2}\cos^2\theta\,d\theta
=2\pi^2 Rr^2
\end{array}
$$

(b) If $R<r$, the formulas are the same, but the integral extends only
from $x=0$ to $x=R+r$.
$$
\!\!
\begin{array}{l}\Dst
V= \int_{0}^{R+r} 2\pi x\,2\sqrt{r^2-(x-R)^2}\,dx
=\rmk{x-R=u} 4\pi\int_{-R}^r (u+R)\sqrt{r^2-u^2}\,du
=\rmk{u=r\sin\theta} \mbox{}
\\[6ex]\Dst
\phantom{V} = 
4\pi\int_{-\arcsin(R/r)}^{\pi/2}(r\sin\theta+R)r^2\cos^2\theta\,d\theta
\\[2ex]\Dst
\phantom{V} = 
4\pi r^3\left[-\frac{\cos^3\theta}{3}\right]_{-\arcsin(R/r)}^{\pi/2} 
+ 4\pi Rr^2\int_{-\arcsin(R/r)}^{\pi/2}\cos^2\theta\,d\theta
\\[2ex]\Dst
\phantom{V} = 
\frac{4\pi r^3}{3}\left(1-\frac {R^2}{r^2}\right)^{3/2} + 
2\pi R r^2\Bigl[\theta+\sin\theta\,\cos\theta\Bigr]_{-\arcsin(R/r)}^{\pi/2} 
\\[2ex]\Dst
\phantom{V} = 
\frac{4\pi}{3}\left(r^2-R^2\right)^{3/2} + \pi^2Rr^2 + 2\pi
Rr^2\arcsin\frac Rr + 
2\pi R r^2 \frac Rr\sqrt{1-\Bigl(\frac Rr\Bigr)^2}
\\[2ex]\Dst
\phantom{V} = 
\frac{4\pi}{3}\left(r^2-R^2\right)^{3/2} 
+2\pi R^2\sqrt{r^2-R^2} 
+ \pi^2Rr^2 + 2\pi Rr^2\arcsin\frac Rr
\end{array}
$$

A few consistency checks: When $R=r$, the formula should reduce to the
one in part (a) for $R=r$.
\\
When $R=0$, we actually just get a ball of radius $R$ and our formula
should reduce to $V=\frac43\pi R^3$, which it does. 


\begin{quote}
\underline{\underline{\bf 42:}}
The area below the curve $z= e^{-x^2}$ and above $z=0$ rotates about
the $z$--axis. Calculate its volume by means of shells. {\sf Note: 
You can expect to get a finite volume, even though the body extends
all the way to $\infty$. The volume is to be understood here as an
improper integral, i.e., you first consider only the area from $x=0$
to $x=R$ rotating, and the volume you obtain this way. Then you let
$R\to\infty$. }
\end{quote}
{\bf Solution: } The volume of the rotation body up to $x=R$ is 
$$
V(R)= 2\pi\int_0^R x e^{-x^2}\,dx = \pi\left[-e^{-x^2}\right]_0^R
= \pi(1-e^{-R^2})
$$
The total volume is the limit as $R\to\infty$: namely
$V=\lim_{R\to\infty}V(R)=\pi$. 




\begin{quote}
\underline{\underline{\bf 43:}} {\sf (abridged text)}
Let's go back to volume by slicing and do the previous problem that
way. We have the body above the $x$--$y$--plane and below the rotated
version of the curve $z=e^{-x^2}$, which is the surface $z=e^{-r^2}$,
where $r^2=x^2+y^2$. Slice the body by planes perpendicular to the
$y$--axis.
You will run into the difficulty that you cannot evaluate
$\int_{-\infty}^\infty e^{-x^2}\,dx$. Just call this unknown number
$I$. Its numerical value is $I\approx 1.8$.

Now express the volume of the said body as a simple expression
involving the quantity~$I$.

Compare your result with the previous problem. From this comparison, 
conclude the {\em
  exact\/} value of $I=\int_{-\infty}^\infty e^{-x^2}\,dx$. 
\end{quote}

{\bf Solution: }{\sf Maybe, before calculating, an explanation of the
  geometry is at hand: The $z$--axis arises vertically out of the
  $x$--$y$--plane. The distance $r$ form the $z$--axis is given by
  $r^2=x^2+y^2$, same as the distance from the origin in the
  $x$--$y$--plane. Before rotating, the bell curve is simply given by
  $z=e^{-x^2}$, which is of course the same as $e^{-r^2}$ in the
  drawing plane, where $y=0$. So the surface obtained by rotating the
  bell curve is $z=e^{-r^2} = e^{-x^2-y^2}$. }

If we now slice this figure perpendicular to the $y$--axis (which is
parallel to the $x$--$z$--plane, or the drawing plane), we are talking
about a slice below $z=e^{-x^2-y^2}$ and above $z=0$. What is the area
of this slice? 
It is simply 
$$
A(y) = \int_{-\infty}^{\infty} e^{-x^2-y^2}\,dx
$$
We are integrating over $x$ here; in this calculation $y$ is just a constant, as
every point on that certain slice has the same $y$--value. 
So we find $A(y) = e^{-y^2}\int_{-\infty}^{\infty} e^{-x^2}\,dx = I
e^{-y^2}$. 

{\bf Note: }{\sf In this step, we have cheated a bit (with the permission
of the stated question). Since we have not evaluated $\int
e^{-x^2}\,dx$ for lack of a formula antiderivative, we do not know
whether the limit of the definite integral $\int_{-a}^a e^{-x^2}\,dx$
as $a\to\infty$ actually exists, i.e., whether we {\em have\/} a number that
we may call $I$.  We will later learn how to see that indeed we do
have such a number.} 


Next we have to integrate all the slice areas to get the volume.
So we conclude
$$
V=\int_{-\infty}^\infty A(y)\,dy = 
\int_{-\infty}^\infty I\,e^{-y^2}\,dy = 
= I \int_{-\infty}^\infty e^{-y^2}\,dy = I^2
$$


So we have expressed $V$ in terms of the unknown integral $I$, whose
value we don't know yet (but which we are promised is approximately
$1.8$. The slicing method was not so successful in finding
this particular volume. In contrast, the shell method was successful. 

By comparing the results, we can now use the equation $I^2=\pi$ to
conclude that $I=\sqrt{\pi}$. (Of course not $-\sqrt{\pi}$ since
clearly $I>0$.) So we have redeemed the unsuccessful
slicing attempt at the volume and, by reverse--engineering it, have
found the integral
$$
\int_{\infty}^\infty e^{-x^2}\,dx = \sqrt{\pi}\,,
$$
a result that was otherwise not available. Yeah!

\bigskip

\begin{quote}
\underline{\underline{\bf 44:}}
Calculate the perimeter of the ellipse
$\frac{x^2}{a^2}+\frac{y^2}{b^2}=1$ as an integral
$2\int_{-a}^a\ldots\,dx$. (You will not be able to evaluate this
integral, so leave it alone, except for algebraic simplification of
the expression under the integral.) 

Use the trig substitution $x=a\sin u$ to convert the obtained integral
into another integral (which you still won't be able to finish up, but
which may turn out to be more convenient in some cases, like for
numerical purposes). 
\end{quote}

{\bf Solution: }
The part of the ellipse above the $x$--axis is given by
$y=b\sqrt{1-(\frac xa)^2}=\frac ba\sqrt{a^2-x^2}$; the part below the
$x$--axis by the same formula with the negative square root. 

So the perimeter of the ellipse is
$$
L = 2\int_{-a}^a \sqrt{1 + \left(
\frac{\frac ba (-x)}{\sqrt{a^2-x^2}}
\right)^2} \, dx = 
2\int_{-a}^a \sqrt{
\frac{a^2-x^2+b^2x^2/a^2}%
     {a^2-x^2}
}\,dx 
$$
where the factor 2 comes from having curve parts both above and below
the $x$--axis. 

With the substitution $x=a\sin u$, hence $dx=a\cos u\,du$ and
$\sqrt{a^2-x^2}=a\cos u$, the integral becomes
$$
L = 2\int_{-\pi/2}^{\pi/2} 
\sqrt{a^2\cos^2 u + b^2\sin^2u} \,du
$$

{\sf Simple consistency check: For $b=a$, the ellipse becomes a
  circle of radius~$a$, and our formula should reduce to $L=2\pi a$,
  which it does indeed.}

\begin{quote}
\underline{\underline{\bf 45:}} %{\sf (abridged text)}
(a)
Calculate the length of the arc of the parabola $y=ax^2-1$ between $x=0$
and $x=b$. [The `$-1$' part is irrelevant here and just offered for
  convenience in part (b).]  You may borrow a good deal of work from either 27d or 29d,
after doing either a trig or hyp substitution to finish up the
integral.

{\sl The `limit'  part of b is voluntary; but if you skip it you have to
  do part c instead. Part c is much easier, but way less fun. }

(b) A downsized version of a Putnam competition problem in 2001 asks
whether it is possible to choose $a$ in such a way that the part of
the parabola inside the disc $x^2+y^2\le1$ is longer than 4. Assume
$a>\frac12$ and find the appropriate intersection point $(b,
ab^2-1)$. Calling $L(a)$ the length of that part of the parabola inside
the disk, as a function of $a$, calculated according to part (a), show
that $a(L(a)-4)$ goes to $\infty$ as $a\to\infty$. Conclude the
correct answer to the Putnam question. 

(c) Instead of calculating the limit as $a\to\infty$ in part (b), use a pocket
calculator to evaluate the length of the piece of the parabola inside
the disk in the case $a=100$. Answer the Putnam question. 
{\sf FYI: there are no calculators on the Putnam competition.}
\end{quote}

{\bf Solution: }(a)
$$
\begin{array}{l}\Dst
L = \int_0^b \sqrt{1 + (2ax)^2}\, dx = \rmk{x=\frac1{2a}\sinh t}
 \frac1{2a} \int_0^{\arsinh 2ab} \cosh^2 t\,dt
= \frac1{8a}\int_0^{\arsinh 2ab} (e^{2t}+2+e^{-2t})\,dt
\\[6ex]\Dst
\phantom{L} 
= \frac1{8a} \left[
\frac12e^{2t}-\frac12e^{-2t}+2t
\right]_0^{\arsinh 2ab}
\end{array}
$$

So we have to find $e^t$ knowing that $\sinh t = u:= 2ab$. As in 29c,
we see that $t= \ln(u+\sqrt{u^2+1})$. So we find $e^t = u+\sqrt{u^2+1}$
and $e^{-t}=-u+\sqrt{u^2+1}$. We need these to be squared and conclude 
$$
\begin{array}{l}\Dst
L= \frac1{16a}\left(\Bigl(2ab+\sqrt{(2ab)^2+1}\Bigr)^2 -
\Bigl(-2ab+\sqrt{(2ab)^2+1}\Bigr)^2 + 4\ln\Bigl(2ab+\sqrt{(2ab)^2+1}\Bigr) 
\right)
\\[2ex]\Dst
\phantom{L} = 
\frac1{4a}\left(2ab\sqrt{(2ab)^2+1} +
\ln\Bigl(2ab+\sqrt{(2ab)^2+1}\Bigr) 
\right)
\end{array}
$$

(b) We need to find the appropriate value of $b$ as value $x$ where
$y=ax^2-1$ intersects $x^2+y^2=1$. So we have to solve
$$
x^2 + (ax^2-1)^2=1\,,\quad \mbox{equivalently} \quad
a^2 x^4 +(1-2a)x^2 = 0
$$
The solution $x=0$ can be neglected, and we find
$x=\pm\sqrt{2a-1}$. So $b=\frac{\sqrt{2a-1}}{a}$, and the arclength of
relevance 
is the integral from $-b$ to $b$, which is twice the integral from 0
to~$b$. We conclude therefore
$$
\begin{array}{l}\Dst
L(a) = \frac1{2a}\left(
2\sqrt{2a-1}\sqrt{(2\sqrt{2a-1})^2+1} +
\ln\Bigl(2\sqrt{2a-1}+\sqrt{(2\sqrt{2a-1})^2+1}\Bigr) 
\right)
\\[2ex]\Dst
\phantom{L(a)}=
\frac{\sqrt{2a-1}\sqrt{4(2a-1)+1}}{a}
+ \frac{\ln\left( 2\sqrt{2a-1} + \sqrt{4(2a-1)+1}   \right)}%
       {2a}
\end{array}
$$
That's messy, but for large $a$, we can do a rough estimate by
neglecting all small numbers added to or subtracted from the large
quantity~$a$. Thus we are getting
the first term to be close to $\sqrt{2a}\sqrt{8a}/a=4$ and the second
term close to $\ln(4\sqrt{2a})/(2a)$. 

Following the hint, we calculate $a(L(a)-4)$:
$$
\begin{array}{l}\Dst
a(L(a)-4) = 
\sqrt{2a-1}\sqrt{8a-3} - 4a + \ln(2\sqrt{2a-1}+\sqrt{8a-3})
\\[2ex]\Dst\phantom{a(L(a)-4)}
= 
\frac{(2a-1)(8a-3) - (4a)^2}{\sqrt{2a-1}\sqrt{8a-3} + 4a} +
\ln(2\sqrt{2a-1}+\sqrt{8a-3}) 
\\[2ex]\Dst\phantom{a(L(a)-4)}
= 
\frac{-14a+3}{\sqrt{2a-1}\sqrt{8a-3} + 4a} +
\ln(2\sqrt{2a-1}+\sqrt{8a-3}) 
\end{array}
$$
The second term in the sum goes to $+\infty$ as $a\to\infty$. The
first has limit $-\frac{14}{8}$, as can be seen by writing it as
$\frac{-14+\frac3a}{\sqrt{2-\frac1a}\sqrt{8-\frac3a}+4}$. 
So the sum of both terms goes to $\infty$ as $a\to\infty$; this means
in particular it will be $>0$ for large $a$.

We can get $L(a)>4$. 

(c) $L(100) \approx 4.00267$.



\begin{quote}
\underline{\underline{\bf 46:}}
Take the ellipse from problem 44, let it rotate about the $x$-axis. 
Find the surface area of the body thus obtained. You may assume
$b<a$. 
{\sf Note: This time,
  evaluation of the integral is quite manageable. }
\end{quote}
{\bf Solution: }

$$
A= \int_{-a}^a 2\pi\frac ba\sqrt{a^2-x^2}\, \sqrt{
  \frac{a^2-x^2+b^2x^2/a^2}{a^2-x^2}}\, dx
= 2\pi \frac{b}{a^2} \int_{-a}^a \sqrt{a^4 - (a^2-b^2)x^2}\,dx
$$
We substitute $x=\frac{a^2}{\sqrt{a^2-b^2}}\sin u$ and get 
$$
\begin{array}{l}\Dst
A = \frac{2\pi b}{a^2}\, 
\int_{-\arcsin(\sqrt{a^2-b^2}/a)}^{\arcsin(\sqrt{a^2-b^2}/a)} 
a^2\cos u\, \frac{a^2}{\sqrt{a^2-b^2}}\cos u\, du
= 
\frac{2\pi a^2 b}{\sqrt{a^2-b^2}}\,\frac12\left[u + \sin u\, \cos u
\right]_{-\arcsin(\sqrt{a^2-b^2}/a)}^{\arcsin(\sqrt{a^2-b^2}/a)} 
\\[2ex]\Dst
\phantom{A} =
\frac{2\pi a^2 b}{\sqrt{a^2-b^2}} \arcsin\frac{\sqrt{a^2-b^2}}{a} 
+ 
2\pi ab \sqrt{1-\frac{a^2-b^2}{a^2}}
=
\frac{2\pi a^2 b}{\sqrt{a^2-b^2}} \arcsin\frac{\sqrt{a^2-b^2}}{a} 
+ 
2\pi b^2
\end{array}
$$

\bigskip


\begin{quote}
\underline{\underline{\bf 47:}}
For the torus from \#41a, calculate its surface area. 
\end{quote}
{\bf Solution: }\\
\begin{minipage}{200bp}
\begin{picture}(180,94)
\put(0,0){\special{psfile=hwk47fig.eps}}
\end{picture}
\end{minipage}\hfill
\begin{minipage}{240bp}
(a) The figure shows in bold a small segment of the circumference of the
  circle that rotates about the $y$-axis. 
Its location is described by the coordinate $x$, and its length is 
$\sqrt{1+f'(x)^2}\,dx$ where $f(x)=\sqrt{r^2-(x-R)^2}$ defines the
function whose graph is the circle. The radius of rotation is $x$, so
the distance travelled under this rotation is $2\pi x$, and the total
area traced out by this small segment is 
$2\pi x\times \sqrt{1+f'(x)^2}\,dx$. 
\end{minipage}

Note that $f$ describes only the upper half of the rotating circle. 
A factor of 2 will take the lower half into account as well. 
Therefore the surface area is
$$
\begin{array}{l}\Dst
S = 2\int_{R-r}^{R+r} 2\pi x \sqrt{1+\Bigl(  
\frac{-(x-R)}{\sqrt{r^2-(x-R)^2}}
\Bigr)^2}\,dx
=
4\pi\int_{R-r}^{R+r} x\sqrt{\frac{r^2}{r^2-(x-R)^2}}\,dx
=\rmk{x-R=r\sin u}
\\[6ex]\Dst\phantom{S} =
4\pi r \int_{-\pi/2}^{\pi/2} \frac{(R+r\sin u)\,r\cos u\,du}%
{r\cos u}
=4\pi r(\pi R) + 4\pi r^2\int_{-\pi/2}^{\pi/2} \sin u\, du
= 4\pi^2 Rr
\end{array}
$$

\begin{quote}
\underline{\underline{\bf 48:}}
The function $r(\varphi) = a (1-\cos\varphi)$ describes
a heart--shaped
(or apple--shaped?) curve 
called the cardioid. \\
(a) Calculate the area $A$ 
it encloses;\\
(b) also calculate the length $L$ of this curve.\\
(c) As a simple consistency check, confirm 
the isoperimetric inequality, namely that 
$A/L^2< \pi/(2\pi)^2$.
\end{quote}
{\bf Solution: } (a) To trace out the entire curve, $\varphi$ has to
range from 0 to~$2\pi$ (or from $-\pi$ to $\pi$, if preferred). 
Recalling that the area of a circular sector  with radius~$r$
and opening angle $\Delta\varphi$ is $\frac12 r^2\Delta\varphi$, we get
$$
A=\frac12\int_{0}^{2\pi} a^2(1-\cos\varphi)^2\,d\varphi
= \frac{a^2}{2} \int_{0}^{2\pi}
(1-2\cos\varphi+\cos^2\varphi)\,d\varphi 
= \frac{a^2}{2} (2\pi - 0 + \pi) = \frac32\pi a^2
$$

(b) For the circumference, we find
$$
\begin{array}{l}\Dst
L= \int_{-\pi}^{\pi}\sqrt{r^2+r'^2}\,d\varphi 
=
\int_{0}^{2\pi}\sqrt{a^2(1-\cos\varphi)^2 + a^2\sin^2\varphi}\,
d\varphi  
\\[2ex] \Dst \phantom{L}
=a\int_{0}^{2\pi}\sqrt{(1+\cos^2\varphi - 2\cos\varphi + \sin^2\varphi}\,
d\varphi
= a\int_{0}^{2\pi} \sqrt{2-2\cos\varphi}\,d\varphi
\end{array}
$$
Short of a trig-identity identifying $2-2\cos\varphi$ as a complete
square, we'd be stuck herewith an elliptic integral (see comment given
with the assignment of Hwk 44). Namely
$2-2\cos\varphi=4\sin^2\frac12\varphi$. So we simplify
$$
L=2a\int_{0}^{2\pi} \sin\frac\varphi2\,d\phi
= 2a\left[-2\cos\frac\varphi2\right]_{0}^{2\pi} = 8a
$$

$$
\frac{A}{L^2} = \frac{3\pi}{128} \approx 0.0736 < \frac1{4\pi} \approx
0.0796
\leqno{\mbox{(c)}}
$$

\begin{quote}
\underline{\underline{\bf 49:}}
(a) 
That same cardioid now rotates about the $x$--axis. Calculate the
surface area~$S$ of the apple--shaped body thus obtained. 

(b) Also calculate the enclosed volume~$V$. {\bf Hint: }Slices in the form
of disks or washers may actually be easiest. Note that
$x=r(\varphi)\cos\varphi$ and $y=r(\varphi)\sin\varphi$ and use the
formula $\int_{x_{min}}^{x_{max}} \pi y^2\,dx + \int_{x_{max}}^0 
\pi y^2\,dx$ (explain why?), with $x,y,dx$ properly expressed in terms of
$r(\varphi)$ and $\varphi$.

(c) Confirm that your results are consistent with the isoperimetric
inequality 
$V^2/S^3 < (\frac43\pi)^2/(4\pi)^3$. 
\end{quote}
{\bf Solution: }\\
\begin{minipage}{190bp}
\begin{picture}(163,160)
\put(0,0){\special{psfile=hwk48fig.eps}}
\put(0,0){\special{" 3 setlinewidth 81 158 moveto 9 -1 rlineto stroke}}
\end{picture}
\end{minipage}\hfill
\begin{minipage}{250bp}
(a) First note that to obtain the entire surface of the `apple' by
  rotation about the $x$--axis, only the upper half of the curve is
  needed, so $\varphi$ ranges only from $0$ to $\pi$ here. 

  I have added in bold a short segment at location $\varphi$ on the
  curve. Its length is $\sqrt{r^2+r'^2}\,d\varphi$, and it rotates about
  the $x$-axis, with the radius of rotation being
  $y=r(\varphi)\sin\varphi$. Therefore
  $$
  \begin{array}{l}\Dst
  S = \int_0^\pi 2\pi r(\varphi)\sin\varphi
  \,\sqrt{r^2(\varphi)+r'^2(\varphi)}\, d\varphi
  \\[2ex]\Dst \phantom{S} 
  = 2\pi a^2\int_0^\pi (1-\cos\varphi)\sin\varphi\,
  2\sin\frac\varphi2\, d\varphi\,,
  \end{array}
  $$
\end{minipage}
\vphantom{$()^I$}%
where the evaluation of the square root is taken from the previous
problem. 

We use some trig-id's to simplify the integrand:
$$
S = 2\pi a^2 \int_0^{\pi} (1-\cos\varphi)\,
4\sin^2 \frac\varphi2\,\cos\frac\varphi2
\,d\varphi 
=\rmk{\varphi=2t}
 16\pi a^2 \int_0^{\pi/2} (2\sin^2 t)\sin^2 t \cos t \,dt
=\rmk{\sin t = u} 
16\pi a^2\int_{0}^{1} 2u^4\,du
$$
We evaluate immediately 
$\Dst
S = \frac{32}{5}\pi a^2
$.

\begin{minipage}{8cm}
(b)
As $\varphi$ ranges from $\pi$ backwards to $0$, the corresponding
point on the cardioid ranges from the leftmost point $(x_{min},0)$ to
the cusp at $(0,0)$ along the upper part of the cardioid. 
In between, at some value $\varphi=\varphi_*$, we reach the rightmost
point, with coordinate $x_{max}=r(\varphi_*)\cos\varphi_*$. 
If we calculate 
$$
\begin{array}{l}\Dst
\int_{x_{min}}^{x_{max}} \pi y^2\,dx
=\mbox{}
\\[2ex]\Dst\kern1em\mbox{}=
\int_{\pi}^{\varphi_*} \pi\, \Bigl(r(\varphi)\sin\varphi\Bigr)^2\,
\frac{d}{d\varphi}\Bigl(r(\varphi)\cos\varphi\Bigr)\,d\varphi
\end{array}
$$
we obtain the volume of the `apple with the indent filled in' (shaded
in the figure). 
\end{minipage}
\hfill
\begin{minipage}{200pt}
\begin{picture}(198,160)
\put(35,0){\special{psfile=hwk49fig.eps}}
\put(0,95){$\varphi=\pi$\raisebox{-2ex}{$\searrow$}}
\put(43,71){$x_{min}$}
\put(176,71){$x_{max}$}
\put(176,105){$\leftarrow\;\varphi=\varphi_*$}
\end{picture}
\end{minipage}

We obtain the actual volume by subtracting the volume of the filled-in
part, i.e., 
$$
\int_0^{x_{max}} \pi y^2\,dx
=
\int_{0}^{\varphi_*} \pi\, \Bigl(r(\varphi)\sin\varphi\Bigr)^2\,
\frac{d}{d\varphi}\Bigl(r(\varphi)\cos\varphi\Bigr)\,d\varphi
\;.
$$
(Note that the `$y$' in both formulas refers to a different function
of~$x$ --- namely the larger radius in the first formula, the smaller
radius in the second formula; but expressing $x$ and $y$ in terms
of~$\varphi$, we have two different choices of $\varphi$ giving the
same $x$ but different $y$.)

By swapping the limits of integration in the subtracted term, we
obtain an addition: \\[0.5ex]
$\int_{\pi}^{\varphi_*}\ldots - \int_0^{\varphi_*}\ldots = 
 \int_{\pi}^{\varphi_*}\ldots + \int_{\varphi_*}^0\ldots = 
 \int_{\pi}^{0}\ldots$,\\[0.5ex] 
and thus we get
$$
V = \pi \int_\pi^0 a^2(1-\cos\varphi)^2\sin^2\varphi \, 
a(-\sin\varphi +2\sin\varphi\cos\varphi)\,d\varphi
= \pi a^3
\int_\pi^0\sin^3\varphi\,(1-\cos\varphi)^2(2\cos\varphi-1)\,d\varphi
$$
Substituting $\cos\varphi = t$, hence $\sin\varphi\,d\varphi=-dt$, we
get
$$
V= \pi a^3 \int_{-1}^1 (1-t^2) (1-t)^2(1-2t)\,dt = 
\pi a^3 \int_{-1}^1 (1-4t+4t^2+2t^3-5t^4+2t^5)\,dt 
= \pi a^3 \Bigl(2+\frac83-\frac{10}5\Bigr) = \frac83\pi a^3
$$

{\sf Note: It is easy to determine, by maximizing $x(\varphi) = a
  \cos\varphi(1-\cos\varphi)$, that $\varphi_* = \frac\pi3$ and
  $x_{max}=\frac a4$, but we did not need to calculate these data.}

$$
\frac{V^2}{S^3} = \frac{64\pi^2\cdot 5^3}{9\cdot32^3\pi^3} = 
\frac{125}{9\cdot16\cdot32\pi} = \frac{125/128}{36\pi} < \frac{1}{36\pi}
\leqno{\mbox{(c)}}
$$

\newpage

\begin{quote}
\underline{\underline{\bf 50:}}
You sip a drink from a cocktail glass with a straw. 
The cocktail glass is rotationally symmetric with a vertical cross
section given by $y= x^2$ (where $\abs{x}\le3$). The straw extends 6
unit lengths (meaning $6cm$) above the rim of the glass. Assuming the
density to be 1.01937 
(meaning 1.01937 g/cm$^3$, as even juice is mostly water, plus a bit
of sugar), and no ice
(horror, that must have 
happened on a study abroad, but it does simplify the math;-), what is
the work it takes yu to empty the glass by this method, using that 1
Joule = 1~Nm and N=m\,kg/sec$^2$? Use the
acceleration of gravity to be 9.81 m/sec$^2$.
\end{quote}
{\bf Solution: }

\begin{minipage}{11.5cm}
The figure shows the glass with some pertinent data: \vskip1ex

There is a layer of cocktail at height $y$ with thickness $\Delta y$, 
and a circular cross section whose radius $r=x$ satisfies $y=x^2$, so
the radius is $\sqrt{y}$. The volume of this cross section is
$\pi(\sqrt{y})^2\,\Delta y$. This is in units of cm$^3$, or
$10^{-6}$m$^3$.  
With density $\rho = 1.01937$g/cm$^3 = 1.01937\cdot10^{3}$kg/m$^3$ and
acceleration of gravity $g= 9.81$m/sec$^2$, this layer has a weight of 
$$
\pi y \,\Delta y\cdot 10^{-6} \cdot 1.01937\cdot 10^3 \cdot 9.81
\,{\rm N} = \pi y\,\Delta y\cdot 10^{-2}\,{\rm N}
\;.
$$
This layer is at height $y$ and needs to be lifted to height 15
(namely 6 units above the brim, which is is 6 units above 9). So the
distance is $(15-y)$cm, or $(15-y)\cdot 10^{-2}$m. 
The product is the work to get the layer lifted up (sucked up through
the straw). 
\end{minipage}
\hfill
\begin{minipage}{100bp}
%\fbox{%
\begin{picture}(100,200)
\put(0,10){\special{psfile=hwk50fig.eps}}
\put(95,20){$x$}
\put(55,185){$y$}
\end{picture}%
%}
\end{minipage}

Adding up the layers (and taking the limit $\Delta y\to0$)
gives the total work as an integral 
$$
W = \int_0^9 \pi y (15-y)\,dy \cdot 10^{-4}{\rm Joule}
$$
The integral is $\pi\left(\frac{15}{2}\,9^2 - \frac13\,9^3\right) =
\frac{729}{2}\pi\approx 1145$. 

So the total work is $0.1145$~Joule. 


\bigskip

\begin{quote}
\underline{\underline{\bf 51:}}
Here you will numerically evaluate the integral
$\Dst\int_0^1\sqrt{(1-x^2)\Bigl(1-\frac{x^2}{2}\Bigr)}\, dx$. 

(a) Use each of trapezoidal rule, midpoint rule, and Simpson's rule
while splitting the interval of integration into four subintervals of
equal length, comparing the results with 6 digits behind the decimal
point. 

(b) Calculate the 2nd derivative of the integrand and show that it
is negative for all $x$ between 0 and 1. {\sl Hint: Combining all
  terms, you may get a numerator $-6 + 12 x^2 - 9 x^4 + 2 x^6$. Be a
  bit inventive with the algebra to determine its sign when
  $0<x<1$. If you don't see a good idea use that 
{\small\it $x$ to power six is always less than one, to get rid
    of that one term}.}
Explain why the error estimates (relying on $M_2$ or $M_4$ such that
$\abs{f''(x)}\le M_2$ or $\abs{f''''(x)}\le M_4$)
for each of the three rules given in the book are useless in this
case. Also give explicit upper and lower bounds for the integral based
on your knowledge that $f''(x)<0$. 

(c) Now for comparison, substitute $x=\sin u$ and use each of
trapezoidal, midpoint and Simpson rule on the new integral, again with
four subintervals of equal length, again giving 6 digits behind the
decimal point in each case. 
Give error margins for the results, based on the formulas; 
finding bounds $M_2$ and $M_4$ for the second and fourth derivatives
of the integrand is a bit clumsy: you may instead simply use the best 
values found by means of symbolic algebra and graphing software,
namely  $M_2=2.5$ and $M_4= 15.25$. 

(d) Observe the improvement in precision when comparing (a) and (c). 
Compare the result for trapezoidal and Simpson rules with 10
equidistant intervals (and the respective error margins
obtained). 
\end{quote}

{\bf Solution: }
(a) We let $f(x):= \sqrt{(1-x^2)(1-\frac{x^2}{2})}$. 

Midpoint rule with $N$~subintervals of~$[0,1]$ of equal length $\frac1N$: \\
$f$ is to be evaluated at $x_j = (j+\frac12)\frac1N$ for $j=0,1,\ldots,N-1$. 
\\
$I_{mid,4}(f)= \sum_{j=0}^{3} f(\frac{j+1/2}{4})\times\frac14 = 
\Bigl(f(\frac18)+f(\frac38)+f(\frac58)+f(\frac78)\Bigr)\cdot\frac14
\approx 0.740675$. 

Trapezoidal rule with $N$~subintervals of~$[0,1]$ of equal length $\frac1N$: \\
$f$ is to be evaluated at $x_j = \frac jN$ for $j=0,1,\ldots,N$. 
\\
$I_{tra,4}(f)= \sum_{j=0}^{3} \frac12[f(\frac{j}{4})+f(\frac{(j+1)}{4})]
\times\frac14 = 
\Bigl(f(0)+2f(\frac14)+2f(\frac24)+2f(\frac34)+f(1)\Bigr)\cdot\frac18
\approx 0.705963$. 

Simpson rule with $N$ (even!) subintervals of $[0,1]$ of equal
length~$\frac1N$ (here $N=4$):   \\
$I_{sim,4}(f)= \Bigl(f(0)+4f(\frac14)+2f(\frac24)+4f(\frac34)+f(1)\Bigr)
\cdot\frac1{12}
\approx 0.722935$. 


$$
f'(x) = \frac{-2x(1-\frac{x^2}{2}) -x(1-x^2)}% 
             {2\sqrt{(1-x^2)(1-\frac{x^2}{2})}}
=
\frac{-3x+2x^3}{2} \Tst\Bigl[(1-x^2)(1-\frac{x^2}{2})\Bigr]^{-1/2}
\leqno\mbox{(b)}
$$
$$
\begin{array}{l}\Dst
f''(x) = -\frac{(-3x+2x^3)^2}{4} {
\Tst\Bigl[(1-x^2)(1-\frac{x^2}{2})\Bigr]^{-3/2}
} + \frac{-3+6x^2}{2} {
\Tst\Bigl[(1-x^2)(1-\frac{x^2}{2})\Bigr]^{-1/2}
}
\\[2ex]\Dst \phantom{f''(x)}
=
\frac{-(-3x+2x^3)^2 +2(1-x^2)(1-\frac{x^2}{2})(-3+6x^2)}%
     {4 [(1-x^2)(1-\frac{x^2}{2})]^{3/2}}
=
\frac{-6 + 12x^2 - 9x^4 + 2x^6}%
     {4 [(1-x^2)(1-\frac{x^2}{2})]^{3/2}}
\end{array}
$$
To show that $f''(x)<0$ for $0\le x<1$, we have to show that the
numerator is negative. One easy way to see this is to use that $x^6<1$
and therefore 
$$
-6 + 12x^2 - 9x^4 + 2x^6 < -6 + 12x^2 - 9x^4 + 2 = 
-4 + 12x^2 - 9x^4 = -(2-3x^2)^2 \le 0 
$$
Alternatively, we can abbreviate $x^2$ as $t$ for slight
simplification and notice for $g(t)=-6+12t-9t^2+2t^3$ that
$g(0)=-6<0$ and $g'(t)=12>0$. So $g(t)$ starts out negative at $t=0$,
and then increases. Looking if/where a maximum occurs, we look at
solving $g'(t)=0$, which is $12-18t+6t^2=0$, i.e., $t=1$ or $t=2$.
So in particular $g(t)$ is increasing from $t=0$ to $t=1$, where 
$g(1)= -1<0$. 

Since we know now $f''(x)<0$ for $0\le x<1$, we know that the midpoint
rule overestimates and the trapezoidal rule underestimates the actual
integral. 

However $\abs{f''(x)}\to\infty$ as $x\to1-$, so the error estimates
are useless because we do not have a finite $M_2$ (nor do we get a
finite $M_4$). 

(c) Now we substitute $\sin x = u$ in the integral and get
$$
\int_0^1\sqrt{(1-x^2)\Bigl(1-\frac{x^2}{2}\Bigr)}\,dx = 
\int_0^{\pi/2} \underbrace{\cos^2 u\sqrt{1-\frac{\sin^2u}{2}}}_{=: h(u)}\,du
$$


Midpoint rule with $N$~subintervals of~$[0,\frac\pi2]$ of equal length
$\frac1N\cdot\frac\pi2$: \\ 
$h$ is to be evaluated at $u_j = (j+\frac12)\frac\pi{2N}$ for
$j=0,1,\ldots,N-1$.  
\\
$I_{mid,4}(h)= \sum_{j=0}^{3} h(\frac{(j+1/2)\pi}{8})\times\frac\pi8 = 
\Bigl( h(\frac\pi{16}) + h(\frac{3\pi}{16}) + h(\frac{5\pi}{16}) +
h(\frac{7\pi}{16}) \Bigr) \cdot \frac\pi8
\approx 0.732619$. 

Trapezoidal rule with $N$~subintervals of~$[0,\frac\pi2]$ of equal
length $\frac1N\cdot\frac\pi2$: \\ 
$h$ is to be evaluated at $u_j = \frac jN\cdot\frac\pi2$ for
$j=0,1,\ldots,N$.  
\\
$I_{tra,4}(h)= 
\sum_{j=0}^{3} \frac12[h(\frac{j\pi}{8})+h(\frac{(j+1)\pi}{8})]
\times\frac\pi8 = 
\Bigl( h(0) + 2h(\frac\pi8) + 2h(\frac{2\pi}8) + 2h(\frac{3\pi}8) +
h(\frac\pi2) \Bigr) \cdot \frac{\pi}{16}
\approx 0.732619$. 

Simpson rule with $N$ (even!) subintervals of $[0,\frac\pi2]$ of equal
length~$\frac1N\cdot \frac\pi2$; here $N=4$:   \\
$I_{sim,4}(h)= \Bigl(h(0) + 4h(\frac\pi8) + 2h(\frac{2\pi}8) +
4h(\frac{3\pi}8) + h(\frac\pi2) \Bigr) \cdot \frac{\pi}{24}
\approx 0.732563$. 

This time $h''(u)$ may change sign. Actually it does: $h'(0)=0$ and
$h'(\frac\pi2)=0$, so $h''$ cannot be positive on the entire
interval, because then $h'$ would be increasing there; nor can $h''$
be negatie on the entire interval, because then $h'$ would have to
decrease there. 
So we cannot use the trapezoid and midpoint rule to get bounds. 
{\sf [The fact that trapezoid and midpoint give results that coincide 
with at least 6 digits in this case is likely a coincidence. The two
numbers actually differ by about $6.9\cdot 10^{-8}$.]}

Let's calculate the error margins, 
For the trapezoidal rule we get an error margin of 
$\frac{M_2(b-a)^3}{12N^2} = \frac{2.5 (\pi/2)^3}{12\cdot 16} \approx
0.050466$. 
For the midpoint rule, the error margin is half as much:
$\frac{M_2(b-a)^3}{24N^2} = \frac{2.5 (\pi/2)^3}{24\cdot 16} \approx
0.025233$. 

For Simpson, the error margin is 
$\frac{M_4(b-a)^5}{180 N^4} = \frac{15.25 (\pi/2)^5}{180\cdot256}
\approx0.003165$. 

Conclusion :\\
\begin{tabular}{l||l@{\qquad}l|}
 & \kern2em$\int_0^1 f(x)\,dx$ & \kern2em$\int_0^{\pi/2} g(u)\,du$\rule[-1.5ex]{0pt}{3ex} \\
\hline
midpoint    & 0.740675 upper bd & $0.732619 \pm 0.025233$
\\
trapezoidal & 0.705963 lower bd & $0.732619 \pm 0.050466$ 
\\
Simpson     & 0.722935 $\pm????$& $0.732563 \pm 0.003165$
\\
\hline  
\end{tabular}

(d) Finally, if we choose $N=10$, we find an error of 
$\frac{M_2(b-a)^3}{12N^2} = \frac{2.5 (\pi/2)^3}{12\cdot 100} \approx
0.008075$ for the trapezoidal rule. In contrast, for Simpson's rule,
we find a margin of error 
$\frac{M_4(b-a)^5}{180N^4} = \frac{15.25 (\pi/2)^5}{180\cdot 10^4} 
\approx0.000081$.

So let us evaluate them:
$$
\begin{array}{l}
I_{tra,10}(h) = \Bigl( 1\cdot h(0) + 2 h(\frac{\pi}{20}) +
2 h(\frac{2\pi}{20}) + 2 h(\frac{3\pi}{20}) + 2 h(\frac{4\pi}{20}) +
2 h(\frac{5\pi}{20}) + 2 h(6\frac{\pi}{20}) + 2 h(7\frac{\pi}{20}) +
\mbox{} \\[1.5ex] \kern7em
\mbox{} +
2 h(\frac{8\pi}{20}) + 2 h(\frac{9\pi}{20}) +  h(\frac{10\pi}{20}) 
\Bigr) \cdot \frac{\pi}{40}
\approx
0.732619
\end{array}
$$
$$
\begin{array}{l}
I_{sim,10}(h) = \Bigl( 1\cdot h(0) + 4 h(\frac{\pi}{20}) +
2 h(\frac{2\pi}{20}) + 4 h(\frac{3\pi}{20}) + 2 h(\frac{4\pi}{20}) +
4 h(\frac{5\pi}{20}) + 2 h(6\frac{\pi}{20}) + 4 h(7\frac{\pi}{20}) +
\mbox{} \\[1.5ex] \kern7em
\mbox{} +
2 h(\frac{8\pi}{20}) + 4 h(\frac{9\pi}{20}) +  h(\frac{10\pi}{20}) 
\Bigr) \cdot \frac{\pi}{60}
\approx
0.732619
\end{array}
$$
{\sf Note: 
It transpires by use of more powerful numerics that the result from
Simpson with 10 intervals is
already precise to at least 9 digits, $0.73261\,89883\,9\ldots$ with an
exact value being $0.73261\,89886\,1\ldots$. So the actual precision
is a good deal better than the precision guaranteed by the error
estimate. 
}


\newpage
\begin{quote}
\underline{\underline{\bf 52:}}
\begin{quote}\sl 
``How large is the number `1000!' ?'' Can we get a simple formula that allows us 
to give a good approximation for $n!$ for large $n$ that does not
require to go through all the multiplications one by one?
\end{quote}

Integrals can help in this task. We can compare 
$\ln n! = \ln 1 + \ln 2 + \ln 3 + \ln 4 + \ldots + \ln n$ with an
integral that we can actually calculate. So, just for a change, in
this problem we will use (easy) integrals to give a good approximation for
(messy) finite sums, rather than using easy finite sums to find an
approximation for messy integrals!

{\bf Task 1: } Use the midpoint rule with $\Delta x =1$ on the
integral $\int_{3/2}^{n+1/2} \ln x\,dx$ to show that 
$$\textstyle
\ln n! \ge (n+\frac12)\ln (n+\frac12) - (n+\frac12) - \mbox{some
  number}
$$
(of course you want to calculate this ``some number'' precisely!)
Sketch a graph and observe that the correct sign of the 2nd derivative of
the logarithm function tells you why you have `$\ge$' and not
`$\le$'. 

{\bf Task 2: } Use the trapezoidal rule (with $\Delta x=1$) on the
interval from 2 to $n$ to show that 
$$\textstyle
\ln n! \le \frac12\ln(2n) + n\ln n - n + \mbox{some number}
$$
(again you want to calculate this number exactly...)
Sketch a graph and observe, from the sign of the second derivative of
the logarithm function, why you get `$\le$', not `$\ge$'. 

{\bf Task 3: } The $\ln (n+\frac12)$ in the result of task 1 is just a
bit un-beautiful, we'll prefer $\ln n$: 
Explain with a 1-term Riemann-sum 
why $b\int_a^b \frac{dx}{x} >(b-a)$ when $b>a>0$. Use this to show
(by convenient choice of $a$, $b$) that $(n+\frac12)\ln(n+\frac12) >
(n+\frac12)(\ln n) + \frac12$.  

Combine this result with your result from Task 1 to show
$$
\ln n! \ge (n+\frac12)\ln n - n+ \mbox{some
  number}
$$
where again you want that number precisely. 


{\bf Task 4: } Combine your results and apply the exponential function
to them to find that 
$$
C_1 \sqrt{n} \,\frac{n^n}{e^n} \le n! \le C_2 \sqrt{n}\, \frac{n^n}{e^n}
$$
where we want the $C_1$ and the $C_2$ both as exact numbers and
numerically with 3 decimals. 


{\bf Task 5 } for you is only to watch in amazement, you don't have
work of your own here: Advanced Calculus methods that go beyond what
we can do here improve on the result from Task 4; 
they actually show that 
$$
\frac{n!}{\sqrt{n}\, n^n/e^n} \to \sqrt{2\pi}
\mbox{ \ \ as  \ \ } n\to\infty
$$
The numerical value of $\sqrt{2\pi}$ with 3 decimals is 2.507, which
should be neatly between the $C_1$ and $C_2$ obtained above. 

Yet another occurrence of $\pi$ in a context that has nothing to do
with circles!
\end{quote}

{\bf Solution\rule[-1ex]{0pt}{0pt}: }

\begin{minipage}{315bp}
\fbox{
{\bf Task 1: }\rule[-180pt]{0pt}{180pt}
\begin{picture}(250,20)(0,180)
\put(0,0){\special{psfile=hwk52fig1.eps}}
\put(30,180){midpoint rule}
\put(30,166){overestimates integral}
\put(30,152){because $\ln''x<0$}
\put(30,136){Use $\Delta x = 1$}
\put(210,186){$y=\ln x$}
\put(243,20){$x$} 
\put(12,190){$y$}
\end{picture}
}
\end{minipage}
\kern1em
\begin{minipage}{5cm}
$$
\begin{array}{l}\Dst
\ln 2 + \ln 3 + \ldots +\ln n > \mbox{}
\\[1ex]\Dst \kern1em\mbox{}
>\int_{3/2}^{n+1/2}\ln x\, dx =  \mbox{}
\\[2ex]\Dst \kern1em \mbox{}
= \Bigl[x\ln x - x\Bigr]_{3/2}^{n+1/2} 
= \mbox{}
\\[2ex]\Dst \kern1em\mbox{}
=
\Tst (n+\frac12)\ln(n+\frac12) -n-\frac12 \\[1ex]
\kern2em\mbox{}-\frac32\ln\frac32+\frac32
\end{array}
$$
\end{minipage}

\mbox{}\hfill\hfill Therefore 
$\Dst\ln n! > (n+\frac12)\ln(n+\frac12) -n + 1 -\frac32\ln\frac32$.

\bigskip


\fbox{
{\bf Task 2: }\rule[-180pt]{0pt}{180pt}
\begin{picture}(250,20)(0,180)
\put(0,0){\special{psfile=hwk52fig2.eps}}
\put(30,180){trapezoidal rule}
\put(30,166){underestimates integral}
\put(30,152){because $\ln''x<0$}
\put(30,136){Use $\Delta x = 1$}
\put(210,186){$y=\ln x$}
\put(243,20){$x$} 
\put(12,190){$y$}
\end{picture}
}
$$
\begin{array}{l}\Dst
\frac12 \ln 2 + \ln 3 + \ldots + \ln(n-1) + \frac12\ln n <
\int_{2}^{n}\ln x\, dx =  
\Bigl[x\ln x - x\Bigr]_{2}^{n} 
= \Tst n\ln n -n -2\ln2+2
\\[3ex]
\mbox{Therefore }\quad
\ln n! < (n+\frac12)\ln n -n + 2 -\frac32\ln2
\end{array}
$$



{\bf Task 3: }Since $\frac1x$ is decreasing, any right-endpoint
Riemann sum underestimates the integral. In particular
$\int_a^b\frac{dx}{x} > (b-a)\frac1b$, so clearly 
$b\int_a^b\frac{dx}{x} > b-a$. Specifically for $b=n+\frac12$ and
$a=n$, we infer that $(n+\frac12)[\ln(n+\frac12)-\ln n] > \frac12$. 

Therefore, $(n+\frac12)\ln(n+\frac12) > (n+\frac12)\ln n + \frac12$. 
This can be combined with task 1 to conclude
$$\Tst
\ln n! > (n+\frac12)\ln(n+\frac12) -n + 1 -\frac32\ln\frac32 
       > (n+\frac12)\ln n   -n + \frac32 -\frac32\ln\frac32
$$

{\bf Task 4: } Taking the exponential function of the results in task
2 and 3, we get
$$
\underbrace{\Bigl(\frac{2e}{3}\Bigr)^{3/2}}_{\approx2.4395}
\,\frac{n^{n+1/2}}{e^n}
< n! < 
\underbrace{\frac{e^2}{2\sqrt{2}}}_{\approx2.6124}
\,\frac{n^{n+1/2}}{e^n}
$$

\begin{quote}
\underline{\underline{\bf 53:}}
(a) Determine, possibly depending on~$x$, whether the series
  $\Dst\sum_{n=0}^\infty \frac{x^{2n}}{(2n)!}$ converges or diverges.   \\
(b) For which $x$ does the series $\Dst\sum_{n=0}^\infty
  \frac{x^{n^2}}{n!}$ converge? (While we are discussing only
  series with positive terms, you may pretend $x>0$.)\\
(c) Determine, depending on~$x$, whether the series $\Dst\sum_{n=0}^\infty
  \frac{n!^2 x^n}{(2n)!}$ converges. (Again, you may presume $x>0$ for
  now. And you may leave a borderline case, where ratio or root test is
  inconclusive, undecided.)
\end{quote}

{\bf Solution: }
(a) The ratio test seems easiest: 
$$
\abs{\frac{a_{n+1}}{a_n}} = 
\frac{x^{2n+2}\,(2n)!}{(2n+2)!\, x^{2n}} = \frac{x^2}{(2n+2)(2n+1)}
\;.
$$
So $\Dst\lim_{n\to\infty} \abs{\frac{a_{n+1}}{a_n}} = x^2 \lim_{n\to\infty} 
\frac{1}{(2n+2)(2n+1)}=0<1$. Therefore the series converges for every~$x$. 

(BTW, the ratio $a_{n+1}/a_n$ makes no sense when $x=0$, but in this
case the series terminates and therefore converges trivially.)

{\sf Note: We will see soon that the value of this series is $\cosh x$. }

(b) Again, the ratio test is easiest (we may neglect $x=0$, where we have
convergence trivially, b/c the series terminates): 
$$
\frac{a_{n+1}}{a_n} = \frac{x^{(n+1)^2}\, n!}{(n+1)! \,x^{n^2}} = 
\frac{x^{2n+1}}{n+1}
\;.
$$ 
So clearly, if $\abs{x}\le1$, the
$\lim_{n\to\infty}\frac{a_{n+1}}{a_n} = 0 <1$; so in this case the
series converges. On the other hand if $\abs{x}>1$, we have
$\lim_{n\to\infty} \frac{\abs{x^{2n+1}}}{n+1}=\infty>1$ and the series
diverges. 

\begin{quote}\small
In case you don't recall that any $x^n$ with $x>1$ goes to $\infty$
faster than $n$ (or even than any power $n^k$ for any $k$), as
$n\to\infty$, in other words, that $\lim_{n\to\infty} \frac{x^n}{n} =
\infty$ provided $x>1$, here is how to see it. You may replace the
discrete $n$ with a continuous variable $y$ and calculate the limit as
$y\to\infty$ with l'Hopital (remember that $y$, not $x$, it the
variable here):
$$
\lim_{y\to\infty} \frac{x^y}{y} = \rmk{\mbox{l'Hop.``}\infty/\infty\mbox{''}} 
\lim_{y\to\infty} 
\frac{x^y\,\ln x}{1} =+\infty 
$$
provided $x>1$.

Same for the limit in question here, namely
$$
\lim_{n\to\infty} \frac{x^{2n+1}}{n+1}=
\lim_{y\to\infty} \frac{x^{2y+1}}{y+1}=\rmk{\mbox{l'Hop}}
\lim_{y\to\infty} \frac{x^{2y+1}\,2\ln x}{1}=
+\infty>1
$$ 
provided $x>1$. 
\end{quote}

{\sf Note: No nice `formula' for the value of the series is
  available. However, foa all $x$ up to 1, very swift numerical
  evaluation giving many digits of precision out of just a few terms
  is feasible. }
 
(c) The ratio test gives
$$
\abs{\frac{a_{n+1}}{a_n}} = 
\abs{ \frac{(n+1)!^2 x^{n+1}\, (2n)!}{(2n+2)! \, n!^2 x^n} } =
\abs{x} \,\frac{(n+1)^2}{(2n+2)(2n+1)}
\qquad\mbox{ so }
\qquad
\lim_{n\to\infty}\abs{\frac{a_{n+1}}{a_n}} = \abs{x}\cdot\frac14
$$
So if $\abs {x}<4$ (or, while we only consider $x>0$, if $0<x<4$), the
limit in question is $<1$, and the series converges. 
On the other hand, if $\abs {x}>4$ (or, for now, if $x>4$), the limit
is $>1$ and the series diverges. 
In the borderline case $x=4$ (and later also $x=-4$), the ratio test
is inconclusive, and the problem allows to leave the question
unanswered in this case. 

{\bf Note: } See Problem 59 below, where we will decide the issue by
means of the result from Hwk.~52.

{\sf Note: Mathematica figures out that the value of this series is 
$\Dst\frac{4(\sqrt{4-x}+\sqrt{x}\arcsin(\sqrt{x}/2))}{(4-x)^{3/2}}$. 
I~could probably write up an explanation using only material yet to
be covered in class, explaining how this formula can be obtained, 
but it may well be a few pages, and I sure wouldn't want to make you study
it. }

\begin{quote}
\underline{\underline{\bf 54:}}
Apply the ratio and the root tests to the $p$-series
$\Dst\sum_{n=1}^\infty\frac{1}{n^p}$. Do you get a useful answer? 
\end{quote}

{\bf Solution: }
If $a_n= 1/n^p$, then $a_{n+1}/a_n = n^p/(n+1)^p =
(\frac{n}{n+1})^p$. 
So 
$$
\lim_{n\to\infty}\frac{a_{n+1}}{a_n} =
\lim_{n\to\infty}\Bigl(\frac{n}{n+1}\Bigr)^p =
\Bigl(\lim_{n\to\infty}\frac{n}{n+1}\Bigr)^p =
1^p = 1
$$ 
and the ratio test comes out inconclusive. 

For the root test, 
$$
\lim_{n\to\infty} \sqrt[n]{1/n^p} =
\lim_{n\to\infty} n^{-p/n} = 
\Bigl( \lim_{n\to\infty} n^{1/n}\Bigr)^{-p} = 1 ^{-p} = 1
$$
and the root test comes out inconclusive as well. 

\begin{quote}\small
If you have forgotten that $\lim_{n\to\infty} n^{1/n} = 1$, here is
how to see this (even for continuous $y$ instead of $n$):
$$
\lim_{y\to\infty} y^{1/y} = 
\lim_{y\to\infty} e^{\ln y \cdot 1/y} = 
e^{\Tst \lim_{y\to\infty} (\ln y)/y } = 
e^0 = 1
$$
where we have used that the exponential function is continuous, and
the limit in the exponent could be done by l'Hopital
``$\infty/\infty$''. 
\end{quote}
 
{\sf Lesson: $p$-series are all on the borderline where comparison
  with the geometric series, as wrapped up in root or ratio test, is
  inconclusive. }

\begin{quote}
\underline{\underline{\bf 55:}}
Recall from a prior problem that there are certain positive constants
$C_1$ and $C_2$ (namely $C_1=2.43$ and $C_2=2.62$ would work) such
that $C_1\sqrt{n} \,(\frac ne)^n < n! < C_2 \sqrt{n}\,(\frac ne)^n$. 
This will help you, as the question here is to decide the convergence
of $\sum\frac{x^n}{n!}$  by means of the {\em root\/} rather than the
ratio test. (For the time being, as we study series with positive
terms only, you may pretend $x>0$.) 
\end{quote}

{\bf Solution: }
$\sqrt[n]{(x^n/n!)} = x/\sqrt[n]{n!}$. 
So can we determine $\lim_{n\to\infty} \sqrt[n]{n!}$~?

Since $n! > C_1 (\frac ne)^n \sqrt{n}$, we conclude 
$\sqrt[n]{n!} > \sqrt[n]{C_1}\,(\frac ne) \sqrt{{\sqrt[n]{n}}}$. 
We know that $\sqrt[n]{C_1}\to 1$ as $n\to\infty$ and also
$\sqrt[n]{n}\to 1$ as $n\to\infty$. But the middle term $\frac ne$
goes to $\infty$ as $n\to\infty$. 
So we conclude, since the rhs goes to $\infty$, so does the (larger)
lhs. 

We have seen $\lim \sqrt[n]{n!} = \infty$, therefore $\lim
x/\sqrt[n]{n!} = 0$, and since this is less than 1, the root test
tells us the convergence of the series $\sum x^n/n!$. 

{\bf Note: }There is another, easier but sneaky, comparison reasoning
available that does not require to use problem \#52. Here is how it
goes (you weren't expected to invent it): 
Let's assume for convenience that $n$ is {\em even\/}. 
$$
\begin{array}{l}
n! = \underbrace{n (n-1) \ldots (\frac n2 +1)}_{%
\mbox{the 1st half of the}} \; \,\cdot 
\underbrace{\frac n2 \ldots 2\cdot 1}_{%
\mbox{the 2nd half}}
\\[5ex]
\kern3em \mbox{factors are all}\qquad\quad\mbox{of the factors}
\\
\kern3em \mbox{ $>\frac n2$. } \qquad \qquad \qquad \quad
\mbox{are all $\ge1$.}
\\[1ex]
\mbox{}\phantom{n!} \ge \quad (n/2)^{n/2} \;\;\cdot \;\; 1^{n/2}
\end{array}
$$
If $n$ is odd, the first half of the factors (rounded up, i.e.,
$\frac{n+1}{2}$ many) are still each $>\frac n2$, and we can conclude
similarly.

In either case we have $n!>(n/2)^{n/2}$ and therefore $\sqrt[n]{n!}>
(n/2)^{1/2}$, which is still good enough to conclude $\sqrt[n]{n!}
\to\infty$. 

\begin{quote}
\underline{\underline{\bf 56:}}
Does $\Dst\sum_{n=1}^\infty \frac{n^{1000}}{3^n}$ converge? Use ratio
test and root test.
\end{quote}

{\bf Solution: }
Ratio Test: $a_{n+1}/a_n = (\frac{n+1}{n})^{1000}\cdot
\frac{3^n}{3^{n+1}}$. So $\lim a_{n+1}/a_n = \frac13\lim
(\frac{n+1}{n})^{1000} = \frac13<1$. So the series converges.

Root test:  $\sqrt[n]{a_n} = (\sqrt[n]{n})^{1000} / 3$, so again $\lim
\sqrt[n]{a_n} = \frac13<1$. 



{\sf Note: The value of the series is a certain rational number that
  we could calculate in principle with Calc 2 methods, based on what
  we have yet to learn, like differentiating power series, 
  but carrying out the calculation would be tedious beyond
  measure. Mathematica gets the result in a few seconds and it turns out to be
  an integer in the ball park of $5\times 10^{2526}$. If you tried to
  decide convergence by computer, the first 900 or so terms in the sum
  would be getting bigger and bigger, and it is only after some 8000
  terms, that the individual terms would fall below 1 again. }


\begin{quote}
\underline{\underline{\bf 57a:}}
Consider the series $1 + \frac{2}{3} + \frac{1}{3^2} + \frac{2}{3^3} +
  \frac{1}{3^4}+\frac{2}{3^5} + \ldots$. The denominators are powers
  of~3, but the numerators alternate between 1 and 2. In $\sum$
  notation, you could write this as
$$
\sum_{n=0}^\infty \frac{(3-(-1)^n)/2}{3^n} 
\qquad \mbox{ or } \qquad
\sum_{n=0}^\infty \frac{(3-\cos(\pi n))/2}{3^n} 
\;.
$$
Show that the ratio test is inconclusive, but use either the root test
or direct comparison to decide on whether the series converges
\end{quote}

{\bf Solution: }
$a_{n+1}/a_n = \frac{(3-(-1)^{n+1})/2 \times 3^n}{3^{n+1}\times (3-(-1)^n)/2}
= \frac13\, \frac{3+(-1)^n}{3-(-1)^n}$. 

So if $n$ is even, $\frac{a_{n+1}}{a_n} = \frac23$, whereas for $n$
odd, $\frac{a_{n+1}}{a_n} = \frac16$. 
So $\lim\frac{a_{n+1}}{a_n}$ does not exist. 

However, $\sqrt[n]{a_n} = \sqrt[n]{3-(-1)^n} / 3$. 
Since $\sqrt[n]{2}\le \sqrt[n]{3-(-1)^n} \le \sqrt[n]{4}$ and both
ends have limit 1 as $n\to\infty$, the middle term also has limit 1 by
the squeeze therorem. 

So we conclude $\lim_{n\to\infty}\sqrt[n]{a_n} = \frac13$. The series
converges. 
--- Alternatively, $a_n\le \frac{2}{3^n}=:b_n$. So $\sum a_n$
converges since $\sum b_n$ does.  

{\sf\footnotesize Note: The value of the series is easy to find in this case. 
Assuming that the separate grouping of even and odd numbered terms is
legit' --it is--, we see 
$$
1 + \frac{2}{3} + \frac{1}{3^2} + \frac{2}{3^3} +
\frac{1}{3^4}+\frac{2}{3^5} + \ldots 
=
\left(1+ \frac{1}{3^2} + \frac1{3^4} + \ldots\right) + 
\left(\frac23 + \frac2{3^3} + \frac2{3^5}+\ldots\right) =
\frac{1}{1-\frac19} + \frac23\cdot \frac{1}{1-\frac19} =
\frac{15}{8}  
$$
where we have used our knowledge of the sum of the geometric series 
with $x=1/3^3$. 
}


\begin{quote}
\underline{\underline{\bf 58:}}
Consider $\Dst\sum_{n=2}^\infty \frac{1}{n(\ln n)}$. Does this series
converge or diverge? (Hint: Comparison with an integral is the way to go.) ---
Next decide $\Dst\sum_{n=2}^\infty \frac{1}{n(\ln n)^p}$ where $p>0$ is
any given real number. (The answer will depend on $p$.) {\sf[abridged text]}
\end{quote}

{\bf Solution: }
%
We first note that $f(x)=\frac1{x (\ln x)^p}$ is decreasing. The first
series is included as a special case $p=1$ in the second series. 

Using a left--endpoint Riemann sum (with $\Delta x=1$), the Riemann
sum is larger than the integral, so  
$\sum_{n=2}^N f(n) > \int_2^{N+1} f(x)\,dx$. This tells us if the
integral $\int_2^{\infty} f(x)\,dx$ diverges (goes to $\infty$), then
the (larger) sum $\sum_{n=2}^N f(n)$ also goes to $\infty$, i.e.,
diverges. 

On the other hand, the right--endpoint Riemann sum (with $\Delta x=1$)
is smaller than the integral, so 
$\sum_{n=2}^N f(n) < f(1) + \int_2^{N} f(x)\,dx$. 
This tells us if the
integral $\int_2^{\infty} f(x)\,dx$ converges (stays bounded), then
the (smaller) sum $\sum_{n=2}^\infty f(n)$ also converges (because the
partial sums increase and stay bounded). 

\begin{picture}(450,170)
\put(0,0){\special{psfile=hwk58fig.eps}}
\put(40,155){$\sum_{n=2}^N f(n)$ as left--endpoint} 
\put(80,140){Riemann sum}
\put(270,155){$\sum_{n=2}^N f(n)$ as right--endpoint} 
\put(310,140){Riemann sum}
\end{picture}

Now let's decide when the improper integral converges, and when it
diverges:

$$
\int_2^\infty \frac{dx}{x\,(\ln x)^p} = \rmk{\ln x = u\,;\;
  \frac{dx}{x}=du}
\int_{\ln 2}^\infty \frac{du}{u^p}
$$
We know this integral converges if $p>1$ and diverges if $p\le 1$. 
%
Therefore $\sum_{n=2}^\infty \frac{1}{n(\ln n)^p}$ converges if
$p>1$ and diverges if $p\le 1$. 


\begin{quote}
\underline{\underline{\bf 59:}} 
(In continuation of \#53c:)
Use the result from Hwk~\#52 (requoted in \#55), together with an
appropriate comparison, to decide whether the series
$\sum_{n=0}^\infty \frac{4^n\,n!^2}{(2n)!}$ converges or
diverges. 
\end{quote}

{\bf Solution: }
We use the inequality 
$$
C_1 \sqrt{n}\Bigl(\frac ne\Bigr)^n 
\le n! \le 
C_2 \sqrt{n}\Bigl(\frac ne\Bigr)^n 
$$
to find $b_n$ and $c_n$ bounding $a_n= \frac{4^n n!^2}{(2n)!}$ from
both sides. The $b_n$ and $c_n$ will be in simpler terms (no
factorials), so we will be able to calculate more precisely `how big
or small' the $a_n$ actually are. 
Namely
$$
\overbrace{\rule{0pt}{4.5ex}
4^n (C_1\sqrt{n})^2 \Bigl(\frac ne\Bigr)^{2n} \frac{1}{C_2
  \sqrt{2n}} \, \Bigl(\frac e{2n}\Bigr)^{2n}}^{\Tst=:b_n}
\le \overbrace{\rule{0pt}{4.5ex} \frac{4^n n!^2}{(2n)!}}^{\Tst=a_n} \le 
\overbrace{\rule{0pt}{4.5ex}
4^n (C_2\sqrt{n})^2 \Bigl(\frac ne\Bigr)^{2n} \frac{1}{C_1
  \sqrt{2n}} \, \Bigl(\frac e{2n}\Bigr)^{2n}}^{\Tst=:c_n}
$$
(Note that, to get a $c_n$ bigger than $a_n$, we had to use the bigger
term with $C_2$ for the factorials in the numerator, but the smaller
term with $C_1$ for the factorial in the denominator.)

Cancelling the $n^{2n}$, the $e^{2n}$ and $4^n/2^{2n}$, we have 
$$
b_n = \frac{C_1^2}{\sqrt{2}C_2}\, \sqrt{n}
\qquad \mbox{ and } \qquad
c_n = \frac{C_2^2}{\sqrt{2}C_1}\, \sqrt{n}
$$
It transpires now that it is the $b_n$ that is useful. Since $b_n$
does not have limit 0 (actually $b_n\to\infty$), we know that $\sum
b_n$ diverges. Therefore $\sum a_n$ diverges as well since $a_n\ge
b_n$. 

\begin{quote}
\underline{\underline{\bf 60:}} 
We have seen how the ratio test can be used to show that
$1-\frac{x^2}{2!}+\frac{x^4}{4!} -\frac{x^6}{6!} +-\ldots =
\sum_{n=0}^\infty (-1)^n \frac{x^{2n}}{(2n)!}$ converges absolutely for
every~$x$ (cf.~\#53a), and we have seen that the value of this series 
cannot be anything else but $\cos x$ because partial sums are
alternatingly above and below $\cos x$  (cf.~\#26). 

(a) Explain why
Leibniz' alternating series test applies to this series for $x=1$, but
does not apply to it for $x=2$. 
\\
(b) For which $x$ exactly does the alternating series test apply to the
cosine series?
\end{quote}
{\bf Solution: }
(a) We confirm the three properties needed for the Leibniz test to
apply: $a_n= 1/(2n)!$ goes to 0 as $n\to\infty$, the signs are
alternating between $+$ and $-$, and $a_n$ is decreasing.
In contrast, for $a_n= 2^(2n)/(2n)!$, the property  `decreasing'
fails, namely $a_0=1 < 2^2/2! = a_1$.

Note however, that  we can apply the Leibniz test to a {\em `tail'\/}
of the series rather than the entire series:  $a_{n+1}\le a_n$ means
$x^{2n+2}/(2n+2)! \le x^{2n} /(2n)!$, or equivalently 
$x^2 \le (2n+2)(2n+1)$. This {\em is\/} fulfilled, when $n$ is large
(how large depends on $x$; for $x=2$, we can take $n\ge1$; for $x=10$,
we could certainly handle $n\ge 5$). So since the full series
converges if some tail converges, we can apply Leibniz' test with this
minor modification. 

(b) We need $x^2\le (2n+2)(2n+1)$ for all $n$, beginning at
$n=0$. The narrowest constraint is given by $n=0$. So we need $x^2\le
2$, or $\abs{x}\le\sqrt2$. 

{\bf Comment: } {\sf A nice feature of the alternating series test is that it
helps us control the error when we use the series for practical
calculation. The exact value of the series is always between two
successive partial sums. For the sine and cosine series, we have this
property always (because of the way how we found the series by
successively integrating inequalities), and we do not need to rely on
the alternating series test to get this property. }

\begin{quote}
\underline{\underline{\bf 61:}} 
Based on the knowledge that $e^x= \sum_{n=0}^\infty
  \frac{x^n}{n!}$, write a series for $e^{-x}$ and then conclude that
  the series in \#53a converges to $\cosh x$. {\sl Hint: Write out the
    sums with the `\ldots' notation rather than manipulating
    expressions involving $\sum_{n=0}^\infty$, as you may lack the
    experience to do the manipulation of $\sum_{n=0}^\infty$
    expressions correctly/expediently.}
\end{quote}
{\bf Solution: }
We start with 
$$
e^x = 1 + x + \frac{x^2}{2!} + \frac{x^3}{3!} + \frac{x^4}{4!} +
\frac{x^5}{5!} + \frac{x^6}{6!} + \frac{x^7}{7!} + \ldots
$$
Replacing $x$ with $-x$, we get also
$$
e^{-x} = 1 - x + \frac{x^2}{2!} - \frac{x^3}{3!} + \frac{x^4}{4!} -
\frac{x^5}{5!} + \frac{x^6}{6!} - \frac{x^7}{7!} +- \ldots
$$
Adding the two series term by term and dividing by 2, we get 
$$
\mbox{}\kern-3.3em
\frac{e^x+e^{-x}}{2} = 
1 \;\quad+\quad \frac{x^2}{2!} \;\quad+\quad \frac{x^4}{4!} \;\quad+\quad
\frac{x^6}{6!} \;\quad+\quad \ldots
$$
The left hand side is $\cosh x$.

{\bf Note: }{\sf The reason why it is a bit more difficult to use the sum
notation is that when adding $e^x \sum_{n=0}^\infty \frac{x^n}{n!}$
and $e^{-x} \sum_{n=0}^\infty (-1)^n\frac{x^n}{n!}$ and dividing by 2,
we get 
$\frac{e^x+e^{-x}}{2} = \sum_{n=0}^\infty \frac{1+(-1)^n}{2}
\,\frac{x^n}{n!}$, and all the odd $n$ give us explicit 0 terms, which
are of course skipped in the final version, and the remaining nonzero
terms get renumbered. So the $n$ in the exponential series is  not
the $n$ in the cosh series; it takes a bit of practice to see and do 
this renumbering correctly in the $\sum_n$ notation, whereas the same
renumbering is quite obvious when the sums are written out.
}



\begin{quote}
\underline{\underline{\bf 62:}} 
(a) What is the radius of convergence of the power series
$\sum_{n=0}^\infty (-1)^n \frac{x^{2n}}{4^n\,n!^2}$~?
\\
(b) The series defines a function $J(x):= \sum_{n=0}^\infty (-1)^n
\frac{x^{2n}}{4^n\,n!^2}$. Since you won't be able to find a formula
for the value of the series, you know practically nothing about this
function. Calculate $J(1)$ with to 3 decimals accuracy. How many terms
did you need? How many terms would you need to calculate $J(2)$ with 3
decimals accuracy? 
Calculate $J(0)$, $J'(0)$, $J''(0)$, $J'''(0)$ and $J^{(4)}(0)$ exactly. 
\end{quote}
{\bf Solution: }
(a) Using the ratio test, with $a_n=(-1)^nx^{2n}/(4^n n!^2)$, 
we have 
$$
\abs{a_{n+1}/a_n} = \frac{x^{2n+2}\,4^n\,n!^2}{x^{2n} 4^{n+1}
  (n+1)!^2} = \frac{x^2}{4(n+1)^2}
\;.
$$
So $\lim_{n\to\infty} \abs{a_{n+1}/a_n} = 0$ for every~$x$; i.e., the
radius of convergence is $\infty$. 

(b) For $x=1$, the alternating series test applies to the full series,
and this is convenient, because the exact value is between two
successive partial sums. Taking three/four terms ($n=0,1,2,(3)$), we get 
$ 1 - \frac1{4} + \frac{1}{64} - \frac{1}{2304} 
< J(1) < 1 - \frac1{4} + \frac{1}{64}$. 
In decimals, $ 0.765191 < J(1) < 0.765625$. So $J(1) = 0.765\ldots$
from four terms. (We need to consider a 5th term, $n=4$, to see that a
rounding to 3 decimals will maintain, rather than round up, the 3rd
digit 5.)
For $x=2$ we need 6 terms ($n=0$ to $n=5$) to get 3 digits, since the
terms in the sum are (rounded to 6 decimals)
$$
1 - 1 + 0.25 - 0.027778 + 0.001736 - 0.000069\ldots
$$

Now the calculation of $J$ and all its derivatives {\bf at 0} is a
finite calculation in each case:
$$
\begin{array}{ll} \Dst
J(x) = 1 - \frac{x^2}{4} + \frac{x^4}{64} - \frac{x^6}{2306} +-\ldots 
& \quad \mbox{ Therefore \ } J(0)=1
\\[2ex]\Dst
J'(x) =\;\;  - \frac{2x}{4} + \frac{4x^3}{64} - \frac{6x^5}{2306} +-\ldots 
& \quad \mbox{ Therefore \ } J'(0)=0
\\[2ex]\Dst
J''(x) =\;\; - \frac{2}{4} + \frac{12x^2}{64} - \frac{30x^4}{2306} +-\ldots 
& \quad \mbox{ Therefore \ } J''(0)=-\frac12
\\[2ex]\Dst
J'''(x) =  \qquad\quad\frac{24x}{64} - \frac{120x^3}{2306} +-\ldots 
& \quad \mbox{ Therefore \ } J'''(0)=0
\\[2ex]\Dst
J^{(4)}(x) = \qquad\quad\frac{24}{64} - \frac{360x^2}{2306} +-\ldots 
& \quad \mbox{ Therefore \ } J^{(4)}(0)=\frac38
\end{array}
$$


\begin{quote}
\underline{\underline{\bf 63:}} 
Using the geometric series $\frac{1}{1-t} = 1 + t + t^2 + t^3 + \ldots =
\sum_{n=0}^\infty t^n$ and the substitution $t=-x^2$ to find a power
series representation for $\frac{1}{1+x^2}$. 
Integrate it to obtain a power series representation of $\arctan x$. 
What is the radius of convergence of the obtained series? 
%
(In each step, write the power series both in a `\ldots' form giving enough
terms to see the general pattern and using the $\sum$ notation.)

Substitute $x=1$ into the arctan series (believing me that doing so is
permissible). Obtain a beautiful but useless series representing
$\pi$. How many terms would you need to calculate in order to obtain
$\pi$ up to an accuracy of $10^{-4}$ by this series? 

Calculate $\arctan \frac15$ to 5 decimals using this series. (Of course
in doing so you pretend your pocket calculator does not know arctan.)
How many terms do you need to do this?

Also calculate $\arctan\frac1{239}$ to 5 decimals. How many terms do
you have to use for this purpose? [We'll later see why, of all crazy
  numbers, I would specifically care for $1/239$.] 
\end{quote}
{\bf Solution: }
We first have the series, for $\abs{x}<1$: 
$$
\frac{1}{1+x^2} = 1 - x^2 + x^4 - x^6 + x^8 -+ \ldots =
\sum_{n=0}^\infty (-1)^n x^{2n}
$$
Integrating from $x=0$ to $x=y$, we get
$$
\arctan y = y - \frac{y^3}{3} + \frac{y^5}{5} -
\frac{y^7}{7} + \frac{y^9}{9} -+ \ldots = \sum_{n=0}^\infty (-1)^n
\frac{y^{2n+1}}{2n+1} 
$$
which is again (initially) true for $\abs{y}<1$. As it transpires, by
the alternating series test, the new series is also convergent for
$y=\pm1$. But the series is still divergent when $\abs{y}>1$. 
The radius of convergence is again 1. 

Of course we can now change the variable back to $x$; we had just
temporarily switched it to a avoid a name 
conflict between the variable of integration and the upperlimit of
integration. 

By plugging in $x=1$ (and then multiplying by 4) we get
$$
\pi = 4\arctan 1 = 4\left(1 - \frac13 + \frac15 - \frac17 + \frac19
-+\ldots\right) = \sum_{n=0}^\infty (-1)^n \frac{4}{2n+1}
$$
The series is practically useless, because we'd need some 20000 terms
until the denominator $2n+1$ becomes about 40000, i.e., the terms
about $10^{4}$. 

Calculating up to exponent $2n+1=5$ (three terms), 
we get
$\arctan\frac15 = \frac15-\frac13 (\frac15)^3 + \frac15(\frac15)^5
-+\ldots
\approx 0.200000 - 0.002667 + 0.000064 = \underline{0.19739}7
$, where the error is no bigger than the 1st skipped term (which is
less than 1/25th of the last calculated term), so the five underlined 
decimals are actually valid. 

To calculate $\arctan 1/239$, note that the 2nd term ($2n+1=3$) is
already smaller than $1/(3\cdot 200^3)= 1/(24\cdot10^6) < 10^{-7}$. So
only the first term suffices to give us $\arctan \frac1{239}$ with 6
decimals accuracy. 
$\arctan \frac1{239} = 0.004184$. 

{\bf Background: } Diligent use of trig identities allows to show that 
$\arctan 1 = 4\arctan\frac15 - \arctan\frac1{239}$. 
%
So, with the few simple calculations done here, we have found 
$\frac\pi 4 \approx 0.78538$ (maybe the last digit is not reliable any
more), and conclusively getting $\pi$ with 4 to 5 digits accuracy. (I
could have been a bit more detailed by giving precise error margins
rather than merely counting how many digits are reliable.) All
calculations involved, including the long divisions, could have been
done by hand on one page. 

\begin{quote}
\underline{\underline{\bf 64:}} 
Write down the power series representing $\ln(1+x)$ and $-\ln(1-x)$
respectively (obtained by integrating a geometric series.) What is the
radius of convergence?

Obtain a power series for $\ln \frac{1+x}{1-x}$ from the preceding
two. Which is the radius of convergence for each of these series? 

Use the series for $\ln (1+x)$ and the one for $\ln\frac{1+x}{1-x}$, each with
a specific choice of $x$, to obtain a series with value $\ln 2$. 
[You need to take my word for it that the choice of $x$ in the first
  series is actually permissible.]

One of the two series is almost useless for practical calculation of
$\ln 2$, because it would take way too many terms for decent precision. 
In the other one, roughly how many terms do you estimate you'd have to
calculate to get 5 digits precision for $\ln 2$~?
\end{quote}

{\bf Solution: }
From
$$
\frac{1}{1-t} = 1 + t + t^2 + t^3 + t^4 + t^5 + \ldots =
\sum_{n=0}^\infty t^n
$$
we obtain by integration $\int_0^x\ldots\,dt$ that 
$$
-\ln(1-x) = x + \frac{x^2}{2} + \frac{x^3}{3} + \frac{x^4}{4} +
\frac{x^5}{5} + \frac{x^6}{6} + \ldots = \sum_{n=1}^\infty \frac{x^n}{n}
$$
where the series converges guaranteed for $\abs{x}<1$;  it transpires by using the
alternating series test that the series also converges for $x=-1$ (but
not for $x=1$). 
Replacing $x$ with $-x$, and multiplying by $-1$, also obtains
$$
\ln(1+x) = x - \frac{x^2}{2} + \frac{x^3}{3} - \frac{x^4}{4} +
\frac{x^5}{5} - \frac{x^6}{6} +- \ldots = \sum_{n=1}^\infty (-1)^{n+1}
\frac{x^n}{n}
$$
Adding the two series yields
$$
\ln\frac{1+x}{1-x} = 2x + \frac{2x^3}{3} + \frac{2x^5}{5} + \ldots
= 
2\sum_{n=0}^\infty \frac{x^{2n+1}}{2n+1}
$$

Plugging $x=1$ (permissible by Abel's limit theorem mentioned in
class) into the series for $\ln(1+x)$,  we obtain
$$
\ln 2 = 1 - \frac12 + \frac13 - \frac14 + \frac15 -+\ldots =
\sum_{n=1}^\infty (-1)^{n-1} \frac{1}{n}
$$
(beautiful but useless, just like the series for $\frac{\pi}{4}$ in
\#63). To get $\ln 2$ from the series for $\ln\frac{1+x}{1-x}$, we set
$x=\frac13$. 

Let's see: $(\frac13)^{\mbox{\small what power?}}$ is in/below the ballpark of
$10^{-5}$? With $3^2$ a bit short of 10, we estimate that $3^{10}$ is
a bit short of $10^5$, so $1/3^{11}$ should be below $10^{-5}$
already. $2n+1=11$ when $n=5$, so we expect six terms $n=0,1,2,3,4,5$
to be needed for the desired precision. (The extra denominator $2n+1$
makes reality a tad friendlier than the given estimate.)


\begin{quote}
\underline{\underline{\bf 65:}} 
By multiplying the corresponding power series, obtain a power series
representing $e^x\,\sin x$. In doing so calculate all powers up to
$x^7$; you are not expected to see a general formula for the $n$th
coefficient, and so you will not be able to use the $\sum$ notation; 
just calculate the first few terms in the series as indicated. 
\end{quote}
{\bf Solution: }
$$
%\quad
e^x = 1 + x + \frac{x^2}{2!} + \frac{x^3}{3!} + \frac{x^4}{4!} +
\frac{x^5}{5!} + \frac{x^6}{6!} + \frac{x^7}{7!} + \ldots
$$
$$
\sin x =  \;\;\quad x \;\quad-\;\quad  \frac{x^3}{3!} \;\quad+\;\quad
\frac{x^5}{5!} \;\quad-\;\quad  \frac{x^7}{7!} +- \ldots
$$
Therefore 
$$\begin{array}{l}\Dst
e^x\sin x = 
x + x^2 + \left(-\frac{1}{3!} + \frac{1}{2!}\right) x^3 
+ \left( -\frac{1}{3!} + \frac{1}{3!} \right) x^4
+ \left( \frac{1}{5!} -\frac{1}{2!\,3!} + \frac{1}{4!} \right) x^5
+\mbox{}
\\[2ex]\Dst\kern4.8em\mbox{} 
+ \left( \frac{1}{5!} -\frac{1}{3!\,3!} + \frac{1}{5!} \right) x^6
+ \left( -\frac{1}{7!} + \frac{1}{2!\,5!} - \frac{1}{4!\,3!} +
  \frac{1}{6!} \right) x^7 
+ \ldots
\\[2ex]\Dst \phantom{e^x \sin x}
= x+x^2 +\frac13 x^3 + 0x^4 - \frac1{30} x^5 -\frac1{90}x^6
-\frac1{630} x^7 + \ldots
\end{array}
$$

{\bf Note: } It {\em is\/} possible to get a formula for the $n^{\rm
  th}$ coefficient, but I wouldn't expect you to have seen this at this
time. The reason is that $e^x \sin x = \frac1{2i}(e^{(1+i)x} -
e^{(1-i)x})$. So the coefficient of $x^n$ is
$\frac{((1+i)^n-(1-i)^n)/(2i)}{n!}$. 

Using that $1\pm i = \sqrt{2} e^{\pm i\pi/4}$, we can write the
$n^{\rm th}$ coefficient as $\frac{2^{n/2}\sin(n\pi/4)}{n!}$. 


\begin{quote}
\underline{\underline{\bf 66:}} 
Write down power series for $1+\ln(1+2x)$ and $1+\ln(1+x)$ up to the
$x^4$ term. By long division, obtain a power series for 
$\Dst\frac{1+\ln(1+2x)}{1+\ln(1+x)}$, also up to the 4th term. 
\end{quote}
{\bf Solution: }
$$
\begin{array}{l}\Dst
1+\ln(1+2x) = 1 + 2x - \frac{(2x)^2}{2} + \frac{(2x)^3}{3} -
\frac{(2x)^4}{4} +-\ldots 
\\[2ex]\Dst
\; 1+\ln(1+x) =  1 \;+\; x \;\;-\;\; \frac{x^2}{2} \;\;+\;\; 
\frac{x^3}{3} \;\;-\;\; \frac{x^4}{4} +-\ldots
\end{array}
$$

Now for the long division:
$$
\begin{array}{rl}\Dst
&\Dst \kern1em 1 \,+\, x -\frac52 x^2 + \frac{16}{3} x^3
-\frac{32}3 x^4 \ldots
\\[2ex]\Dst
1 + x - \frac{x^2}{2} + \frac{x^3}{3} - \frac{x^4}{4} \ldots &\Dst
\left) \kern-0.7em
\overline{\kern0.7em
1+2x-2x^2+\frac83x^3-4x^4\ldots\rule{0pt}{3.7ex}
}
\right.
\\
&\Dst \kern0.8em
1 \,+\, x \,-\, \frac{x^2}{2} \,+\, 
\frac{x^3}{3} \,-\, \frac{x^4}{4} \ldots
\\& \rule[1ex]{13em}{0.5pt}
\\&\Dst
\kern3em 
x - \frac32x^2 + \frac73 x^3 -\frac{15}{4}x^4 \ldots
\\[2.5ex]&\Dst \kern3em
x\,+\,x^2\,-\,\frac{x^3}{2} \;\,+\,\; \frac{x^4}{3} \;\ldots
\\&\kern2.5em\rule[1ex]{11.5em}{0.5pt}
\\&\Dst \kern4em
-\frac52x^2 + \frac{17}{6}x^3 - \frac{49}{12}x^4 \ldots
\\[2.5ex]&\Dst\kern4em
 -\frac52x^2 -\frac52 x^3 \;+\; \frac54 x^4 \ldots
\\&\kern4em\rule[1ex]{10em}{0.5pt}
\\&\Dst\kern7.5em \frac{16}{3}x^3 - \frac{16}{3} x^4 \ldots
\\[2.5ex]&\Dst \kern7.5em
\frac{16}{3}x^3 + \frac{16}{3} x^4 \ldots
\\&\Dst \kern7.5em\rule[1ex]{7em}{0.5pt}
\\&\Dst\kern10em -\frac{32}{3} x^4 \ldots
\end{array}
$$

\bigskip

\begin{quote}
\underline{\underline{\bf 67:}} 
It is possible to obtain the well-known formula $e^x\,e^y = e^{x+y}$
directly by multiplying the power series, without using any prior
knowledge about the exponential function. By multiplying 
the power series $1+x+\frac{x^2}{2!}+\frac{x^3}{3!} +
\frac{x^4}{4!}+\ldots$ with the series $1+y+\frac{y^2}{2!}+\frac{y^3}{3!} +
\frac{y^4}{4!}+\ldots$ and applying the binomial formula, verify that
the product is indeed 
$1+(x+y)+\frac{(x+y)^2}{2!}+\frac{(x+y)^3}{3!} +
\frac{(x+y)^4}{4!}+\ldots$, at least up to power 4. 
\end{quote}
{\bf Solution: }
$$
\begin{array}{l}\Dst
\left(1+x+\frac{x^2}{2!}+\frac{x^3}{3!} +
\frac{x^4}{4!}+\ldots\right)
\left(
1+y+\frac{y^2}{2!}+\frac{y^3}{3!} +
\frac{y^4}{4!}+\ldots
\right)
=\mbox{} 
\\[2ex]\Dst\kern3em\mbox{}=
1 + (x+y) + \Bigl( \frac{x^2}{2!} + xy + \frac{y^2}{2!} \Bigr) 
+ \Bigl( \frac{x^3}{3!} + \frac{x^2}{2!}y +
x\frac{y^2}{2!}+\frac{y^3}{3!} \Bigr)  
\\[2ex]\Dst\kern5em\mbox{}
+ \Bigl( \frac{x^4}{4!} + \frac{x^3}{3!}y +
\frac{x^2}{2!}\frac{y^2}{2!}+x\frac{y^3}{3!} + \frac{y^4}{4!}\Bigr)  
+ \ldots
\\[2ex]\Dst\kern3em\mbox{}=
1 + (x+y) + \frac{x^2+2xy+y^2}{2!}
+ \frac{x^3+3x^2y+3xy^2+y^3}{3!}   
\\[2ex]\Dst\kern5em\mbox{}
+ \frac{x^4+4x^3y+6x^2y^2+4xy^3+y^4}{4!}  
+ \ldots
\\[2ex]\Dst\kern3em\mbox{}=
1 + (x+y) + \frac{(x+y)^2}{2!} + \frac{(x+y)^3}{3!} + 
\frac{(x+y)^4}{4!} +   \ldots
\end{array}
$$


{\bf Note: }
The general $n^{\rm th}$ power term is 
$$
\sum_{k=0}^n \frac{x^{n-k}}{(n-k)!}\,\frac{y^k}{k!} 
=
\frac{1}{n!} \sum_{k=0}^n \frac{n!}{k!\,(n-k)!} x^{n-k} y^k
$$
If you know the general binomial theorem in the form 
$\Dst(x+y)^n = \sum_{k=0}^n \frac{n!}{k! (n-k)!} x^k y^{n-k}$ (but you
weren't expected to know it), you see
that  the analogous calculation applies for {\em all\/} terms, not just up
  to the 4th power. 

\bigskip

\begin{quote}
\underline{\underline{\bf 68:}} 
Recalling the power series of $\sin x$, and of $\cos y$, plug  the
series of $\sin x$ for $y$ into the series for $\cos y$, calculating
terms up to order $x^6$. This way you will obtain the beginning of the
power series of $\cos(\sin x)$. 
\end{quote}
{\bf Solution: }
$$
\cos y = 1 - \frac{y^2}{2!} + \frac{y^4}{4!} - \frac{y^6}{6!} +\ldots
$$
$$
y=\sin x = x - \frac{x^3}{3!} + \frac{x^5}{5!} -+\ldots
$$
So we conclude {\small
$$
\cos(\sin x) = 
1 - \frac1{2!}\left( x - \frac{x^3}{3!} + \frac{x^5}{5!} \ldots
\right)^2 
+ \frac1{4!} \left(
x - \frac{x^3}{3!} + \frac{x^5}{5!} \ldots \right)^4 
- \frac1{6!} \left(
x - \frac{x^3}{3!} + \frac{x^5}{5!} \ldots \right)^6 
+ \ldots
$$
}
Let's look at these term before calculating: 
The power series to the 4th power, once expanded, will start with
$x^4$, and the $\frac{x^5}{5!}$ term will not even be needed any more,
because the lowest order it contributes to will be
(some number times) $x^3\,\frac{x^5}{5!}$, but we only calculate up to
order $x^6$. 
The power series to the 6th power starts with $x^6$, and that's
already all the terms we maintain. 

So we calculate
$$
\left( x - \frac{x^3}{3!} + \frac{x^5}{5!} \ldots
\right)^2 = x^2 -2\frac{x^4}{3!} + \left(\frac{2}{5!}+\frac{1}{3!^2}
\right) x^6 + 
\ldots = x^2 - \frac{x^4}{3} + \frac{2}{45}x^6\ldots
$$
$$
\left( x - \frac{x^3}{3!} + \frac{x^5}{5!} \ldots
\right)^4 = \left( x^2 - \frac{x^4}{3} + \frac{2}{45}x^6\ldots
\right)^2 =
x^4 - \frac23 x^6 + \ldots \kern5.5em
$$
$$
\left( x - \frac{x^3}{3!} + \frac{x^5}{5!} \ldots
\right)^6 = x^6 + \ldots\kern20em
$$
Therefore 
$$
\begin{array}{l}\Dst
\cos(\sin x) = 1 - \frac12\left(
 x^2 - \frac{x^4}{3} + \frac{2}{45}x^6\ldots
\right) 
+ \frac1{24}\left(
x^4 - \frac23 x^6 + \ldots \
\right) - \frac1{720} x^6 + \ldots
\\[2ex]\Dst
\phantom{\cos(\sin x)} = 
1-\frac12x^2 +\frac5{24}x^4 - \frac{37}{720}x^6 \ldots
\end{array}
$$

\bigskip

\begin{quote}
\underline{\underline{\bf 69:}} 
Calculating the first five derivatives of $\tan x$ and using Taylor's
formula, find the first 3 nonvanishing terms (i.e., up to order $x^5$)
for the Taylor series of $\tan x$, and compare it with the series
obtained in class by long division. {\sl Hint: It's probably more
  convenient for successive derivatives if you write the derivative 
  of $\tan x$ as $1+\tan^2 x$ rather  than $1/\cos^2 x$.}
\end{quote}
{\bf Solution: }
$$
\begin{array}{l}
\frac{d}{dx} \tan x = 1+\tan^2x
\\[1ex]
\frac{d^2}{dx^2}\tan x = 2\tan x(1+\tan^2x) = 2\tan x+ 2\tan^3x
\\[1ex]
\frac{d^3}{dx^3}\tan x = (2+ 6\tan^2x)(1+\tan^2x) = 2 + 8\tan^2x +
6\tan^4 x 
\\[1ex]
\frac{d^4}{dx^4}\tan x = (16\tan x+ 24\tan^3x)(1+\tan^2x) = 
16\tan x + 40\tan^3x + 24\tan^5x
\\[1ex]
\frac{d^5}{dx^5}\tan x = (16+120\tan^2x+120\tan^4x)(1+\tan^2x) =
16+136\tan^2x+240\tan^4x + 120\tan^6x
\end{array}
$$
Plugging in $x=0$, we find:
$$
\begin{array}{l}
\tan x \bigm|_{x=0} = 0
\\[1ex]
\frac{d}{dx} \tan x \bigm|_{x=0} = 1
\\[1ex]
\frac{d^2}{dx^2}\tan x \bigm|_{x=0} = 0
\\[1ex]
\frac{d^3}{dx^3}\tan x \bigm|_{x=0} = 2
\\[1ex]
\frac{d^4}{dx^4}\tan x \bigm|_{x=0} = 0
\\[1ex]
\frac{d^5}{dx^5}\tan x \bigm|_{x=0} = 16
\end{array}
$$
The Taylor series for $\tan x$ is therefore
$$
0 + 1\cdot \frac{x}{1!} + 0\cdot \frac{x^2}{2!} + 
 2\cdot \frac{x^3}{3!} +  0\cdot \frac{x^4}{4!} + 
16 \cdot \frac{x^5}{5!} + \ldots
= x + \frac{x^3}{3} + \frac{2x^5}{15}+\ldots
$$
Without a general formula for the $n^{\rm th}$ term we find it 
practically impossible to prove that the series converges (and for which
$x$), let alone to infer that its value is indeed $\tan x$. 


\begin{quote}
\underline{\underline{\bf 70:}} 
The nice features of term-by-term differentiation being allowed for
power series do not carry over to other series. 
For instance $f(x):= \sum_{n=1}^\infty \frac{\cos n x}{n^2}$ is a
useful series that is {\em not\/} a power series.

(a) Show by a direct comparison test, that this series converges
absolutely for every real~$x$.

(b) Attempt to take a second derivative via term-by-term
differentiation (twice). What series do you get as a result? Does it
converge for any~$x$~? (A somewhat heuristic answer is acceptable
here, even if it is not logically watertight.)
\end{quote}
{\bf Solution: }
(a) Since $\abs{\frac{\cos nx}{n^2}} \le \frac{1}{n^2}$ and
$\sum\frac1{n^2}$ converges (p-series with $p>1$), we conclude that
$\sum\frac{\cos nx}{n^2}$ also converges. 

(b) If we take two derivatives of this series term by term, we obtain
formally $\sum_{n=1}^\infty (-\cos nx)$. For typical $x$, we expect
$\cos nx$ {\em not to converge at all\/} as $n\to \infty$ (because it
oscillates between $-1$ and 1). In particular, $\cos n x$ does not
converge to 0, as would be required for the series to converge. 

For some specific $x$ (say, $x=0$), the {\em sequence\/} $\cos nx$ does
converge (namely to~1), but again this implies divergence of the {\em
  series\/}. 

So it looks like the two term-by-term differentiations have destroyed
all convergence of the series, which is what was promised {\em not to
  happen for power series.\/} Of course the series in this problem is
{\em not\/} a power series. 

{\bf Note: } Here is a logically rigorous argument that indeed there
is no~$x$ for which $\cos nx\to0$ as $n\to\infty$. (You were not
expected to come up with this on your own.)

If there were indeed an $x$ for which $\lim_{n\to\infty}\cos nx=0$, 
then we would also have \\
$\lim_{n\to\infty} \cos(n+1)x=0$ (since, when
$n\to\infty$, then $n+1$  also goes to $\infty$). 

All $\lim$ will mean $\lim_{n\to\infty}$ in the following. 

From 
$\lim (\cos n x \cos x - \sin nx \sin x) = 0$ and $\lim \cos nx = 0$,
we conclude $\lim\sin nx \sin x = 0$. So either $\sin x = 0$, or else
$\lim \sin nx=0$. 

But both possibilities run into a contradiction: 
If $\lim \sin nx = 0$ (and as assumed $\lim\cos nx=0$ as well) then 
$\lim(\sin^2 nx + \cos^2nx) = 0^2 + 0^2 = 0$, which cannot be true
since $\sin^2 nx + \cos^2nx=1$. 
However, if $\sin x=0$, then $x$ is a multiple of $\pi$, and so $nx$
is a multiple of $\pi$ as well, and then $\cos nx$ is either $+1$ or
$-1$. Again $\lim\cos nx = 0$ is an impossibility. 

{\bf Note: }
You have no tools at this level to guess the value $f(x)$ of this
  sum. Senior level mathematics would tell you that actually 
$f(x) = \frac{\pi^2}{6}-\frac\pi2\abs{x} + \frac14x^2$ 
for $\abs{x}\le\pi$. In particular $f$ is not differentiable at
$x=0$ because of the absolute value term. However, this $f$ is
arbitrarily often differentiable for all other 
$x$ between $-\pi$ and $\pi$; but its derivatives cannot be calculated
by differentiating the series term-by-term as if it were a finite
sum. --- How nice it is that for power series we do not need to
concern ourselves with such troublesome possibilities (except possibly
on the boundary of the interval / disc of convergence)!


\begin{quote}
\underline{\underline{\bf 71:}}
Here, you'll find the value of $\sum_{n=0}^\infty \frac{n^2}{2^n}$. It
is done by first aiming to find the value of $\sum_{n=0}^\infty n^2
x^n$ and then setting $x=\frac12$. Here is how: \\
(a) Write down the value of $f(x):= \sum_{n=0}^\infty x^n$.\\
(b) Calculate $xf'(x)$ both as formula and as series.\\
(c) Calculate $x(xf'(x))'$, both as formula and series.\\
(d) Conclude the value of $\sum_{n=0}^\infty \frac{n^2}{2^n}$.
\end{quote}
{\bf Solution: }
The geometric series is well-known: 
$$
\sum_{n=0}^\infty x^n = 1+x+x^2+x^3+x^4+x^5+\ldots = \frac1{1-x}
\qquad \mbox{(for $\abs{x}<1$)}
\leqno (a)
$$
Differentiating and multiplying with $x$ yields
$$
\sum_{n=0}^\infty n x^n = x+2x^2+3x^3+4x^4+\ldots = x \frac{d}{dx}\,\frac1{1-x}
= \frac x{(1-x)^2}
\leqno(b)
$$
Differentiating and multiplying with $x$ again yields
$$
\sum_{n=0}^\infty n^2 x^n = x+4x^2+9x^3+\ldots = 
x \frac{d}{dx}\,\frac{x}{(1-x)^2}  
= x \frac{(1-x)^2 - x\,2(1-x)(-1)}{(1-x)^4} = \frac{x+x^2}{(1-x)^3}
\leqno(c)
$$
Both (b) and (c) are valid for $\abs{x}<1$, because the radius of
convergence is inherited from (a) under differentiation.

(d) With $x=\frac12$, we obtain 
$$
\sum_{n=0}^\infty \frac{n^2}{2^n} = \frac{\frac12+\frac14}{\frac18} =
6
$$

\begin{quote}
\underline{\underline{\bf 72:}}
Power series are often superior to l'Hopital, in particular when the
going gets tough: Here we calculate
$\Dst\lim_{x\to0} \frac{\cos(\sin
  x)-\cosh^2x+\frac32x^2}{\ln(1+x^2)-\tan^2x}$: \\
(a) Construct a power series centered at 0 for the numerator, with
terms up to order $x^6$ calculated. \\
(b) Do the same for the denominator. \\
(c) Factor out and cancel leading powers of $x$, then start a long
division of power series, of which only the first term is needed. --
Conclude what is the limit in question. \\
(d) Looking at the results of (a),(b), predict how many invocations of
l'Hopital would have been needed, had you gone this route. 
\end{quote}
{\bf Solution: } \\
(a) We re-use work from \#68 to get
$$
\cos(\sin x) = 1-\frac12 x^2 + \frac{5}{24}x^4 - \frac{37}{720} x^6 +
\ldots
\kern20cm\hss
$$
Also 
$$
\begin{array}{@{}l}\Dst
\cosh^2 x = 
\left( 1+\frac12 x^2 + \frac1{24} x^4 + \frac{1}{720} x^6
+ \ldots\right) \,
\left( 1+\frac12 x^2 + \frac1{24} x^4 + \frac{1}{720} x^6
+ \ldots\right) \,
\\[2ex]\Dst
\phantom{\cosh^2x} 
=
1 + x^2 + \Bigl(\frac1{24}+\frac14+\frac{1}{24}\Bigr)  x^4 + 
\Bigl( \frac1{720} + \frac1{48} + \frac1{48}=\frac1{720} \Bigr) x^6 +
\ldots
\\[2ex]\Dst
\phantom{\cosh^2x} 
=
1 + x^2 + \frac13 x^4 + \frac2{45} x^6 +\ldots
\end{array}
\kern20cm\hss
$$
Therefore the numerator is
$$
\cos(\sin x) - \cosh^2 x + \frac32 x^2 = 
\Bigl(\frac5{24}-\frac13\Bigr) x^4 + \Bigl(-\frac{37}{720}
-\frac{2}{45}\Bigr) x^6 + \ldots
=
-\frac18 x^4 - \frac{23}{240} x^6 + \ldots
$$
(b) Similarly for the denominator, we get
$$
\ln(1+x^2) -\tan^2x = x^2 -\frac12 x^4 + \frac13 x^6 +\ldots - 
\Bigl( x+\frac13 x^3 + \frac2{15}x^5 +\ldots\Bigr)^2
=
\Bigl(-\frac12-\frac23\Bigr) x^4 + \Bigl( \frac13 -
\frac{4}{15}-\frac19\Bigr) x^6 + \ldots
$$
(c) So the whole ratio is
$$
\frac{\cos(\sin
  x)-\cosh^2x+\frac32x^2}{\ln(1+x^2)-\tan^2x} =
\frac{x^4 ( -\frac18 -\frac{23}{240}x^2 + \ldots)}%
     {x^4 ( -\frac76 -\frac2{45} x^2 + \ldots)}
= \frac{3}{28} + O(x^2)
$$
[We could have calculated the coefficient of the $x^2$ term, but don't
  care any more.]
The limit in question is $\frac{3}{28}$. 

(d) Given that l'Hopital requires differentiating numerator and
denominator, and that we would repeat the use of l'Hopital until either
the numerator or the denominator ceases to be 0, we infer that we
would have to use l'Hopital 4 times altogether if we were to calculate
the limit that way. 

\begin{quote}
\underline{\underline{\bf 73:}}
In the ellipse $\frac{x^2}{a^2}+\frac{y^2}{b^2}=1$ (where we assume
$b<a$), $a$ is called the major semiaxis and $b$ is called the minor
semiaxis. The quantity $\eps$ between 0 and 1 is defined by
$b^2=a^2(1-\eps^2)$ and is called excentricity
of the ellipse. \\
(a) Referring back as needed, show that the perimeter of
the ellipse with major semiaxis $a$ and excentricity $\eps$ can be
written as $L(a,\eps)= 4a\int_0^{\pi/2}\sqrt{1-\eps^2\sin^2 u}\, du$.
\\
(b) Show that $\int_0^{\pi/2}\sin^{2k} u\, du =
\frac12 \pi\,\frac{1\cdot3\cdot5\cdot\ldots}{2\cdot4\cdot6\cdot\ldots}$ where
there are $k$ factors in the numerator and $k$ factors in the
denominator. Conclude that 
$\int_0^{\pi/2}\sin^{2k} u\, du = \pi\frac{(2k)!}{2^{2k+1}k!^2}$. 
\\
(c) Use the Taylor expansion for $\sqrt{1-t}$ (centered at $t=0$) to
write the integrand as a series in powers of $\eps \sin u$ (but do not
replace $\sin u$ by its Taylor series. Obtain $L(a,\eps)$ as a power
series in $\eps$ (whose coefficients still involve $\int\ldots du$).
Using (b), write $L(a,\eps)$ as $2\pi a$ times a power series in
  powers of $\eps$.  
\end{quote}
{\bf Solution: }\\
(a) In Hwk \#44, we saw that the arclength of the ellipse is
$2\int_{-\pi/2}^{\pi/2}  \sqrt{a^2\cos^2 u + b^2\sin^2 u}\,du$. By
symmetry we can integrate from $0$ to $\pi/2$ instead, and double the
integral. This makes
$$
L(a,\eps) = 4 \int_0^{\pi/2} \sqrt{a^2\cos^2 u + a^2(1-\eps^2)\sin^2
  u}\, du = 4a \int_0^{\pi/2} \sqrt{1-\eps^2\sin^2 u}\,du
$$
(b) 
For any $n$, the recursion formula 
$$
\int \sin^n u\, du = -\frac1n \cos u\,\sin^{n-1}u + \frac{n-1}{n}
\int\sin^{n-2}u\,du 
\eqno (*)
$$
applies.
Indeed, by integration by parts we get
$$
\begin{array}{r@{}l}\Dst
\int \sin^n u\, du = \mbox{} &\Dst \int \sin u\,\sin^{n-1}u\, du = 
-\cos u\sin^{n-1}u + (n-1)\int\sin^{n-2}u\,\cos^2 u\,du
\\ & \Dst
\kern2em\uparrow \kern2em\downarrow \kern21em\|
\\ & \Dst \kern-0.5em {-}\cos u \kern1.2em (n-1)\sin^{n-2}u\,\cos u
\kern12em 1-\sin^2u
\\[2ex] \mbox{}=\mbox{} &\Dst
-\cos u \sin^{n-1} u + (n-1) \int\sin^{n-2} u\,du - (n-1) \int\sin^n u\,du
\end{array}
$$
Solving for the integral on the left yields $(*)$ immediately.
Specifically, with the limits of integration 0 and $\pi/2$, the
nonintegral term vanishes and we get (for $n\ge1$) from $(*)$:
$$
\int_0^{\pi/2} \sin^n u\, du =  \frac{n-1}{n}
\int_0^{\pi/2} \sin^{n-2}u\,du 
$$
For $n=2k$ even and at least 2, we therefore calculate
$$
\begin{array}{l}\Dst
\int_0^{\pi/2} \sin^{2k} u\, du =  
\frac{2k-1}{2k} \int_0^{\pi/2} \sin^{2k-2}u\,du = 
\frac{2k-1}{2k} \, \frac{2k-3}{2k-2} \int_0^{\pi/2} \sin^{2k-4}u\,du = 
\ldots 
=
\\[2ex]\Dst \kern3em \mbox{} = 
\frac{2k-1}{2k} \, \frac{2k-3}{2k-2} \ldots 
\frac{1}{2} \int_0^{\pi/2} \sin^{0}u\,du = 
\frac{\pi}{2}\,\frac{(2k-1)(2k-3)\ldots 1}{(2k)(2k-2)\ldots2}
\end{array}
$$
which is the formula claimed first in part (b). 
It's easier to `fill in the blanks' in the numerator, which are
exactly the terms in the denominator: So we get
$$
\int_0^{\pi/2} \sin^{2k} u\, du =  \frac{\pi}{2}\,
\frac{(2k)(2k-1)(2k-2)(2k-3)\ldots 1}{[(2k)(2k-2)\ldots2]^2}
= \rmk{\mbox{pull out factor 2 from each term in the denominator}}
\frac{\pi}{2}\,
\frac{(2k)!}{[2^k k!]^2} = \frac{\pi\,(2k)!}{2^{2k+1}\,k!^2}
$$
(c) We have seen the Taylor expansion
$$
(1+t)^{1/2} = 1 + \frac12 t + \frac12\Bigl(-\frac12\Bigr)\frac{t^2}{2!} + 
\frac12\Bigl(-\frac12\Bigr)\Bigl(-\frac32\Bigr)\frac{t^3}{3!} + 
\frac12\Bigl(-\frac12\Bigr)\Bigl(-\frac32\Bigr)\Bigl(-\frac52\Bigr)\frac{t^4}{4!}
+ \ldots 
$$
for $\abs{t}<1$. 
With $t=-\eps^2\sin^2u$, we get 
$$
(1-\eps^2\sin^2u)^{1/2} = 1 - \frac12 \eps^2\sin^2 u -
\frac12\Bigl(\frac12\Bigr)\frac{\eps^4\sin^4 u}{2!} -  
\frac12\Bigl(\frac12\Bigr)\Bigl(\frac32\Bigr)\frac{\eps^6\sin^6u}{3!}
- 
\frac12\Bigl(\frac12\Bigr)\Bigl(\frac32\Bigr)\Bigl(\frac52\Bigr)\frac{\eps^8\sin^8
u}{4!} - \ldots
$$
The general term in this series is
$$
- \frac{(2k-3)\ldots 1}{2^k \,k!}\eps^{2k} \sin^{2k} u
= - \frac{(2k-2)!}{2^{k-1}(k-1)!\, 2^k k!} \eps^{2k}\sin^{2k} u
$$
where, on the left, the product in the numerator contains a countdown only
involving odd numbers. (At $k=1$, the `empty countdown' has product 1
by the usual definition.) The second version is obtained by filling in
the gaps as before. 

Integrating term by term, we get
$$
\int_0^{\pi/2}\sqrt{1-\eps^2\sin^2 u}\, du = \frac{\pi}{2} 
 - \sum_{k=1}^\infty
\frac{(2k-2)!}{2^{2k-1}(k-1)!k!}\eps^{2k}\int_0^{\pi/2}\sin^{2k} u\,du
$$
Using the integrals found in (b) and multiplying with $4a$ again, we
get
$$
L(a,\pi) = 2\pi a \left( 
1-\sum_{k=1}^\infty \frac{(2k)!(2k-2)!}{2^{4k-1}(k-1)! k!^3} \eps^{2k}
\right)
$$
\begin{quote}
\underline{\underline{\bf 74:}}
In the sample solution to \#63 I claimed that $\arctan 1 =
4\arctan\frac15-\arctan\frac1{239}$. Let's understand why this is the
case: {\sf Admittedly a trig hwk, not a series hwk.}

(a) Looking up the addition theorem for sine and cosine, obtain an
addition theorem  expressing $\tan(u+v)$  in terms of $\tan u$ and
$\tan v$. With $u=\arctan a$ and $v=\arctan b$, express $\arctan
a+\arctan b$ as $\arctan f(a,b)$ for some appropriate expression
$f(a,b)$. 
\\
(b) Use part (a), to succesively find the `$?$' in
$2\arctan\frac15 = \arctan ?$, $3\arctan\frac15 = \arctan ?$,
$4\arctan\frac15=\arctan ?$. Then find $y$ so that $4\arctan
\frac15+\arctan y = \arctan1$.
\end{quote}
{\bf Solution: }
Dividing $\sin(u+v) = \sin u\cos v + \cos u\sin v$ by 
$\cos (u+v) = \cos u \cos v - \sin u \sin v$, we obtain
$$
\tan (u+v) = \frac{\sin u \cos v + \cos u \sin v}%
                  {\cos u \cos v - \sin u \sin v} 
= \frac{ \tan u + \tan v }%
       { 1 - \tan u\tan v }
$$
Letting $u=\arctan a$ and $v=\arctan b$ and taking the $\arctan$ on
both sides, we get
$$
\arctan a + \arctan b = \arctan \frac{a+b}{1-ab}   \;.
$$
With $a=b=\frac15$ we get $2\arctan \frac15 = \arctan
\frac{2/5}{24/25} = \arctan \frac{5}{12}$. 
\\
With $a=\frac15$ and $b=\frac{5}{12}$, we get 
$3\arctan\frac15 = \arctan\frac{1/5 + 5/12}{11/12} = 
\arctan{37}{55}$. 
\\
With $a=b=\frac{5}{12}$ (or else $a=\frac15$ and $b=\frac{37}{55}$) we
get 
$4\arctan\frac15 = \arctan \frac{5/12+5/12}{1-25/144} =
\frac{120}{119}$.

This is pretty close to $\arctan1=\frac\pi4$, so we are now looking
for the proper (small, negative) correction $y$ such that
$\arctan\frac{120}{119} + \arctan y = \arctan 1$. This requires 
$$
\frac{120/119 + y}{1 - 120y/119} = 1
$$
and we can easily solve this to find $y=-\frac1{239}$. 

\begin{quote}
\underline{\underline{\bf 75:}}
Here we calculate $S:= 1+\frac13 -\frac12 +
\frac15+\frac17-\frac14+\frac19+\frac1{11}-\frac16 +
\frac1{13}+\frac1{15}-\frac18++-\ldots$ (alternatingly two positive
terms and one negative term taken from the alternating harmonic
series). In the introduction I had mentioned that $S$ is
$\frac32\ln 2$, as opposed to the alternating harmonic series with
terms in their original order, whose value we know to be $\ln2$. 

(a) We strive to evaluate the power series 
$$
1+\frac13x -\frac12x^2 +
\frac15x^3+\frac17x^4-\frac14x^5+\frac19x^6+\frac1{11}x^7-\frac16x^8 +
\frac1{13}x^9+\frac1{15}x^{10}-\frac18x^{11}++-\ldots
$$
Show that this series can be written as the sum of three series 
$$
\sum_{n=0}^\infty \frac{x^{3n}}{4n+1} + 
\sum_{n=0}^\infty \frac{x^{3n+1}}{4n+3} - 
\sum_{n=0}^\infty \frac{x^{3n+2}}{2n+2} 
\eqno(*)
$$
\\
(b) Evaluate $\sum_{n=0}^\infty\frac{y^{4n+1}}{4n+1}$ by integrating an appropriate
geometric series and likewise integrating its value (using PFD for the
integration). 
\\
(c) Do the same task for $\sum_{n=0}^\infty\frac{y^{4n+3}}{4n+3}$ and 
$\sum_{n=0}^\infty\frac{y^{2n+2}}{2n+2}$. 
\\
(d) Letting $y= x^{3/4}$ twice and  $y=x^{3/2}$ once, obtain formulas
for the series in $(*)$. 
\\
(e) Taking the limit as $x\to1$ in these formulas, you obtain the
value of $S$. (To carry out the limit, you may find it convenient to
let $x=t^4$ and then also group $\ln$  terms together into
combinations where you can use l'Hopital on ``$0/0$''
indeterminate expressions.)
\end{quote}
{\bf Solution: }\\
(a) Since we always take two positive terms (with odd denominators)
and one negative term (with even denominator), terms come in groups of
three, and we will combine the 1st in each group into one series, the 2nd
in each group into another series, and the third in each group into the
third series. These are the series in $(*)$.  

{\sf Note that this grouping and rearranging is allowed for
  $\abs{x}<1$, but not for $\abs{x}=1$, because inside the radius of
  convergence power series converge absolutely, and absolutely
  convergent series allow such rearrangement, as stated (but not
  proved) in class. For $x=0$ however, each of the series in $(*)$
  diverges, even though the original not-rearranged series did
  converge. }


$$
\sum_{n=0}^\infty \frac{y^{4n+1}}{4n+1} = y + \frac{y^5}{5} +
\frac{y^9}{9} + \frac{y^{13}}{13} + \ldots = 
\int_0^y \left(
1 + \bar y^4 + \bar y^8 + \bar  y ^{12} + \ldots 
\right)\,d\bar y
= \int_0^y \frac{d \bar y}{1-\bar y^4}
\leqno(b)
$$
A PFD helps us doing this integration:
$$
\frac1{1-\bar y^4} = 
\frac{1}{(1-\bar y)(1+\bar y)(1+\bar y^2)}
= \frac{A}{1-\bar y} + \frac{B}{1+\bar y} +
\frac{C\bar y + D}{1+\bar y^2}
$$
Cover-up at 1 and $-1$ respectively gives $A=\frac14$ and $B=\frac14$
respectively. Study at~$\infty$ (i.e., multiplying with $\bar y$ and
taking the limit $\bar y\to\infty$) gives $-A+B+C=0$, hence
$C=0$. Letting $\bar y=0$ yields $A+B+D=1$, hence $D=\frac12$. 
Of course complex cover-up at $i$ could also have been used to get
$C,D$.
We conclude 
$$
\sum_{n=0}^\infty \frac{y^{4n+1}}{4n+1} = \frac14\Bigl(\ln(1+y) -
\ln(1-y)\Bigr) +\frac12\arctan y\;.
$$
Similarly
$$
\sum_{n=0}^\infty \frac{y^{4n+3}}{4n+3} = \frac{y^3}{3} + \frac{y^7}{7} +
\frac{y^{11}}{11} + \frac{y^{15}}{15} + \ldots = 
\int_0^y \left(
y^2 + \bar y^6 + \bar y^{10} + \bar  y ^{14} + \ldots 
\right)\,d\bar y
= \int_0^y \frac{\bar y^2\,d \bar y}{1-\bar y^4}
\leqno(c)
$$
The PFD is now
$$
\frac{\bar y^2}{1-\bar y^4} = 
\frac{\bar y^2}{(1-\bar y)(1+\bar y)(1+\bar y^2)}
= \frac{A}{1-\bar y} + \frac{B}{1+\bar y} +
\frac{C\bar y + D}{1+\bar y^2}
$$
with $A=\frac12$, $B=\frac12$, $C=0$, $D=-\frac12$. So we conclude
$$
\sum_{n=0}^\infty \frac{y^{4n+3}}{4n+3} = \frac14\Bigl(\ln(1+y) -
\ln(1-y)\Bigr) -\frac12\arctan y\;.
$$
Also 
$$
\sum_{n=0}^\infty \frac{y^{2n+2}}{2n+2} = \frac{y^2}{2} +
\frac{y^4}{4} + \frac{y^6}{6} + \ldots = 
\int_0^y \left( \bar y + \bar y^3 + \bar y^5 + \ldots \right) d\bar y
= \int_0^y \frac{\bar y\,d\bar y}{1-\bar y^2} 
= -\frac12\ln(1-y^2)
\leqno(c)
$$

(d) We have the desired coefficients already, but not the desired
exponents. So, letting $y= x^{3/4}$ in the first two series and
multiplying with $x^{-3/4}$ or $x^{-5/4}$ respectively, we conclude
$$
\sum_{n=0}^\infty \frac{x^{3n}}{4n+1} = 
x^{-3/4}\sum_{n=0}^\infty \frac{x^{3n+ 3/4}}{4n+1} = \frac14 x^{-3/4}
\left( \ln(1+ x^{3/4}) -\ln(1-x^{3/4}) + 2\arctan x^{3/4} \right)
$$
$$
\sum_{n=0}^\infty \frac{x^{3n+1}}{4n+3} = 
x^{-5/4}\sum_{n=0}^\infty \frac{x^{3n+ 9/4}}{4n+3} = \frac14 x^{-5/4}
\left( \ln(1+ x^{3/4}) -\ln(1-x^{3/4}) - 2\arctan x^{3/4} \right)
$$
In the last series, we let $y=x^{3/2}$ and multiply with $x^{-1}$ and
get
$$
\sum_{n=0}^\infty \frac{x^{3n+2}}{2n+2} = 
x^{-1}\sum_{n=0}^\infty \frac{x^{3n+3}}{2n+2} = -\frac12 x^{-1}
\ln(1- x^{3}) 
$$

Combining, we obtain a formula for the power series in (a): It is
$$
\begin{array}{l}\Dst 
S(x)= 1+\frac13x -\frac12x^2 +
\frac15x^3+\frac17x^4-\frac14x^5+\frac19x^6+\frac1{11}x^7-\frac16x^8 +
\frac1{13}x^9+\frac1{15}x^{10}-\frac18x^{11}++-\ldots
\\[2ex]\Dst
\phantom{S(x)} = 
\sum_{n=0}^\infty \frac{x^{3n}}{4n+1} + 
\sum_{n=0}^\infty \frac{x^{3n+1}}{4n+3} - 
\sum_{n=0}^\infty \frac{x^{3n+2}}{2n+2} 
\\[3ex]\Dst
\phantom{S(x)}=  \quad\,
\frac14 x^{-3/4} \left( \ln(1+ x^{3/4}) -\ln(1-x^{3/4}) + 2\arctan
x^{3/4} \right) 
+ \mbox{}
\\[2ex]\Dst \phantom{S(x)=\mbox{}} \mbox{} +
\frac14 x^{-5/4}  \left( \ln(1+ x^{3/4}) -\ln(1-x^{3/4}) - 2\arctan
x^{3/4} \right) 
+ \frac12 x^{-1}\ln(1-x^3)
\end{array}
$$
Each of these three terms becomes infinite as $x\to1-$, due to the
$\ln(1-x^?)$ terms contained. However, the combination of the three
has a chance to have a finite limit as $x\to1$, due to
cancellations. We have to calculate that $\lim_{x\to1-}S(x)$. 
Let's put the four `good' terms of $S(x)$ together and call it $S_1(x)$,
and the three `bad' terms will be $S_2(x)$:
$$
S_1(x) = \frac14 x^{-3/4} \left( \ln(1+ x^{3/4})  + 2\arctan x^{3/4} \right) 
+ \frac14 x^{-5/4}  \left( \ln(1+ x^{3/4})  - 2\arctan x^{3/4} \right) 
$$
and $\lim_{x\to1-} S_1(x) = \frac14(\ln2 +\frac\pi2) +
\frac14(\ln2-\frac\pi2) = \frac12\ln2$. 

$$
S_2(x)= 
-\frac14 x^{-3/4} \ln(1-x^{3/4})  
- \frac14 x^{-5/4} \ln(1-x^{3/4}) 
+ \frac12 x^{-1}\ln(1-x^3)
$$
Letting $x=t^4$ just to get rid of the fractions
$$
\begin{array}{l}\Dst
S_2(x) = 
-\frac14(t^{-3}+t^{-5})\ln(1-t^3) + \frac12 t^{-4}\ln(1-t^{12})
= \frac{\ln(1-t^3)}{4}\, \left( -t^{-3} - t^{-5} + 2 t^{-4}\right) 
+\frac{t^{-4}}{2}\ln[(1+t^3)(1+t^6)]
\end{array}
$$
The last term is again easy for the limit, and we get
$$
\begin{array}{l}\Dst
\lim_{x\to1-} S_1(x) = \lim_{t\to1-} \frac{-\ln(1-t^3)\,(1-t)^2}{4t^5}
+ \frac12 \ln[(1+1)(1+1)] 
\\[2ex]\Dst
\phantom{\lim_{x\to1-} S_1(x)} 
=
-\frac14\lim_{t\to1-}\left((1-t)^2\ln(1-t) +
(1-t)^2\ln(1+t+t^2)\right) + \frac12\ln4
\end{array}
$$
The remaining limit is 0 since we know that $\lim_{s\to0} s\ln s =
0$. 
Therefore $\lim_{x\to1-} S(x) = \frac12\ln 2 + 0 + \frac12\ln4 =
\frac32\ln 2$. 


{\sf This procedure is justified by the
  theorem that says that if a power series does converge on the boundary of
  the interval of convergence and the function represented by the
  power series still has a limit at that point, then the value of the
  power series equals that limit. It's not such an easy theorem to
  demonstrate; I just mentioned it in class without comment.}



\end{document}

