Exercise 354Calculus › Single-variable calculus › Continuity › Continuous and discontinuous functionsL1Added 2 Nov 2026
A continuous function that vanishes on the rationals
#density#continuity#sequences
Statement
- Let be continuous with for every rational . Prove that .
- Deduce that two continuous functions which agree on are equal.
Hint
Every real number is a limit of rational numbers (for instance its decimal truncations). Use the sequential characterisation of continuity.
Show solutionHide solution
Solution
1. Let . Take , a rational number with , so . Since is continuous at , . But for all , so .
2. Apply part 1 to the continuous function , which vanishes on .
Remark. A continuous function is entirely determined by its values on a dense set. This is the principle used to define for real : we know for rational , and there is only one continuous way to fill the gaps. Without continuity the statement is false: the Dirichlet-type function vanishes on without being .