Corollary
The image of a bounded and closed interval of a continuous function is an interval

Proof

Let \([a,b]\) be a closed and bounded interval. Let \(f\) be continuous on \([a,b]\). By the Extreme Value Theorem, since \(f\) is continuous on \([a,b]\), then \(f\) is bounded on \([a,b]\). Moreover, \(f\) attains a minimum and a maximum on \([a,b]\). So there exists points \(x_m, x_M \in [a,b]\) and \(m, M \in \mathbb{R}\) such that

$$ \begin{align} M = \max_{x \in [a,b]} f(x) = f(x_M) \quad \text{ and } \quad m = \min_{x \in [a,b]} f(x) = f(x_m) \quad\quad\quad (1) \end{align} $$

We want to show that

$$ \begin{align} f([a,b]) = [m,M] \end{align} $$

First, we will show that \(f([a,b]) \subseteq [m, M]\). To see this consider any \(x \in [a,b]\). Then by (1)

$$ \begin{align} m = f(x_m) \leq f(x) \leq f(x_M) = M \end{align} $$

Therefore,

$$ \begin{align} f([a,b]) \subseteq [m, M] \quad\quad\quad (2) \end{align} $$

Next, we want to show that \([m,M] \subseteq f([a,b])\). First, we know that \(f(x_m) = m\) and \(f(x_M) = M\). Without loss of generality assume that \(x_m < x_M\). Let \(y_0 \in [m,M]\). If \(y_0 = m\) or \(y_0 = M\), then \(y_0 = f(x_m)\) or \(y_0 = f(x_M)\). If \(m < y_0 < M\), then \(y_0\) lies strictly between \(f(x_m)\) and \(f(x_M)\). Since \(f\) is continuous on \([x_m,x_M]\), the Intermediate Value Theorem implies that there exists \(x_0 \in (x_m,x_M)\) such that

$$ \begin{align} y_0 = f(x_0) \in f((x_m,x_M)) \subseteq f([x_m,x_M]) \subseteq f([a,b]) \quad\quad\quad (3) \end{align} $$

Since \(y_0\in[m,M]\) was arbitrary, we conclude that \([m,M]\subseteq f([a,b])\). Therefore, by (2) and (3) \(f([a,b]) = [m, M]. \ \blacksquare\)


References