Find a continuous differential function $f$ on $\mathbb{R}$ sastisfies the following conditions
$f(\mathbb{Q}) \subset \mathbb{Q}$
$f(\mathbb{R} \backslash \mathbb{Q}) \subset \mathbb{R} \backslash \mathbb{Q}$;
f' isn't constant.
Find a continuous differential function $f$ on $\mathbb{R}$ sastisfies the following conditions
$f(\mathbb{Q}) \subset \mathbb{Q}$
$f(\mathbb{R} \backslash \mathbb{Q}) \subset \mathbb{R} \backslash \mathbb{Q}$;
f' isn't constant.
I got it! $f(x)=\frac{x}{|x|+1}$
This seems like a homework question, and I assume that you meant to say "differentiable" function instead of "differential" function. $f(x)=\frac{1}{x}$ is close to what you need. A suitable modification of this function should provide you with the necessary example. Think "cut and paste." If this is not a homework question, please say so and I would be happy to provide more details.