I recently started learning real analysis. At the moment, I am trying to prove the boundedness theorem, i.e.,
$$ f \text{ continuous on } [a, b] \implies f \text{ bounded above on } [a, b].$$
I am aware that there are many proofs of this theorem around the internet but I just want to check something in my attempt. I am not sure whether the part in my proof where I show $ \alpha = b$ is acceptable. Could someone help confirm whether it works? I would also appreciate any comment on the entire proof. Thanks a lot.
Proof: Let $A = \left\{ x | a \leq x \leq b, f \text{ bounded above on } [a, x] \right\}$ which is non-empty (because $a \in A$) and bounded above by definition. By the Axiom of $\mathbb{R}$, $A$ has a supremum. Let $\alpha = \sup A$.
First, we show that $f$ is bounded above on $[a, \alpha]$. Since $f$ is continuous at $\alpha$, it follows that there exists $\delta > 0$ such that $x \in (\alpha - \delta, \alpha + \delta)$ implies $f(x) \in (f(\alpha) - 1, f(\alpha) + 1)$. Since $\alpha = \sup A$, there exists $x_0 \in A$ such that $x_0 \in (\alpha - \delta, \alpha]$. Otherwise, $x \notin (\alpha - \delta, \alpha]$ for every $x \in A$ which implies that $\alpha - \delta$ is an upper bound for $A$. But this would contradict our assumption that $\alpha = \sup A$. Because $x_0 \in A$ and $x_0 \in (\alpha - \delta, \alpha]$, it follows that $f$ is bounded above on $[a, \alpha]$.
It remains that we show $\alpha = b$. Since $\alpha = \sup A$ and $b$ is an upper bound for $A$, it follows that either $\alpha < b$ or $\alpha = b$. Suppose for the sake of contradiction, $\alpha < b$. As $f$ is continuous at $\alpha$, there exists $\delta > 0$ such that $x \in (\alpha - \delta, \alpha + \delta)$ implies $f(x) \in (f(\alpha) - 1, f(\alpha) + 1)$. Let $c = \min\left\{\frac{\delta}{2}, \frac{b - \alpha}{2}\right\}$. (maybe we don't need $\frac{b - \alpha}{2}$ as $b - \alpha$ would be sufficient?) Then $\alpha + c \in A$ because $a \leq \alpha + c \leq b$, $f$ is bounded above on $[a, \alpha]$, and $f$ is bounded above on $[\alpha, \alpha + c]$. But this contradicts our assumption that $\alpha = \sup A$. Hence, $\alpha = b$. $\square$
Here is another approach for the sake of curiosity.
Since $[a,b]\subset\mathbb{R}$ is closed and bounded, it is also compact.
Given that $f$ is continuous, it maps compact sets onto compact sets.
Consequently $f([a,b])$ is compact, which implies it is also closed and bounded.
Hopefully this helps!