# Find a continuous differential function

Find a continuous differential function $f$ on $\mathbb{R}$ sastisfies the following conditions

1. $f(\mathbb{Q}) \subset \mathbb{Q}$

2. $f(\mathbb{R} \backslash \mathbb{Q}) \subset \mathbb{R} \backslash \mathbb{Q}$;

3. $f'$ isn't constant.

-

## 2 Answers

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.

-
Thank you. This is not a homework question. This is a problem in Mathematical Competion for Student in China. I'd glad to see more details. –  Takasima Senko Mar 14 '12 at 9:49

I got it! $f(x)=\frac{x}{|x|+1}$

-