Graphical representation of the Dirichlet function, two parallel, apparently solid lines. The blue (or red) line represents the rational (or irrational) numbers lying close together in the real numbers . The graph contains along the blue (or red) line uncountable (or countable ) many holes without extension, which is why they are not visible in the representation.
is always the length of the interval over which integration takes place (because the supremum is always 1 and thus the length of the individual sub-intervals is simply added).
Riemann integrability, however, requires equality, so that:
But since the upper and lower sums do not converge to the same value for any decomposition , Riemann cannot be integrated on any interval.
Since the Dirichlet function is a simple function , i.e. a measurable function that only takes a finite number of values that are not negative, the Lebesgue integral can be written over any interval as follows:
For any given value of , multiplication by 0 produces the result 0. Due to a convention in measurement theory, this also applies if the other factor is infinite. In contrast to this, it is always 0, since the point set of rational numbers is countable and is therefore a zero set.
Overall, this results in the Dirichlet function in each interval:
A related function is defined as follows:
It is discontinuous at every rational point in its domain of definition and continuous at every irrational point and, in contrast to the Dirichlet function, also Riemann-integrable: