The Dirichlet function has no limit anywhere
Statement
The Dirichlet function is , with if is rational and if is irrational. Prove that for every real number , has no limit at .
Hint
Between any two distinct real numbers there is a rational number and an irrational number. Use this to build two sequences converging to .
Show solutionHide solution
Solution
Idea. Near any point, the function keeps jumping between and in an extremely dense way. Two sequences, one made of rationals and one of irrationals, will reveal it.
Two sequences. Fix . For every , the interval contains a rational number and an irrational number . Then and .
Values. for all , so . And for all , so .
Conclusion. If had a limit at , both and would equal . This is impossible, so has no limit at any point .
Remark. In particular is not continuous anywhere. The problem " times the Dirichlet function" shows how multiplying by changes this.