does there exist a function f that follows this sentence?: the domain of f is real number set, and f is continuous in every real number if x is a rational number, f(x) is an irrational number and if x is an irrational number, f(x) is a rational number
Asked
Active
Viewed 45 times
0
-
i meant continous in every real number – 김재현 Aug 22 '20 at 14:25
-
wow this is exactly the answer! thank you! – 김재현 Aug 22 '20 at 14:30
1 Answers
0
There is no such continuous function.Assume that $f$ is not constant.Note that $\mathbb{Q}$ is countable so $f(\mathbb{Q})$ is countable.And $f(\mathbb{R}-\mathbb{Q})\subset \mathbb{Q}$ so $f(\mathbb{R}-\mathbb{Q})$ is also countable.This means $f(\mathbb{R})$ is countable.But as $f$ is continuous so $f(\mathbb{R})$ must contain some intervals like $[a,b]$ and this will contradict the countability of $f(\mathbb{R})$.So $f$ must be constant but this will not hold beacause of the condition.
Tree23
- 1,198