# On which of the following spaces is every continuous (real-valued) function bounded

On which of the following spaces is every continuous (real-valued) function bounded? i) $X_1 = (0, 1)$; ii) $X_2 = [0,1]$; iii) $X_3 = [0, 1)$; iv) $X_4 =\{t \in [0, 1] : t \mbox{ irrational}\}$.

(i) is not true: example $f(x)=\frac 1x$ . (ii) I think this is true as the interval is closed and bounded. (iii) is not true. Example: $f(x)=\frac 1{1-x}$. (iv) I think this is true as this is a subset of (ii).

Am I right?

-
Keep in mind that case (iv) doesn't actually include the endpoints. – Robert Mastragostino Sep 10 '12 at 5:59
You’re almost right: (iv) is false for the same reason that (1) or (3) is false. See @Robert’s comment. – Brian M. Scott Sep 10 '12 at 6:17
The endpoint argument is not the most important part for (iv) because $x\mapsto \frac1{2x-1}$ is not bounded, either. In other words: $[0,1]\cap \mathbb Q$ would have done as well because $x\mapsto\frac1{x\sqrt2 -1}$ is not bounded. – Hagen von Eitzen Sep 10 '12 at 6:29