Dirichlet Function — Definition, Formula & Examples
The Dirichlet function is a function that equals 1 at every rational number and 0 at every irrational number. It serves as a classic example of a function that is discontinuous everywhere.
The Dirichlet function is defined by if and if . Equivalently, is the indicator (characteristic) function of the rational numbers. It is nowhere continuous and is the standard example of a function that is Riemann non-integrable on any interval with , yet Lebesgue integrable with integral zero.
Key Formula
Where:
- = A real number
- = The set of all rational numbers
How It Works
Between any two real numbers, there exist both rationals and irrationals (density of and ). This means the Dirichlet function oscillates between 0 and 1 in every interval, no matter how small. Because of this, the function has no limit at any point, making it discontinuous everywhere. For Riemann integration, upper sums on any interval always equal the interval length while lower sums always equal zero, so the upper and lower Riemann integrals never agree. Under Lebesgue integration, since has measure zero, almost everywhere, giving .
Example
Problem: Show that the Dirichlet function is not Riemann integrable on [0, 1] by computing its upper and lower Darboux sums.
Step 1: For any partition of [0,1], every subinterval contains at least one rational number, so the supremum of D on each subinterval is 1. The upper Darboux sum equals the total length of the interval.
Step 2: Every subinterval also contains at least one irrational number, so the infimum of D on each subinterval is 0. The lower Darboux sum equals zero.
Step 3: Since the upper and lower Darboux integrals differ regardless of partition refinement, D fails the Riemann integrability criterion.
Answer: The Dirichlet function is not Riemann integrable on [0, 1] because its upper integral is 1 and its lower integral is 0.
Why It Matters
The Dirichlet function is a cornerstone counterexample in real analysis courses. It demonstrates why the Riemann integral has limitations and motivates the development of Lebesgue integration. Understanding it sharpens your intuition about continuity, measure, and the subtle structure of the real number line.
Common Mistakes
Mistake: Assuming the Dirichlet function is continuous at irrational points because 'most' nearby values are 0.
Correction: Every neighborhood of an irrational point contains rationals where D = 1, so the limit does not exist at any point. The function is discontinuous everywhere, not just at rationals.
