# Real analysis question about boundedness

In real analysis courses, students are often taught a theorem which states that:

If $f$ is a real valued continuous function on $[0,1]$, then $f$ is bounded there

and the example $f(x)=\frac{1}{x}$ is often used to illustrate this point. I've seen the proof using compactness, but the theorem itself never made much sense to be because isn't $f(x)=\frac{1}{x}$ discontinuous at $0$ since $$\lim_{x\rightarrow 0+}f(x) \neq \lim_{x\rightarrow 0-}f(x)$$.

The theorem is said not to hold if the interval $(0,1)$ was used instead but it seems really counterintuitive to me.

-

The function $f(x)=\frac{1}{x}$ is continuous on the interval $(0,1)$ but not bounded so it is a counterexample. It is also true that the theorem fails for intervals of the form $(0,1]$ and $[0,1)$ for a similar reason. To see this consider functions like $\frac{1}{x}$ and $\frac{1}{1-x}$ respectively.
I never understood why it was bounded on $[0,1]$ since the discontinuity is at $0$ –  Millardo Peacecraft Aug 6 at 22:35
It is continuous where defined on $[0,1]$, but is undefined at $0$. However, it is not bounded on $[0,1]$, and so is a rather poor choice of example (Being that it isn't an example at all). –  qaphla Aug 6 at 22:37
It is not bounded on $[0,1]$ because it tends to $\infty$ as $x$ tends to $0$. You could redefine the function at $x=0$ but it could never be continuous. The theorem says the function must be continuously defined on all of $[0,1]$ to hold. –  user71352 Aug 6 at 22:37
@MillardoPeacecraft Well if you are defining the function only on $[0,1]$ then there really is no left limit at $x=0$. However, when left and right limits do not agree this means the function is not continuous at that point. The function is an example of being continuous and not bounded on $(0,1)$ since the function is defined and continuous in this region but not bounded. –  user71352 Aug 6 at 22:56