= Thomae function
{c}
{title2=$t(p/q)=1/q,\quad t(x)=0\ (x\notin\mathbb Q)$}
{wiki}
The <Thomae function> on the <real line> is $t(x)=0$ at irrational $x$ and $t(p/q)=1/q$ for a rational written in lowest terms with $q>0$. It is continuous at every irrational point and discontinuous at every <rational point>.
To see <continuity> at an irrational $a$, choose $Q>1/\epsilon$. In any bounded neighborhood there are only finitely many reduced rationals with denominator at most $Q$; avoid them with a smaller neighborhood of $a$. All remaining values are less than $\epsilon$. At rational $p/q$, irrational points approaching it have value zero instead of $1/q$. Despite these dense discontinuities, the <function> is <Riemann integrable> on every closed finite interval, with <integral> zero.
Back to article page