This question already has an answer here:

I'm trying to proof that the Thomae's function doesn't have a limit as $\lim_{x\rightarrow x_0}$, $x_0\in \mathbb{Q}$.

I'm pretty sure, that I can solve this by using the $\epsilon-\delta$-critereon, but I cant figure out how. If a limit would exist, that would mean:

$\forall\epsilon>0 \exists\delta : |f(x)-L|<\epsilon, \forall x\in D, 0<|x_i -x|<\delta$

I'm pretty sure that you simply can't find a matching $\delta$ as in the environment of each rational number there are some irrational numbers where the Thomae's function is equal to $1/q$ and not $0$.

Could you help me to complete this proof by helping me arguing&writing this mathematicly correct?


This isn't a duplicate because I'm looking for the limit and not discontinuity. I have to proof this with the $\epsilon-\delta$-critereon for the limit and not for the discontinuity (even though they are kind of similar, they're different!)


marked as duplicate by Lord Shark the Unknown, Cesareo, Vidyanshu Mishra, José Carlos Santos real-analysis Dec 1 '18 at 13:43

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • $\begingroup$ Pick an $\varepsilon$. Prove that there's no $\delta$ that works with that particular $\varepsilon$. $\endgroup$ – user3482749 Nov 30 '18 at 21:10
  • 2
    $\begingroup$ I'm pretty sure the limit does exist and is equal to zero for all $x_0$. The same argument as continuity at irrationals works. $\endgroup$ – Wojowu Nov 30 '18 at 21:10
  • $\begingroup$ I think that I already found out that you could pick $\epsilon=1/2q$ but this didn't help me in the past.. $\endgroup$ – Joe Helasen Nov 30 '18 at 21:11
  • 1
    $\begingroup$ @JoeHelasen The function is discontinuous at every rational point, but the limit still exists. $\endgroup$ – Wojowu Nov 30 '18 at 21:58
  • 1
    $\begingroup$ @JoeHelasen I would wager the exercise has a mistake. Unfortunately I am not able to write a disproof right now. The idea is that for x sufficiently close to, but not equal to, x_0, x has to be either irrational or has to have large denominator. Either way the value of the function is close to zero. $\endgroup$ – Wojowu Nov 30 '18 at 22:45

The comments by user Wojowu are correct and your exercise has a mistake which is not just a typo. When reading typical calculus books always exercise caution. Most of them have serious errors in their exercises as well as proofs.

For clarity I define the Thomae function as $f:[0, 1]\to\mathbb {R} $ by $f(x) =0$ if $x$ is irrational and $f(x) =1/q$ if $x=p/q$ is a rational number such that $p, q$ have no common factor.

Then for all $a\in[0,1]$ the limit $L_a=\lim_{x\to a} f(x)$ exists and is equal to $0$. The idea behind the proof is not difficult. Try to convince yourself of the following simple result.

Simple Theorem: Let $a, b\in\mathbb{R}, a<b$ and $N$ be a positive integer. Then there are only a finite number of rationals in interval $[a, b]$ whose denominators do not exceed $N$.

Now as $x\to a$ through irrational values we have $f(x) =0$. And if $x\to a$ through rational values the denominators $q$ of $x$ will increase without bound and hence $f(x) =1/q\to 0$. Thus $\lim_{x\to a} f(x) =0$.

A formal $\epsilon, \delta$ proof makes use of the simple theorem mentioned above.

Let's start with $\epsilon >0$ and choose a positive integer $N$ such that $1/N<\epsilon$. Now there are only a finite number of rationals in $[0,1]$ with denominators less than or equal to $N$. Out of these rationals choose the one which is nearest but not equal to $a$ and call it $b$. Let $\delta=|a-b|$ and consider all $x$ with $0<|x-a|<\delta$. If $x$ is irrational then $f(x) =0$ and if $x$ is rational then it has denominator $M$ greater than $N$ so that $f(x) =1/M<1/N<\epsilon $. Thus we have $|f(x) |<\epsilon $ whenever $0<|x-a|<\delta$. And hence $\lim_{x\to a} f(x) =0$. This also proves that the function $f$ is continuous at irrational points and discontinuous at rational points in $[0,1]$.

  • $\begingroup$ So wouldn't this mean that the limit exists wheter $a\in \mathbb{Q}$ or $a\notin \mathbb{Q}$? Because this is against the exercise and this is a mathematic course at the universe, so I highly doubt that the exercise is wrong... But if you proof it to me then I should question it... $\endgroup$ – Joe Helasen Dec 1 '18 at 10:56
  • $\begingroup$ @JoeHelasen: you should learn to doubt calculus textbooks. In my experience they are mostly crap barring a few exceptions like Hardy or Spivak. Also the argument by authority is practically useless in mathematics. So whether it is an exercise in university curriculum or not it does not matter. $\endgroup$ – Paramanand Singh Dec 1 '18 at 11:00
  • $\begingroup$ @JoeHelasen: on the other hand if you have any doubts about this answer let me know and I will try to explain. $\endgroup$ – Paramanand Singh Dec 1 '18 at 11:02
  • $\begingroup$ okay so I understand your proof. I have two questions. First we didn't introduce the theorem in the lessons so is there a simple way of proofing this? Second we defined the function over all rational points and not only on the interval $[0,1]$, but I read somewhere that I could argue that it's still valid. Could you explain why this is true for every $x\in \mathbb{R}$? $\endgroup$ – Joe Helasen Dec 1 '18 at 13:00
  • $\begingroup$ @JoeHelasen: the argument works for all $x\in\mathbb {R} $. The restriction that $x\in[0,1]$ is used nowhere. Next the theorem mentioned in my answer is a trivial/obvious result which need not be expressed explicitly as a theorem. I have only mentioned it to emphasize that the proof is based on a simple idea. $\endgroup$ – Paramanand Singh Dec 1 '18 at 14:02

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