In mathematics, the Dirichlet function is the indicator function 𝟏ℚ of the set of rational numbers ℚ over the set of real numbers ℝ, i.e. 𝟏ℚ(x)=1 for a real number x if x is a rational number and 𝟏ℚ(x)=0 if x is not a rational number (i.e. is an irrational number). 𝟏ℚ(x)={1x∈ℚ0x∉ℚ It is named after the mathematician Peter Gustav Lejeune Dirichlet. It is an example of a pathological function which provides counterexamples to many situations.
Topological properties
Periodicity For any real number x and any positive rational number T, 𝟏ℚ(x+T)=𝟏ℚ(x). 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 ℝ.
Integration properties
See also Thomae's function, a variation that is discontinuous only at the rational numbers.
References