Suppose f : [a, b] → R is continuous and that f([a, b]) is a subset of Q. Prove that f is constant on [a, b].
You are gonna want to use the fact that a continuous image of a connected set is connected (intervals are connected).
If it is not constant, then there are x<y in the interval for which . But as the irrationals are dense in the reals, you can be sure you can find an irrational number between these two values . But this is not in . But then you would have a separation of the image of the connected interval at . Think you can fill in the details?
Basically, the continuous image of a closed bounded interval is a closed bounded interval.
Closed bounded intervals are compact and connected. The continuous image of a compact set is compact. And the continuous image of a connected set is connected.
But the image of [a,b] under this map is assumed to be a subset of the rational numbers. The rational numbers are in fact totally disconnected in the reals, because between any two rational numbers you can always find an irrational number.
So basically the idea is take f([a,b]) it will be a closed bounded interval in the reals say [c,d] because f is continuous. We want to show basically that d must in fact be c and this map is really just a constant map to c.
Well suppose d>c. Then there is an irrational number call it x between c and d. c<x<d. But then simply consider and these form a separation of [c,d] making in not connected which is a contradiction.