Due: October 30th, 2017
Math 142A Assignment 4
Answers to these problems are now available here.
The $\LaTeX$ file used to produce them is here.

Suppose that $(a_n)$ is a bounded sequence.
 Prove that for any $\epsilon > 0$ there are only finitely many indices $j$ for which $a_j > \displaystyle\limsup_{n\to\infty}a_n + \epsilon$.
 Prove that for any $\epsilon > 0$ there are infinitely many indices $j$ for which $a_j > \displaystyle\limsup_{n\to\infty}a_n  \epsilon$.
 Prove that $\displaystyle\limsup_{n\to\infty}a_n$ is the only real number with both of these properties.
 Show that every bounded sequence has a subsequence which converges to its limit superior. (Note that this gives a second proof of the BolzanoWeierstrass Theorem.)

Suppose that $S$ $\subseteq \mathbb{R}$ is a sequentially compact set: that is, every sequence in $S$ has a subsequence which converges to a point in $S$.
Prove the following directly, without appealing to compactness from Section 2.5 of the book.
 Show that $S$ is bounded.
 Show that $S$ is closed.

Suppose that $g : \mathbb{R} \to \mathbb{R}$ is defined as follows:
$$g : x \mapsto \begin{cases}
x + 4a & \text{ if } x \leq 2 \\
ax + 2b & \text{ if } 2 < x \leq 3 \\
2x^2  b & \text{ if } 3 < x.
\end{cases}$$
For what values of $a$ and $b$ is $g$ continuous?

Suppose that $f : \mathbb{R} \to \mathbb{R}$ has the property that for some $M \in \mathbb{R}$ and all $x \in \mathbb{R}$, $f(x) < M$.
Show that $x \mapsto xf(x)$ is continuous at $0$.

Suppose that $f : [a, b] \to \mathbb{R}$ is continuous.
Show that there is some $M \in \mathbb{R}$ such that $f(x) < M$ for all $x \in [a, b]$.
(Hint: if not, show that there is a sequence of points $(x_n)$ so that $f(x_n) > n$...)

Bonus:
Let $K \subset \mathbb{R}$.
An open cover of $K$ is a (possibly infinite) set $\mathcal{U}$ of open subsets of $\mathbb{R}$, such that
$$K \subseteq \bigcup_{U \in \mathcal{U}} U.$$
That is, every point $x \in K$ is contained in at least one element of $\mathcal{U}$.
A subcover of $\mathcal{U}$ is a subset $\mathcal{U}' \subseteq \mathcal{U}$ which is still an open cover of $K$.
The set $K$ is said to be compact if every open cover of $K$ has a finite subcover  that is, if finitely many sets in any open cover suffice to cover $K$.
 Show that if $K$ is compact, then $K$ is closed and bounded.
 Show that the intersection of a closed set and a compact set is compact.
 Show that the interval $[0, 1]$ is compact. (Hint: if it is not, there is some open cover $\mathcal{U}$ with no finite subcover; show that for such a cover, there is a nested sequence of shrinking closed subintervals, none of which have a finite cover by elements of $\mathcal{U}$, and look at their intersection.)
 Conclude that if $K$ is closed and bounded, then $K$ is compact.
We have shown here that for subsets of $\mathbb{R}$, compact is equivalent to sequentially compact.
It turns out that both of these notions may be extended to more complicated settings, in which they are no longer equivalent.
It turns out that this is the content of Section 2.5 of the text book.
The new bonus problem is below.
However, the above are still fun to try to work out without reading the book.

Bonus:
Consider the function $f : \mathbb{R} \to \mathbb{R}$ defined as follows:
$$ f : x \mapsto \begin{cases}
0 & \text{ if } x \notin \mathbb{Q} \\
1 & \text{ if } x = 0 \\
\frac{1}{q} & \text{ if } x = \frac{p}{q} \text{ with } p > 0,\,p, q \in \mathbb{Z}, \text{ and } \mathrm{gcd}(p, q) = 1.
\end{cases}$$
Show that $f$ is continuous at every irrational, and discontinuous at every rational.
Bonus bonus:
Is there a function which is continuous at every rational and discontinuous at every irrational? (This one is quite difficult.)