[Math] Difference between closed and open intervals for continuous functions

analysiscontinuitylimitsreal-analysis

Say I have a continuous function $f(x)$ on the open interval $(0, 1)$. There is no limit on how large $|f(x)|$ can be apart from the fact that it can't be infinity, it will always be a real number.

Now say I have a continuous function $f(x)$ on the closed interval $[0, 1]$. This too has no limit on how large $|f(x)|$ can be apart from the fact that it can't be infinity, it will always be a real number.

So it seems like there is no difference between them…and they are both unbounded? But from what I've read continuous functions on closed intervals are bounded…

This seems like a chicken and an egg scenario to me. Can anyone set me straight on the difference between continuous functions on open intervals vs. closed intervals?

Best Answer

The discrepancy you see is accounted for by the following fact: if $f$ is unbounded on $(0,1)$ then it has to be either undefined or discontinuous at $0$ or $1$, and hence is not defined (or not continuous) on $[0,1]$.

Consider $f(x)=\dfrac{1}{x}$. This function is unbounded on $(0,1)$, but it is not defined on $[0,1]$ because it takes no value at $x=0$.

The proof of this fact is a fairly simple consequence of the result that any continuous function $f : [a,b] \to \mathbb{R}$ is bounded. If $f$ is bounded on $[a,b]$ then it is too on $(a,b)$. So if a continuous function is unbounded on $(a,b)$ then it must not be defined (or, at least, not continuous) on $[a,b]$, or else it would contradict this result.

Intuitively, a continuous function is allowed to misbehave at the endpoints of an open interval (because it doesn't have to be defined at the endpoints), but it must behave itself on a closed interval because closed intervals contain their endpoints.