Let $f: [a, b]\to \mathbb R$ be a continuous function such that for all $r\in\mathbb R$, $f(r)$ is rational iff $r$ is rational. Does it follow that $f$ is a rational function?
-
5Do you consider $f(x)=|x|$ a rational function? – ajotatxe Dec 18 '14 at 19:52
-
1This might help : Please click here – chandu1729 Dec 18 '14 at 20:04
1 Answers
EDIT: I missed the "iff" in the original question. As such, the answer below is not correct, it provides examples of functions where $f(r)$ is rational if $r$ is rational, but not necessarily only for rational $r$. Piecewise linear functions still work, though, for more complicated examples see this MathOverflow thread
It does not have to be, any continuous and piecewise rational function with rational coefficients will do this, too. And there are even weirder functions, using very non-explicit constructions. E.g., Cantor showed that any densely ordered countable set without endpoints has the order type of the rationals. So if you take any dense subset $S \subseteq \mathbb{Q}$, there is a strictly increasing homeomorphism $f:\mathbb{Q} \to S$ which extends by continuity to a homeomorphism of the real line to itself which maps rational numbers to rational numbers. By choosing $S$ in weird ways, you can make sure that $f$ is not a rational function on any interval.
- 18,259
-
1
-
Rational functions with rational coefficients do work, but these constructions show that there are many more examples. – Lukas Geyer Dec 18 '14 at 20:17
-
1$x^2$ is a rational function with rational coefficients. It sends some irrational numbers to rational numbers. – Jonas Meyer Dec 18 '14 at 20:19
-