Extreme and Intermediate Value Theorems

1. Metric Space Formulations

Theorem (Extreme Value Theorem)
If \((X,d_X)\) and \((Y,d_Y)\) are metric spaces and \(X\) is compact, then for any continuous \(f : X \rightarrow Y\), \(f(X)\) is a compact subset of \(Y\).
Proof
For any open cover \(\mathcal U\) of \(f(X)\), if \(U \in \mathcal U\), then \(f^{-1}(U)\) is open and the sets \(\{f^{-1}(U)\}_{U \in \mathcal U}\) cover \(X\). Since \(X\) is compact, \(X \subset f^{-1}(U_1) \cup \cdots \cup f^{-1}(U_n)\) for some sets \(U_1,\ldots,U_n \in {\mathcal U}\). This means that every \(y \in f(X)\) must belong to \(U_1 \cup \cdots \cup U_n\) since \(y = f(x)\) for some \(x\) and \(x \in f^{-1}(U_i)\) for some \(i\).

This generalizes the Extreme Value Theorem because when \(Y = {\mathbb R}\), the fact that \(f(X)\) is compact means that it is closed and bounded and therefore contains its supremum and infimum.
Theorem (Intermediate Value Theorem)
If \((X,d_X)\) and \((Y,d_Y)\) are metric spaces and \(X\) is connected, then for any continuous \(f : X \rightarrow Y\), \(f(X)\) is a connected subset of \(Y\).
Proof
If \(A\) and \(B\) are disjoint open sets in \(Y\) which both intersect \(f(X)\) and have \(f(X) \subset A \cup B\), then \(f^{-1}(A)\) and \(f^{-1}(B)\) are both open sets in \(X\) which are disjoint, nonempty, and have union equal to \(X\). This violates the hypothesis that \(X\) is connected.

This generalizes the Intermediate Value Theorem because when \(Y = {\mathbb R}\), the fact that \(f(X)\) is connected means that it is a singleton or an interval.

2. Peano Surface

Important (You can't judge a critical point by its behavior on lines)
Figure. Illustration of the Peano Surface
\[ f(x,y) = (2x^2 - y)(y-x^2) \]
shows that it is possible for a function to fail to have a local maximum at the origin even when it does have a local maximum at the origin when restricted to any line through the origin. Let
\[{}g_\theta(t) := f(t \cos \theta, t \sin \theta){}\]
\[{}= (2 t^2 \cos^2 \theta - t \sin \theta) (t \sin \theta - t^2 \cos^2 \theta){}\]
\[{}= -t^2\sin^2 \theta + 3 t^3 \cos^2 \theta \sin \theta - t^4 \cos^4 \theta.{}\]
Each function \(g_\theta(t)\) has a critical point at \(t = 0\); when \(\sin \theta \neq 0\), the second derivative with respect to \(t\) is negative at \(t=0\), indicating that \(t = 0\) is a local maximum. When \(\sin \theta = 0\), \(g_\theta(t) = - t^4\), which also has a local maximum at \(t=0\). But
\[{}f\left(x, \frac{3}{2}x^2 \right){}\]
\[{}= \left(2x^2 -\frac{3}{2}x^2 \right)\left(\frac{3}{2}x^2 - x^2 \right){}\]
\[{}= \frac{x^4}{4}{}\]
which clearly does not have a local maximum at \(x = 0\).