Find all continuous functions $f:R \rightarrow R$ which take irrational values only at rational points and not at irrational points.

589 Views Asked by At

Find all continuous functions $f:R \rightarrow R$ which take irrational values only at rational points and not at irrational points.

My approach: We know that image of a continuous map from $R \rightarrow R$ (connected set) to an interval or singleton. In case of non-constant and continuous map, it cant map to singleton thus it maps to interval which is uncountable where as $f(R)=f(Q) \cup f(Q^c)\subseteq f(Q) \cup Q$ is countable, hence a contradiction.

My question is: Does there exist a constant continuous map satisfying above condition? If not then how to reject it.