Dirichlet function

of the set of rational numbers

It is named after the mathematician Peter Gustav Lejeune Dirichlet.

[3] It is an example of a pathological function which provides counterexamples to many situations.

For any real number x and any positive rational number T,

The Dirichlet function is therefore an example of a real periodic function which is not constant but whose set of periods, the set of rational numbers, is a dense subset of

Using an enumeration of the rational numbers between 0 and 1, we define the function fn (for all nonnegative integer n) as the indicator function of the set of the first n terms of this sequence of rational numbers.

The increasing sequence of functions fn (which are nonnegative, Riemann-integrable with a vanishing integral) pointwise converges to the Dirichlet function which is not Riemann-integrable.