Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need some ideas to start with this problem. Show that the modified Dirichlet function defined as $D_M(x)=\begin{cases}0&\mbox{if }x \notin \mathbb{Q} , \\ \frac{1}{b}&\mbox{for } x = \frac{a}{b} \mbox {with}\gcd(a,b) = 1\;.\end{cases}$

Is not differentiable for any $x_0 \in(c,d)\subset\mathbb{R}$

share|cite|improve this question
@Vicfred: I'm not familiar with differentiation, but let me still try to help: If your second condition means that $x_0$ must be differentiable for some interval $(c,d)$, and if as wikipedia says some function is differentiable only where it's continuous, then you should consider where $D_M$ is continuous. Namely, consider whether it is continuous at rationals and irrationals, and if it's discontinuous at one of them, then it is not going to be differentiable as every interval will contain both rationals and irrationals. – user5501 Apr 9 '11 at 7:01
@Lovre: a) It doesn't make sense to say $x_0$ must be differentiable for some interval $(c,d)$; it's the function, not the value of $x$ that's differentiable (or not). b) If you replace $x_0$ by $D_M$, the statement is still false, since the question asks whether $D_m$ is differentiable for any $x_0\in(c,d)$, not for all. Thus, your approach doesn't work, since the function is discontinuous at the rationals, but continuous at the irrationals. – joriki Apr 9 '11 at 7:11
@Vicfred: For irrational $x$, you could consider the sequence of odd multiples of $2^{-n}$ closest to $x$. – joriki Apr 9 '11 at 7:12
@joriki: a) Yeah, I meant to write $D_M$ there, not $x_0$. b) Well, to be honest if that is interpretation then I don't see the point of writing it as that, he could have just written that $x_0 \in \mathbb{R}$. Thus I interpreted it as saying "is there any interval for which all $x_0$ in that interval are differentiable". – user5501 Apr 9 '11 at 7:19
@Lovre: I agree that there's no point in writing it like that, but that doesn't mean that you can interpret it as something other than what it means :-) – joriki Apr 9 '11 at 7:23
up vote 3 down vote accepted

We only need to check this for irrational numbers (since they are continuity points).

So let $x_0\notin\mathbb Q$. We ask whether the limit $$\lim_{x\to x_0} \frac{f(x)-f(x_0)}{x-x_0}$$ exists.

Now, if $x\notin\mathbb Q$ then $\frac{f(x)-f(x_0)}{x-x_0}=0$.

For rationals we use Dirichlet's approximation theorem: For a given irrational $x_0$, the inequality $$\left| x_0 -\frac{p}{q} \right| < \frac{1}{q^2}$$ is satisfied by infinitely many integers p and q.

Now, for given $\varepsilon>0$ we can choose q such that $\frac1{q^2}<\varepsilon$ and thus $\left| x_0 -\frac{p}{q} \right| < \frac{1}{q^2} < \varepsilon$.

For $x=\frac pq$ we get $$\left|\frac{f(x)-f(x_0)}{x-x_0}\right| = \frac{\frac1q}{\left|x_0 -\frac{p}{q}\right|} > \frac{\frac1q}{\frac1{q^2}} = q.$$

This shows that $\frac{f(x)-f(x_0)}{x-x_0}$ is unbounded in any neighborhood of $x_0$ (since $q$ can be chosen arbitrarily high).

After answering the question I tried to google for differentiable "thomae function". Already the first result provides the following article - containing a much simpler proof:

  • Kevin Beanland, James W. Roberts and Craig Stevenson: Modifications of Thomae's Function and Differentiability, The American Mathematical Monthly, Vol. 116, No. 6 (Jun. - Jul., 2009), pp. 531-535. link at author's blog, jstor.

(I saw that I need large denominators, which reminded me of Dirichlet and I overlooked the simple way.)

A little later I've noticed that the simple proof was already suggested in one of joriki's comments - which I've overlooked too.

I think it's worth mentioning different names used for this function (personally, I like popcorn function) - I quote from Wikipedia:

Thomae's function, named after Carl Johannes Thomae, also known as the popcorn function, the raindrop function, the ruler function, the Riemann function or the Stars over Babylon (by John Horton Conway) is a modification of the Dirichlet function.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.