I just practicing the multiple choice questions on analysis and saw this question and stuck there from hours.
Question: let $f:\mathbb{R} →\mathbb{R}$ be a continuous function. If $f(\mathbb{Q})⊆ \mathbb{N}$ then choose the correct of following.
a)$f(\mathbb{R}) = \mathbb{N}$
b) $f(\mathbb{R}) ⊆ \mathbb{N}$ but $f$ need not be constant.
c) $f$ is unbounded.
d) $f$ is constant function.
I know, if $f$ is continuous map from connected subset $M$ of $\mathbb{R}$ to $\mathbb{R}$ then its image $f(M)$ must be connected subset of $\mathbb{R}$. But don't know, is there is any use of this result here? and How to discard wrong options? Please help me.
For irrational $q$, choose $(p_{n})$, $p_{n}$ rational such that $p_{n}\rightarrow q$. Since $f$ is continuous, then $f(p_{n})\rightarrow f(q)$. But $f(p_{n})$ are all natural numbers, the only convergent sequences in natural numbers are those constant sequences, so $f(q)$ is a natural number.
Now apply Intermediate Value Theorem to deduce that $f$ is actually a constant function:
For suppose $f$ is not constant, say, $f(a)=n$ and $f(b)=m$ with $a<b$, $n,m$ are natural numbers, pick a non-natural number $\eta$ in between $n,m$, then by Intermediate Value Theorem, $f$ assumes the value $\eta$, but this is a contradiction since the range of $f$ is contained in all the natural numbers.