The Dirichlet function for distinct real numbers and (usually taken as and ) is defined by
(1)
and is discontinuous everywhere. The Dirichlet
function can be written analytically as
(2)
The name "Dirichlet function" has also been applied to the related Thomae function, more specifically called the modified Dirichlet function (Bruckner
et al. 2008). Unlike the function defined above, the Thomae
function is continuous at every irrational
number.
Bruckner, A.; Bruckner, J.; and Thomson, B. Elementary Real Analysis, 2nd ed. Upper Saddle River, NJ: Prentice Hall, 2008.Tall,
D. "The Gradient of a Graph." Math. Teaching111, 48-52,
1985.Trott, M. The
Mathematica GuideBook for Programming. New York: Springer-Verlag, pp. 32-33,
2004. https://www.mathematicaguidebooks.org/.