Real function continuous on closed interval implies it is bounded - over-simple proof??

So here is my proof, which after looking up others seems to be too simple, or not rigourous enough, though I don't see why (hence I am asking!):

We take the contrapositive, and so prove that if $f$ is unbounded on $[a,b]$, then it is not continuous on this interval.

By hypothesis, $\exists c \in [a,b] : \displaystyle\lim_{x\to c} f(x) = \infty \implies f(c)$ is undefined. (or, $ \displaystyle\lim_{x\to c} f(x) \not= f(c)$ so we get discontinuity instantly)

Since $f(c)$ doesn't exist, the definition of continuity cannot be applied so $f$ must be discontinuous at at least $x=c$, as required.


Solution 1:

The contrapositive you wrote down is incorrect, but the basic idea there can be adapted to give a proof, as I show below.

To be precise, what you wrote down is strictly stronger than the genuine contrapositive. To know that such a $c$ even exists, you need to use the sequential compactness of $[0,1]$. See the wiki on the Heine-Borel Theorem.

The original statement is that for a continuous map $f : [0,1] \rightarrow \mathbb{R}$, there exists a constant $M > 0$ such that $|f(x)| \leq M$ for all $x \in [0,1]$.

The structure of this sentence might seem peculiar from a natural-language standpoint, but it's precise enough that we can form a contrapositive: if a map $f : [0,1] \rightarrow \mathbb{R}$ has the property that for any $M > 0$ there exists $x \in [0,1]$ such that $|f(x)| > M$, then $f$ is not continuous.

Let's give a proof now. Suppose $f$ has this property. For each $M \in \mathbb{N}$, let $x_M$ denote any choice of an element of $[0,1]$ for which $|f(x_M)| > M$. The compactness of $[0,1]$ ensures the existence of a convergent subsequence $x_{M_k} \rightarrow x^* \in [0,1]$, where $M_k \rightarrow \infty$.

Apply the continuity of $f$ at $x^*$: $$ \infty > |f(x^*)| = \lim_{k \rightarrow \infty} |f(x_{M_k})| \geq \lim_{k \rightarrow \infty} M_k = \infty $$ which is a contradiction.

Solution 2:

This addresses the proof proposed by the OP, showing that there exists some positive functions $f$ unbounded on $[0,1]$ such that the assertion $\lim\limits_{x\to c}f(x)=+\infty$ does not hold.

Choose some irrational $z$ in $[0,1]$ and define $f$ on $[0,1]$ by $f(x)=0$ if $x$ is irrational and $f(x)=1/|x-z|$ if $x$ is rational.

Then, $f$ is unbounded while, for every $c$ in $[0,1]$ there exists some $x$ as close to $c$ as one desires such that $f(x)=0$. Hence $\lim\limits_{x\to c}f(x)=+\infty$ does not hold.

Solution 3:

Your argument is basically correct but the claim of the the existence of a $c$ such that $\displaystyle\lim_{x\to c} f(x) = \infty$ needs to be modified and justified. This does not follow immediately from the hypothesis that $f$ is unbounded. Namely, the unboundedness of $f$ implies the existence of a sequence $(x_i)$ such that $f(x_i)$ tends to infinity. However, the sequence may not be a convergent sequence. The fact that it contains a convergent subsequence is the key step in the proof. The existence of such a subsequence follows from the compactness of the interval. It follows that the limit $\displaystyle\lim_{x\to c} f(x)$ does not exist. Hence the function is not continuous at $c$.