0

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

1 Answers1

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