Exercise 78Calculus › Single-variable calculus › Continuity › Continuous and discontinuous functionsL1Added 2 Nov 2026
Glued along the rationals and the irrationals
#continuity#density#sequences#pathological functions
Statement
Let be continuous, and define if is rational, if is irrational. Prove that is continuous at a point if and only if .
Hint
() Approach along rationals and along irrationals. () Use the definition with and take the smaller of two .
Show solutionHide solution
Solution
() Suppose is continuous at . Take rationals and irrationals (possible by density). Then and . By continuity of at , both sequences and tend to . So .
() Suppose . Then whichever kind of number is. Let . By continuity of and at there exist with when , and when . With , for the value is either or , so .
Example. If and , then is continuous exactly at and , where .