Thomae's function: Difference between revisions

Content deleted Content added
No edit summary
Tags: Mobile edit Mobile web edit Advanced mobile edit
Properties: proper
 
(43 intermediate revisions by 18 users not shown)
Line 1:
{{Short description|Function that is discontinuous at rationals and continuous at irrationals}}
{{CS1 config|mode=cs1}}
[[File:Thomae function (0,1).svg|200px|right|thumb|Point plot on the [[interval (mathematics)|interval]] (0,1). The topmost point in the middle shows ''f''(1/2) = 1/2.]]
 
'''Thomae's function''' is a [[real number|real]]-valued [[function (mathematics)|function]] of a real variable that can be defined as:<ref name="Beanland">{{Harvnbcite journal |last1=Beanland |first1=Kevin |last2=Roberts |first2=James W. |last3=Stevenson |first3=Craig |date=2009 |ptitle=531Modifications of Thomae's Function and Differentiability |journal=[[The American Mathematical Monthly]] |volume=116 |issue=6 |pages=531–535 |jstor=40391145 |doi=10.4169/193009709x470425}}</ref>{{rp|p=531}}
<math display="block">f(x) =
\begin{cases}
Line 9 ⟶ 10:
\end{cases}</math>
 
It is named after [[Carl Johannes Thomae]], but has many other names: the '''popcorn function''', the '''raindrop function''', the '''countable cloud function''', the '''modified [[Dirichlet function]]''', the '''ruler function''' (not to be confused with the integer [[ruler function]]),<ref>{{cite book |last=Dunham |first=William |author-link=William Dunham (mathematician) |year=2008 |title=The Calculus Gallery: Masterpieces from Newton to Lebesgue |publisher=Princeton University Press |___location=Princeton |isbn=978-0-691-13626-4 | quote="...the so-called ''ruler function'', a simple but provocative example that appeared in a work of Johannes Karl Thomae ... The graph suggests the vertical markings on a ruler—hence the name." |url={{HarvGoogle books|DunhamaYTYBQAAQBAJ|2008The Calculus Gallery|ppage=149|locplainurl=yes}} | at = page 149, chapter 10}}</ref> the '''Riemann function''', or the '''Stars over Babylon''' ([[John Horton Conway]]'s name).<ref>{{cite web | url=http://mathforum.org/kb/message.jspa?messageID=1375516 | title=Topic: Provenance of a function | author=John Conway | publisher=The Math Forum | archiveurl=https://web.archive.org/web/20180613235037/mathforum.org/kb/message.jspa?messageID=1375516 | archivedate=13 June 2018}}</ref> Thomae mentioned it as an example for an integrable function with infinitely many discontinuities in an early textbook on Riemann's notion of integration.<ref name="Thomae">{{cite book | last = Thomae | first = J. | year = 1875 | title = Einleitung in die Theorie der bestimmten Integrale | edition = | publisher = Verlag von Louis Nebert | ___location = Halle a/S | language = german | at = p. 14, §20}} <!-- author name as it appears in the (scanned) book --></ref>
|title=Topic: Provenance of a function
|author=John Conway
|publisher=The Math Forum
|archiveurl=https://web.archive.org/web/20180613235037/mathforum.org/kb/message.jspa?messageID=1375516
|archivedate=13 June 2018}}</ref> Thomae mentioned it as an example for an integrable function with infinitely many discontinuities in an early textbook on Riemann's notion of integration.<ref>{{Harvnb|Thomae|1875|p=14|loc=§20}}</ref>
 
Since every [[rational number]] has a unique representation with [[coprime integers|coprime]] (also termed relatively prime) <math>p \in \mathbb Z</math> and <math>q \in \mathbb N</math>, the function is [[well-defined]]. Note that <math>q = +1</math> is the only number in <math>\mathbb N</math> that is coprime to <math>p = 0.</math>
Line 21 ⟶ 17:
 
==Properties==
{{unordered list
*Thomae's function <math>f</math> is [[Bounded function|'''bounded''']] and maps all real numbers to the [[unit interval]]:<math>\;f: \mathbb R\; \to \;[0,\; 1].</math>
*|Thomae's function <math>f</math> is [[periodicBounded function|'''periodicbounded''']] withand periodmaps <math>1:\;all f(xreal +numbers n)to = f(x)</math> for allthe [[integerunit interval]]s:<math>f {{mvar|n}}: and\mathbb allR real\to {{mvar|x}}[0, 1].</math>
|<math>f</math> is [[periodic function|'''periodic''']] with period <math>1:\; f(x + n) = f(x)</math> for all [[integer]]s {{mvar|n}} and all real {{mvar|x}}.
{{Collapse top|title=Proof of periodicity|width=80%}}
Line 32 ⟶ 29:
{{Collapse bottom}}
 
*|<math>f</math> is [[Continuous function|'''discontinuous''']] at allevery rational numbersnumber, so its points of discontinuity are [[Dense orderset|dense]] within the real numbers.
 
{{Collapse top|title=Proof of discontinuity at rational numbers|width=80%}}
Line 39 ⟶ 36:
This establishes <math>f(x_0) = 1/q.</math>
 
Let <math>\;\alpha \in \mathbb R \smallsetminussetminus \mathbb Q\;</math> be any [[irrational number]] and define <math>x_n = x_0 + \frac{\alpha}{n}</math> for all <math>n \in \mathbb N.</math>
 
These <math>x_n</math> are all irrational, and so <math>f(x_n) = 0</math> for all <math>n \in \mathbb N.</math>
Line 52 ⟶ 49:
{{Collapse bottom}}
 
*|<math>f</math> is '''continuous''' at allevery [[irrational number]]s, alsoso its points of continuity are [[Dense set|dense]] within the real numbers.
 
{{Collapse top|title=Proof of continuity at irrational arguments|width=80%}}
Since <math>f</math> is periodic with period <math>1</math> and <math>0 \in \Q,</math> it suffices to check all irrational points in <math>I=(0,\;1).\;</math> Assume now <math>\varepsilon > 0,\; i \in \N</math> and <math>x_0 \in I \smallsetminussetminus \Q.</math> According to the [[Archimedean property]] of the reals, there exists <math>r \in \N</math> with <math>1/r < \varepsilon ,</math> and there exist <math>\; k_i \in \N,</math> such that
 
for <math>i = 1, \ldots, r</math> we have <math>0 < \frac{k_i}{i} < x_0 < \frac{k_i +1}{i}.</math>
 
The minimal distance of <math>x_0</math> to its ''i''-th lower and upper bounds equals
:<math display="block">d_i := \min\left\{\left|x_0 - \frac{k_i}{i}\right|,\; \left|x_0 - \frac{k_i + 1}{i}\right| \right\}.</math>
 
We define <math>\delta</math> as the minimum of all the finitely many <math>d_i.</math>
:<math display="block">\delta := \min_{1\le i\le r}\{d_i\},\;</math> so that
for all <math>i = 1, ...\dots, r,</math> <math>\quad |x_0 - k_i/i| \ge \delta\quad </math> and <math>\quad |x_0 - (k_i+1)/i| \ge \delta.</math>
 
for all <math>i = 1, ..., r,</math> <math>\quad |x_0 - k_i/i| \ge \delta\quad</math> and <math>\quad|x_0 - (k_i+1)/i| \ge \delta.</math>
 
This is to say, all these rational numbers <math> k_i/i,\;(k_i + 1)/i,\;</math> are outside the {{nowrap|<math>\delta</math>-neighborhood of <math>x_0.</math>}}
 
Now let <math>x \in \mathbb{Q} \cap (x_0 - \delta, x_0 + \delta)</math> with the unique representation <math>x = p/q</math> where <math> p, q \in \mathbb N</math> are coprime. Then, necessarily, <math> q > r,\;</math> and therefore,
:<math display="block">f(x)=1/q < 1/r < \varepsilon.</math>
 
Likewise, for all irrational <math> x \in I, \; f(x) = 0 = f(x_0),\;</math> and thus, if <math> \varepsilon > 0 </math> then any choice of (sufficiently small) <math>\delta > 0</math> gives
:<math display="block"> |x - x_0| < \delta \implies |f(x_0) - f(x)| = f(x) < \varepsilon.</math>
 
Therefore, <math>f</math> is continuous on <math> \mathbb R \smallsetminussetminus \mathbb Q.\quad</math>
{{Collapse bottom}}
 
*|<math>f</math> is '''nowhere differentiable'''.
 
{{Collapse top|title=Proof of being nowhere differentiable|width=80%}}
:* For rational numbers, this follows from non-continuity.
:* For irrational numbers:
 
*:For any [[sequence]] of irrational numbers <math>(a_n)_{n=1}^\infty</math> with <math>a_n \ne x_0</math> for all <math>n \in \mathbb{N}_{+}</math> that converges to the irrational point <math>x_0</math>, the sequence <math>(f(a_n))_{n=1}^\infty</math> is identically <math>0</math>, and so <math>\lim_{n \to \infty}\left|\frac{f(a_n)-f(x_0)}{a_n - x_0}\right| = 0</math>.
:* For irrational numbers:
*::For anyOn the other hand, consider the [[sequence]] of irrationalrational numbers <math>(a_nb_n)_{n=1}^{\infty}</math> with <math>a_nb_n = \nelfloor x_0nx_0\rfloor/n</math>, for allwhere <math>n \inlfloor nx_0\mathbb{N}_{+}rfloor</math> thatdenotes convergesthe to[[Floor theand irrationalceiling pointfunctions|floor]] of <math>x_0,nx_0</math>. Since <math>nx_0-1<\;lfloor nx_0\rfloor\le nx_0</math>, the sequence <math>(f(a_n)b_n)_{n=1}^{\infty}</math> isconverges identicallyto <math>0,\;x_0</math> andusing sothe [[Squeeze theorem]]. Also, <math>\lim_{n|b_n-x_0| \to= \infty}\left|\frac{f(a_n)-f(x_0)}{a_nlfloor nx_0\rfloor/n - x_0}\right| = 0.|\lfloor nx_0\rfloor - nx_0|/n \le 1/n</math> for all <math>n</math>.
*:: Thus for all <math>n,</math>, <math>\left| \frac{f(b_n)-f(x_0)}{b_n - x_0} \right| >\ge \frac{1/n - 0}{1/(n} = 1</math>. Therefore we obtain <math>\sqrtliminf_{5n\to\infty} \cdotleft| n^2\frac{f(b_n)-f(x_0)} =\sqrt{5b_n-x_0} \cdotright| n\ge 1 \ne 0\;</math> and so {{nowrap|<math>f</math> is not differentiable}} at allany irrational number <math>x_0.</math>.
 
::According to [[Hurwitz's theorem (number theory)|Hurwitz's theorem]], there also exists a sequence of rational numbers <math>(b_n)_{n=1}^{\infty} = (k_n/n)_{n=1}^\infty,\;</math> converging to <math>x_0,\; </math> with <math>k_n \in \mathbb Z</math> and <math>n \in \mathbb N</math> coprime and <math>|k_n/n - x_0| < \frac{1}{\sqrt{5}\cdot n^2}.\;</math>
 
::Thus for all <math>n,</math> <math>\left|\frac{f(b_n)-f(x_0)}{b_n - x_0} \right| > \frac{1/n - 0}{1/(\sqrt{5}\cdot n^2)} =\sqrt{5}\cdot n \ne 0\;</math> and so {{nowrap|<math>f</math> is not differentiable}} at all irrational <math>x_0.</math>
{{Collapse bottom}}
 
*|<math>f</math> has a strictproper '''[[maxima and minima|local maximum]]''' at each rational number, providing an example of a function with a dense set of proper local maxima.<ref>{{citationcite neededjournal|title=Solution to Problem 1129|first=Paolo|last=Perfetti|department=Problem Department|journal=Pi Mu Epsilon Journal|volume=12|issue=5|date=SeptemberFall 20172006|pages=301–319|jstor=24337958}} Perfetti supplies the negation of Thomae's function as an example with a dense set of proper local minima.</ref>
{{pb}}
::See the proofs for continuity and discontinuity above for the construction of appropriate [[neighborhood (mathematics)|neighbourhoods]], {{nowrap|where <math>f</math> has}} maxima.
 
*|<math>f</math> is '''[[Riemann integrable]]''' on any interval and the integral evaluates to <math>0</math> over any set.
{{pb}}
::The [[Lebesgue integrability condition|Lebesgue criterion for integrability]] states that a bounded function is Riemann integrable if and only if the set of all discontinuities has [[Lebesgue measure|measure zero]].<ref>{{Harvnbcite book | last = Spivak | first = M. | author-link = Michael Spivak |year=1965 |ptitle=53Calculus on manifolds |locpublisher=Perseus Books | isbn = 978-0-8053-9021-6 | at = page 53, Theorem 3-8}}</ref> Every [[countability|countable]] subset of the real numbers - such as the rational numbers - has measure zero, so the above discussion shows that Thomae's function is Riemann integrable on any interval. The function's integral is equal to <math>0</math> over any set because the function is equal to zero ''[[almost everywhere]]''.
 
*|If <math>G = \{ \, (x,f(x)) : x \in (0,1) \, \} \subset \mathbb{R}^2</math> is the graph of the restriction of <math>f</math> to <math>(0,1)</math>, then the [[Minkowski–Bouligand dimension|'''box-counting dimension''']] of <math>G</math> is <math>4/3</math>.<ref>{{cite journal |last1=Chen |first1=Haipeng |last2=Fraser |first2=Jonathan M. |last3=Yu |first3=Han |year=2022 |title=Dimensions of the popcorn graph |journal=[[Proceedings of the American Mathematical Society]] |volume=150 |number=11 |pages=4729–4742 |doi=10.1090/proc/15729 |arxiv=2007.08407}}</ref>
::The [[Lebesgue integrability condition|Lebesgue criterion for integrability]] states that a bounded function is Riemann integrable if and only if the set of all discontinuities has [[Lebesgue measure|measure zero]].<ref>{{Harvnb|Spivak|1965|p=53|loc=Theorem 3-8}}</ref> Every [[countability|countable]] subset of the real numbers - such as the rational numbers - has measure zero, so the above discussion shows that Thomae's function is Riemann integrable on any interval. The function's integral is equal to <math>0</math> over any set because the function is equal to zero ''[[almost everywhere]]''.
}}
 
*If <math>G = \{ \, (x,f(x)) : x \in (0,1) \, \} \subset \mathbb{R}^2</math> is the graph of the restriction of <math>f</math> to <math>(0,1)</math>, then the [[Minkowski–Bouligand dimension|'''box-counting dimension''']] of <math>G</math> is <math>4/3</math>.<ref>{{cite journal |last1=Chen |first1=Haipeng |last2=Fraser |first2=Jonathan M. |last3=Yu |first3=Han |year=2022 |title=Dimensions of the popcorn graph |journal=[[Proceedings of the American Mathematical Society]] |volume=150 |number=11 |pages=4729–4742 |doi=10.1090/proc/15729 |arxiv=2007.08407}}</ref>
 
==Related probability distributions==
Empirical probability distributions related to Thomae's function appear in [[DNA sequencing]].<ref name="Trifonov">{{cite journal |last1=Trifonov |first1=Vladimir |last2=Pasqualucci |first2=Laura |last3=Dalla-Favera |first3=Riccardo |last4=Rabadan |first4=Raul |year=2011 |title=Fractal-like Distributions over the Rational Numbers in High-throughput Biological and Clinical Data |journal=Scientific Reports |volume=1 |number=191 |page=191 |doi=10.1038/srep00191 |pmid=22355706 |pmc=3240948|arxiv=1010.4328 |bibcode=2011NatSR...1E.191T }}</ref> The human genome is [[diploid]], having two strands per chromosome. When sequenced, small pieces ("reads") are generated: for each spot on the genome, an integer number of reads overlap with it. Their ratio is a rational number, and typically distributed similarly to Thomae's function.
 
If pairs of positive integers <math>m, n</math> are sampled from a distribution <math>f(n,m)</math> and used to generate ratios <math>q=n/(n+m)</math>, this gives rise to a distribution <math>g(q)</math> on the rational numbers. If the integers are independent the distribution can be viewed as a [[convolution]] over the rational numbers, <math display="inline">g(a/(a+b)) = \sum_{t=1}^\infty f(ta)f(tb)</math>. Closed form solutions exist for [[power-law]] distributions with a cut-off. If <math>f(k) =k^{-\alpha} e^{-\beta k}/\mathrm{Li}_\alpha(e^{-\beta})</math> (where <math>\mathrm{Li}_\alpha</math> is the [[polylogarithm]] function) then <math>g(a/(a+b)) = (ab)^{-\alpha} \mathrm{Li}_{2\alpha}(e^{-(a+b)\beta})/\mathrm{Li}^2_{\alpha}(e^{-\beta})</math>. In the case of uniform distributions on the set <math>\{1,2,\ldots , L\}</math> <math>g(a/(a+b)) = (1/L^2) \lfloor L/\max(a,b) \rfloor</math>, which is very similar to Thomae's function.<ref name="Trifonov" />
 
==The ruler function==
Line 129 ⟶ 124:
* [[Volterra's function]]
 
==NotesReferences==
{{reflist}}
 
==ReferencesFurther reading==
{{refbegin}}
*{{citation|last=Thomae |first=J. |year=1875 |title=Einleitung in die Theorie der bestimmten Integrale |edition= |publisher=Verlag von Louis Nebert |___location=Halle a/S |language=german}} <!-- author name as it appears in the (scanned) book -->
*{{citation|last=Abbott |first=Stephen |year=2016 |title=Understanding Analysis |edition=Softcover reprint of the original 2nd |publisher=[[Springer Science+Business Media|Springer]] |___location=New York |isbn=978-1-4939-5026-3}}
*{{citation |last1=Bartle |first1=Robert G. |last2=Sherbert |first2=Donald R. |year=1999 |title=Introduction to Real Analysis |edition=3rd |publisher=Wiley |isbn=978-0-471-32148-4 |url-access=registration |url=https://archive.org/details/introductiontore00bart_1 }} (Example 5.1.6 (h))
*{{Citation |last1=Beanland |first1=Kevin |last2=Roberts |first2=James W. |last3=Stevenson |first3=Craig |date=2009 |title=Modifications of Thomae's Function and Differentiability |journal=The American Mathematical Monthly |volume=116 |issue=6 |pages=531–535 |jstor=40391145 |doi=10.4169/193009709x470425}}
*{{Citation |last=Dunham |first=William |author-link=William Dunham (mathematician) |year=2008 |title=The Calculus Gallery: Masterpieces from Newton to Lebesgue |publisher=Princeton University Press |___location=Princeton |edition=Paperback |isbn=978-0-691-13626-4 |url={{Google books|aYTYBQAAQBAJ|The Calculus Gallery|page=149|plainurl=yes}}}}
*{{citation |last=Spivak |first=M. |authorlink=Michael Spivak |year=1965 |title=Calculus on manifolds |publisher=Perseus Books |isbn=978-0-8053-9021-6}}
{{refend}}
 
Line 147 ⟶ 138:
 
[[Category:Calculus]]
[[Category:Eponymous functions]]
[[Category:Fractals]]
[[Category:General topology]]
[[Category:Special functions]]