# Dirichlet function

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.

The Dirichlet function (after the German mathematician Peter Gustav Lejeune Dirichlet , sometimes also called Dirichlet's step function ) is a mathematical function . One of its properties is to be Lebesgue-integrable, but not Riemann-integrable.

## definition

The Dirichlet function is usually referred to as. It is the characteristic function of the rational numbers as a subset of the real numbers. Thus it is defined as: ${\ displaystyle D}$

${\ displaystyle D \ colon \ mathbb {R} \ to \ mathbb {R}, \ quad x \ mapsto D (x) = {\ begin {cases} 1, & {\ mbox {if}} x {\ mbox { rational,}} \\ 0, & {\ mbox {if}} x {\ mbox {irrational.}} \ end {cases}}}$

## properties

The Dirichlet function is an example of

${\ displaystyle D (x) = \ lim _ {m \ to \ infty} \ lim _ {n \ to \ infty} \ cos ^ {2n} (m! \ pi x)}$,

## Riemann integrability

The Dirichlet function cannot be Riemann-integrable in any real interval , since there are always rational as well as irrational numbers in the sub-interval for every decomposition and thus ${\ displaystyle Z}$${\ displaystyle \ left [x_ {k-1}, x_ {k} \ right]}$

the sub-total ${\ displaystyle U (Z) = \ sum _ {k = 1} ^ {n} (x_ {k} -x_ {k-1}) \ cdot \ inf _ {x_ {k-1}

is always 0 (because the infimum is always 0) and

the upper total ${\ displaystyle O (Z) = \ sum _ {k = 1} ^ {n} (x_ {k} -x_ {k-1}) \ cdot \ sup _ {x_ {k-1}

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:

${\ displaystyle {\ begin {matrix} {\ text {upper integral}} & = & {\ text {kl. Upper total}} & = & {\ text {gr. Sub-total}} & = & {\ text {Sub-integral}} \\ {\ overline {\ int \ limits _ {a} ^ {b}}} f (x) \, \ mathrm {d} x & = & \ inf _ {Z} O (Z) & = & \ sup _ {Z} U (Z) & = & {\ underline {\ int \ limits _ {a} ^ {b}}} f (x) \, \ mathrm { d} x \ end {matrix}}}$

But since the upper and lower sums do not converge to the same value for any decomposition , Riemann cannot be integrated on any interval. ${\ displaystyle D}$

## Lebesgue integrability

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: ${\ displaystyle I}$

${\ displaystyle \ int _ {I} D {\ mathrm {d}} \ lambda = 0 \ cdot \ lambda (I \ cap \ mathbb {R} \ setminus \ mathbb {Q}) +1 \ cdot \ lambda (I \ cap \ mathbb {Q})}$,

where stands for the Lebesgue measure . ${\ displaystyle \ lambda}$

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. ${\ displaystyle \ lambda (I \ cap \ mathbb {R} \ setminus \ mathbb {Q})}$${\ displaystyle \ lambda (I \ cap \ mathbb {Q})}$${\ displaystyle \ mathbb {Q}}$${\ displaystyle \ lambda}$

Overall, this results in the Dirichlet function in each interval:

${\ displaystyle \ int _ {I} D {\ mathrm {d}} \ lambda = 0}$.

## Related function

A related function is defined as follows: ${\ displaystyle [0; 1]}$

${\ displaystyle f (x): = {\ begin {cases} 1, & {\ mbox {if}} x = 0, \\ 0, & {\ mbox {if}} x {\ mbox {irrational,}} \\ {\ frac {1} {q}}, & {\ mbox {if}} x = {\ frac {p} {q}} {\ mbox {with}} p, q \ in \ mathbb {N} {\ mbox {and}} \ operatorname {ggT} (p, q) = 1. \ end {cases}}}$

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:

${\ displaystyle \ int \ limits _ {0} ^ {1} f (x) {\ mathrm {d}} x = 0}$.

It is called, for example, the Thoma's function .