I am curious to find if there is a characterization of the set $S$ of all functions $f: \mathbb{Q} \to \mathbb{Q}$ where for all intervals $[a,b] \subset \mathbb{Q}$, there exists $x \in [a,b]$ for every $y$ between $f(a)$ and $f(b)$ such that $f(x) = y$.
We see $f(x) = x$ has $f \in S$ since for any $y \in [f(a),f(b)] \subset \mathbb{Q}$ we can choose $x = y$ to have $f(x) = y$.
For a non example, take $f(x) = x^2$ and $[f(0),f(2)] = [0,4]$. We have $2 \in [0,4]$, but $f(x) = 2$ has no solutions. Similarly, $f(x) = x^n \not \in S$ for $n > 1$.
From the lemmas I've found so far, I conjecture $S$ is made up of piecewise defined functions of the form $a(x-b)^n+c$ for $a,b,c \in \mathbb{Q}$ and $n \in \{-1,0,1\}$ with appropreate care taken to deal with discontinuities.
Here are my questions
- Do we miss anything restricting to piecewise rational functions $p(x)/q(x)$?
- Supposing $f(x), g(x) \not \in S$, can we show $f(x) + g(x) \not \in S$
- Is this well known appearing in a book somewhere?
- Is the corresponding question for number fields well known?