Continuous function which is always rational Let $f:\mathbb{R} \to \mathbb{R} $ be a continuous function such that $f(x) \in \mathbb{Q} $, $\forall x\in \mathbb{R} $. Is it true that the only functions with this property are the constant functions? Intuitively, I believe it is, but I am not sure.
EDIT: I had a typo, the relation holds $\forall x\in \mathbb{R} $. I am sorry for my mistake. 

No, $f(x)$ could be any polynomial function with rational coefficients.  Polynomial functions are continuous, and a polynomial with rational coefficients evaluated at a rational number is rational.
