17
$\begingroup$

Let $f\colon[0,1]\to\mathbb{R}$ be continuous such that $f(x)\in\mathbb{Q}$ for any $x\in[0,1]$. Intuitively I feel that $f$ is constant, since $\mathbb{Q}$ is dense in $\mathbb{R}$.

How can I formally write this down?

$\endgroup$
7
  • 5
    $\begingroup$ It is constant, but not because $\mathbb{Q}$ is dense. It's constant because $\mathbb{Q}$ is totally disconnected but $[0,1]$ is connected. $\endgroup$ – Daniel Fischer Oct 10 '13 at 17:46
  • $\begingroup$ @DanielFischer with the mean value theorem, one could use density to prove it must pass through some irrational $\endgroup$ – Jean-Sébastien Oct 10 '13 at 17:50
  • $\begingroup$ @Jean-Sébastien That would use the denseness of $\mathbb{R}\setminus\mathbb{Q}$. $\endgroup$ – Daniel Fischer Oct 10 '13 at 17:51
  • $\begingroup$ @DanielFischer True enough! $\endgroup$ – Jean-Sébastien Oct 10 '13 at 17:52
  • 1
    $\begingroup$ @copper.hat I meant the intermediate value theorem. I somehow always confuse the name of these $\endgroup$ – Jean-Sébastien Oct 10 '13 at 18:18
20
$\begingroup$

Suppose $f$ isn't constant. Then for some $a,b\in[0,1],$ $f(a)\neq f(b);$ WLOG $f(a)<f(b)$.

Since $f$ is continuous, by the Intermediate Value Theorem, it must take every value in the interval $[f(a),f(b)]$. But this interval contains an irrational number (in fact, uncountably many of them). Contradiction.

This doesn't quite follow fron the fact that $\mathbb{Q}$ is dense in $\mathbb{R}$; it follows more from the density of the irrational numbers, the complement of $\mathbb{Q}$.

$\endgroup$
2
  • $\begingroup$ Hi, similar argument works if $f$ takes only irrational values, right? :) $\endgroup$ – Diya May 10 '15 at 16:30
  • 2
    $\begingroup$ True - the rational numbers are also dense in \mathbb{R}. $\endgroup$ – Albert Zhang May 12 '15 at 2:48
7
$\begingroup$

Hint: Use the intermediate value theorem

$\endgroup$
7
$\begingroup$

From an advanced standpoint, you know that $\mathbb{R}$ is connected. We know that $\mathbb{Q}$'s connected components are all singleton points. Since the image of the real line under any continuous function is connected, its image must be a point. Therefore it is constant.

$\endgroup$
1
$\begingroup$

Suppose $\alpha \notin \mathbb{Q}$. Let $A_\alpha = f^{-1} (-\infty, \alpha)$, $B_\alpha = f^{-1} (\alpha, \infty)$. Since $f$ is continuous, $A_\alpha,B_\alpha$ are open

Since $\alpha \notin f [0,1]$, we see that $[0,1] \subset A_\alpha \cup B_\alpha$, and since $[0,1]$ is connected, we must have $[0,1] \subset A_\alpha$ or $[0,1] \subset B_\alpha$.

Now suppose $f$ is not constant, then we have $q_1,q_2 \in f[0,1]$ for two rationals $q_1 < q_2$. Pick $\alpha \in (q_1,q_2) \setminus \mathbb{Q}$. Then, as above, we have $[0,1] \subset A_\alpha$ or $[0,1] \subset B_\alpha$. The first case implies $q_2 < \alpha$, the second case implies $q_1 > \alpha$, which is a contradiction. Hence $f$ is a constant.

The proof relies on three things, the continuity of $f$, the connectedness on $[0,1]$ and the fact that between any two distinct rationals there is an irrational.

$\endgroup$
1
$\begingroup$

by ways of contradiction assume $f$ is not constant .

$f$ is continuous on a closed and bounded interval then $f$ has absolute max and min .i.e.$\exists$ $x_0,y_0 \in [0,1]$ such that $f(x_0)\le f(x) \le f(y_0)$ $\forall x \in [0,1]$ from assumption $f(x_0)\ne f(y_0)$ and $f(x_0),f(y_0)$ are rational value (from question) by density theorem $\exists$ $r \in Q' $ such that $f(x_0)<r<f(y_0)$ then by intermediate value theorem $\exists c \in [0,1]$ such that $f(c)=r$ which contradicts with f has only rational value therefore $f$ is constant.

$\endgroup$
2
  • 1
    $\begingroup$ For some basic information about writing maths on this site see e.g. here, here, here and here. $\endgroup$ – Lord_Farin Jan 3 '15 at 10:36
  • $\begingroup$ thank you I think it's become most better $\endgroup$ – Safiyah Mohammed Jan 14 '15 at 22:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.