Compact Set. A nonempty subset $C \subset \R^n$ is compact if it is closed and bounded.

Bolzano-Weierstrass Theorem

Theorem. A compact set $C \subset \R^n$ contains a sequence $i \mapsto x_i$, if-and-only-if that sequence has a convergent subsequence $j \mapsto (x_i)_j$ whose limit is in $C$.

If $i \mapsto x_i$ is a sequence in $C$, then it is bounded so it has a convergent subsequence, and it is closed so the limit is in $C$.

If $C$ is unbounded, it contains a sequence $i \mapsto x_i \to \infty$, and that sequence has no convergent subsequence. There exists a sequence $i \mapsto x_i$ which converges in $\R^n$ to a point not in $C$.

Existence of Maxima and Minima

Theorem. Let $X \subset \R^n$ be compact, and $f: X \to \R$ be continuous. There exists $x_\circ \in X$ such that $\forall x \in X, \space f(x) \leq f(x_\circ)$. In particular, $f$ is bounded.

Proof. We use proof by contradiction.

  1. Say that $f$ is unbounded. There exists a sequence $n \mapsto x_n \in X$ such that $f(x_n) > n$.
  2. There exists a subsequence $(x_n)_i$ which converges to a point $y$ of $X$.
  3. Since $f$ is continuous at $y$, $\forall \varepsilon > 0, \exists \space \delta > 0$ such that $|z-y| < \delta \implies |f(z) - f(y)| < \varepsilon$.
  4. Take $\varepsilon = 1$. Find such a $\delta$. $|z-y| < \delta \implies f(z) < 1 + f(y)$. Since $n \mapsto x_n$ converges to $y$, for $i$ sufficiently large, $|(x_n)_i - y |< \delta$. If $n_i > f(y) + 1$, then this is a contradiction. It is both smaller and bigger than $f(y) + 1$.
  5. Now that we know $f$ is bounded, let $M = \sup f(x)$. There must exist a sequence $n \mapsto x_n$ such that $\lim_{n \to \infty}f(x_n) = M$
  6. Since $X$ is compact, there is a convergent subsequence $i \mapsto (x_n)_i$ converging to $y \in X$.
  7. $\forall \varepsilon > 0, \space \exists \delta > 0$ such that $|z-y| < \delta \implies |f(z) - f(y)| < \varepsilon$. $\exists I$ such that $i > I \implies |(x_n)_i-y| < \delta \implies |f((x_n)_i) - f(y)| < \varepsilon$.
  8. $\lim_{i \to \infty} f((x_n)_i) =f(y)= M$ because $f$ is continuous.

Mean Value Theorem

Theorem. If $f: [a,b] \to \R$ is differentiable, then there exists $c \in (a,b)$ such that $f'(c) = \frac{f(b) - f(a)}{b-a}$.