\magnification=\magstep1
\centerline{Mathematics 242 -- Principles of Analysis}
\centerline{Solutions -- Final Examination}
\centerline{May 9, 2014}
\bigskip
\noindent
I.  We have 
$$A = \{\tan(x) : x\in [0,\pi/4]\} = [0,1]$$
and 
$$B = \{x : 1 < |x| < 3\} = (-3,-1) \cup (1,3)$$
so:
\item{A)}  $A \cup B = [0,1] \cup ((-3,-1) \cup (1,3)) = (-3,-1) \cup [0,3)$.
\item{B)}  For each $x \in A$, $|x - 2|$ represents the 
distance along the number line from $x$ to 2.  So 
$$C = \{|x - 2| : x\in A\} = [1,2]$$
The least upper bound of $C$ is $2$.
\bigskip
\noindent
II. A) We say $\lim_{n\to \infty} x_n = L$ if for all $\varepsilon > 0$,
there exist $n_0$ such that $|x_n - L| < \varepsilon$ for all $n \ge n_0$.
\bigskip
\noindent
B)  We have 
$$\lim_{n\to\infty} 1 + {(-1)^n \over \sqrt{n}} = 1.$$
To prove this, note that 
$$\left|1 + {(-1)^n\over \sqrt{n} - 1\right| = {1\over \sqrt{n}}$$
For any given $\varepsilon > 0$, since ${\bf N}$ is not bounded
in ${\bf R}$, there exist 
$$n_0 > {1\over \varepsilon^2} \Leftrightarrow {1\over \sqrt{n_0}} < \varepsilon.$$  
Hence if $n \ge n_0$, then we have 
$$\left|1 + {(-1)^n\over \sqrt{n} - 1\right| = {1\over \sqrt{n}} 
< {1\over \sqrt{n_0}} < \varepsilon.$$
This shows the sequence converges to $1$.

\bigskip
\noindent
III. The sequence $x_n =\sin(n)$ is bounded since $|\sin(n)| \le 1$ for all $n$.
Hence the Bolzano-Weierstrass Theorem says that there exists a convergent
subsequence $x_{n_\ell} = \sin(n_\ell)$ for some strictly increasing index 
sequence of integers $n_\ell$.  Consider the sequence $\cos(n_\ell)$, using these $n_\ell$.  
This is also a bounded sequence since $|\cos(n_\ell)| \le 1$ for all $\ell$.
Hence the Bolzano-Weierstrass Theorem implies that there is a convergent
subsequence of this sequence, say $y_{n_{\ell_k}} = \cos(n_{\ell_k})$.
Note that this sequence comes from a subsequence of the index sequence
$n_\ell$.  Hence $x_{n_{\ell_k}}$ is a subsequence of a convergent
sequence.  So since any subsequence of a convergent 
sequence is convergent too, the $x_{n_{\ell_k}}$ is also convergent.

%\bigskip
%\noindent
%{\it Note:} A lot of people lost a lot of points on this one
%because they did not take into account that the $n$ inside
%the sin and cos in the definitions of the sequences $x_n$
%and $y_n$ is the same as the index for the sequences.  
%You have to consider plugging {\it integer values} into 
%the two trig functions.  Things like $n\pi/2$ are NOT
%INTEGERS!
\bigskip
\noindent
IV.  A)  Let $f$ be defined on a deleted interval $D$ about $c$ (that
is, at all points on some interval containing $c$, except
possibly at $c$ itself).    Then we say $\lim_{x\to c} f(x) = L$ if for
all $\varepsilon > 0$, there exist $\delta > 0$ such that 
$|f(x) - L| < \varepsilon$ for all $x\in D$ with $0 < |x - c| < \delta$.
If we are considering the limit as $x \to +\infty$, then we should 
assume $f(x)$ is defined for all $x$ sufficiently large and the definition
of $\lim_{x \to +\infty} f(x) = L$  becomes:
For all $\varepsilon > 0$, there exist $B > 0$ such that 
$|f(x) - L| < \varepsilon$ for all $x > B$.
\bigskip
\noindent
B)  The limit here is $-1$.  Proof:  Let $\varepsilon > 0$ and 
let $\delta = \min(1,\varepsilon/3)$.  Then for all $x$ with 
$0 < |x - 0| < \delta$, we have
$$|x^2 - 4x + 2 - (-1)| = |x^2 - 4x + 3| = |x-1||x-3|.$$
Since $|x - 1| < 1$, we have $0 < x < 2$.  Hence $|x - 3| < 3$.
But then: 
$$|x^2 - 4x + 2 - (-1)| = |x-1||x-3| < {\varepsilon \over 3}\cdot 3 = \varepsilon.$$
This shows the limit equals $L = -1$.  
\bigskip
\noindent
C)  As $x \to \infty$, $1/x \to 0$.   Hence the limit should be 1.  
Let $\varepsilon > 0$, and let $B > {1\over \sqrt{\varepsilon}}$.  Then 
$x > B$ implies $x > {1\over \sqrt{\varepsilon}}$, so ${1\over x^2} < \varepsilon$. 
Hence if $x > B$, then    
$$\left|{1 \over 1 + {1\over x^2}} - 1\right| 
=\left|{{1\over x^2} \over 1 + {1 \over x^2}}\right| = 
{1\over x^2 + 1} < {1 \over x^2} < \varepsilon.$$
This shows $\lim_{x \to +\infty} {1\over 1 + {1\over x^2}} = 1$.  
\bigskip
\noindent
V.  A)  See the class notes and the text for this proof.  

\bigskip
\noindent
B)  The denominator $x^4 + 48$ is nonzero for all $x \in {\bf R}$.
Hence $f(x) = {32x \over x^4 + 48}$ is continuous at all $x$.  
We see $f(0) = 0$ and $f(2) = {64\over 64} = 1$.  
By the IVT on the interval $[0,2]$, for each $k$ with $0 < k < 1$,
there is at least one $x \in (0,2)$ such that $f(x) = k$.  To 
find a second $x$ satisfying this condition, note that
$\lim_{x\to +\infty} f(x) = 0$.  Hence by the IVT again,
there is also at least one additional solution of $f(x) = k$
for $x \in (2, +\infty)$.  
\bigskip
\noindent
C)  If for some $k$, 
$f(x_1) = f(x_2) = k$ for some $x_1 \ne x_2$, 
then $f'(x) = 0$ for some
$x$ between $x_1$ and $x_2$ by the special case of the MVT known
as Rolle's Theorem.  However, our function $f$ has derivative
$$f'(x) ={1536 - 96x^2\over (x^4 + 48)^2}$$
(quotient rule for derivatives!).  This is zero for
$x > 0$ only at $x = 2$.  Hence by Rolle's Theorem, on the 
intervals $(0,2)$ and $(2,+\infty)$, there cannot
be more than one solution of $f(x) = k$ in each interval.
This means that there are exactly two of them all
together.

\bigskip
\noindent
VI.  We want to show that given any $\varepsilon > 0$, there exists
a partition ${\cal P}$ of $[0,2]$ such that $U(f,{\cal P}) - L(f,{\cal P}) < \varepsilon$.  
Since the function changes from being decreasing to increasing (and is discontinuous)
at $x = 1$, let's chose a regular partition of $[0,1]$ with an {\it even} number $n = 2q$
of subintervals, so that $x_q = 1$ is always one of the endpoints.  We have
$x_i = 2i/(2q) = i/q$ for $i = 0,\ldots,2q$ for each $q \in {\bf N}$.  On the first half of
the interval, $f$ is increasing.  So for $i = 1,\ldots, q$, we will have
$m_i = f((i-1)/q) = (i-1)/q + 1$ and $M_i = f(i/q) = i/q + 1$ (with $M_q = 2$).  
But then for $i = q+1,\ldots,2q$, $f$ is decreasing so
$m_i = f(i/(2q)) = -i/(2q)$, $M_i = f((i-1)/(2q)) = -(i-1)/(2q)$.  Therefore, 
following the proof that $f$ monotone implies $f$ integrable on each half,
$$U(f,{\cal P}) - L(f,{\cal P}) = (2 - 1){1\over 2q} + ((-1) - (-2)){1\over 2q} = {1\over q}$$
We can get this $< \varepsilon$ for any $q > 1/\varepsilon$.   
 
\bigskip
\noindent
VII.  A)  FALSE.  Note that the problem {\it does not say to assume the terms are
all positive}.  For instance, the series $\sum_{n=1}^\infty (-1)^n$ has all partial 
sums $-1,0$, so the set of partial sums is bounded.  However the sequence of 
partial sums does not converge, so the series does not converge.   

\bigskip
\noindent
B)  TRUE.  If $f'(0)$ exists, then $f$ must also be continuous at $x = 0$.  
This implies 
$$\lim_{x\to 0^1} = \lim_{x \to 0^-} \cos(2x) = 1 = \lim_{x \to 0^+} ax^2 + bx + c.$$
Hence $c = 1$.  Then to get $f'(0)$ to exist, we must have
 $$\lim_{x\to 0^-} {\cos(2x) - 1 \over x} = 0 = \lim_{x \to 0^+} {ax^2 + bx + 1 - 1 \over x}$$
This implies $b = 0$.  Finally, and similarly, to get $f''(0)$ to exist we must have $a = -2$. 
Here's why:  We have $f'(x) = -2\sin(2x)$ for all $x < 0$ and $f'(x) = 2ax$ for $x > 0$.
$$\lim_{x \to 0^-} {-2\sin(2x) - 0\over x - 0} = -4 = 2a = \lim_{x\to 0^+} {2ax - 0 \over x}$$ 

\bigskip 
\noindent   
C)  FALSE.  In fact, note that with $x = 2$ we get $\sum_{n=1}^\infty {1\over \sqrt{n}}$.
This series diverges by the integral test:
$$\lim_{b \to \infty} \int_1^b {1\over \sqrt{x}}\, dx = \lim_{b \to \infty} 2\sqrt{b} - 1$$
is not finite.  So the series diverges.

\bigskip
\noindent
D)  TRUE.  The idea is the same as in V C above.  If there were distinct $x_1 < x_2$
with $f(x_1) = f(x_2)$, then Rolle's Theorem would imply that $f'(c) = 0$ for
some $c \in (x_1,x_2)$.  
\bigskip
\noindent
E)  FALSE.   We claim that for each fixed $k$, 
$$\lim_{n\to\infty} \overline{y} - (\overline{x})^n = {1\over 4} - {1\over e^2} > 0.$$
Hence there exists an $n_0$ (depending on $k$) 
such that $\overline{y} > \overline{x}^n$ for all $n \ge n_0$.  (This says that the centroid
of the region $R$ lies above the upper boundary of $R$ when $n$ is sufficiently large(!))
Here's how to see this:  First 
$$\overline{y} = {(n+k+1)(n+1)\over (2n+2k+1)(2n+1)} = {n^2 + (k+2)n + 1 \over 4n^2 + (4k+4)n + 1}$$
and it follows easily that 
$\lim_{n\to\infty} \overline{y} = {1\over 4}$.  Now consider 
$$\lim_{n\to\infty} \overline{x}^n = \lim_{n\to\infty} \left((n+k+1)(n+1)\over(n+k+2)(n+2)}\right)^n$$
This is a $1^\infty$ indeterminate form.  So we proceed as in a problem on Problem Set 9.  
We take the logarithm and apply L'Hopital's Rule to evaluate this limit:
$$\eqalign{
\lim_{n\to\infty} \ln\left((n+k+1)(n+1)\over(n+k+2)(n+2)}\right)^n
&= \lim_{n\to\infty} n\ln\left((n+k+1)(n+1)\over(n+k+2)(n+2)}\right)\cr
&= \lim_{n\to\infty} {\ln\left((n^2+(k+2)n+1)\over(n^2+(k+4)n+4)}\right) \over {1\over n}} \cr
&= \lim_{n\to\infty} {{n^2 + (k+4)n + 4 \over n^2 + (k+2)n + 1}\cdot {2n^2 + 6n + 3k + 4\over (n^2 + (k+4)n + 4)^2}   \over {-1\over n^2}}\cr
&=-2\cr}$$
Hence 
$$\lim_{n\to\infty} \overline{x}^n = \lim_{n\to\infty} \left((n+k+1)(n+1)\over(n+k+2)(n+2)}\right)^n = e^{-2}.$$
This concludes the proof.  
\bye
