I know there are many answers for this question. I had read almost every answer And try get arguments But something that goes missing in each time. I had been stuck on this problem since half day but not understating. Please help me in this regard.
Let $f$ be defined on $[0,1]$;

$$ \begin{align} f(x) = \begin{cases} 0 & \text{if $x$ is irrational}\\ \frac{1}{q} & \text{if $x = \frac{p}{q}$ where $(p,q) = 1$ and $q$ > 0}. \end{cases} \end{align} $$
For the rational numbers, I consider a sequence of irrational points $x_n$ converging to some rational number say $m/n$.
If this function is continuous for any rational say $m/n$ then this must hold: $\forall \epsilon >0$ ,$\exists \delta>0$ such that $|1/n|<\epsilon $ whenever $|x_n-m/n|<\delta$.
But for any particular $m/n,1/n$ need not be small. Therefore function is discontinuous at the rational points.

For the irrational points, consider rational sequence $y_n$ converging to $a$, irrational number. Consider $y_n \to a$ therefore $\forall \epsilon >0 $, $\exists N$ such that $|y_n-a|<\epsilon $ $\forall n>N$
In case the function is continuous at $a$ then it must satisfy following
$\forall \epsilon >0 $ ,$\exists \delta>0$ such that|$f(y_n)$|<$\epsilon $ whenever $|y_n-a|<\delta$.
I wanted to make that $f(y_n)$ small for that $y_n$ in neighborhood of $a$.From this I am not able convince myself from last answers.

This is not a duplicate, since I specified my particular problem with this proof. Please help me.


Let $x$ be irrational. $\epsilon>0$. We know that there are finitely many $q\in\mathbb{N}$ such that $\frac{1}{q}\geq \epsilon$. We also know that for each such $q$, there are finitely many $p\in\mathbb{Z}$ such that $|x-\frac{p}{q}|<1$, because $-q+qx<p<q+qx$ for finitely many $p\in\mathbb{Z}$.

This means that there are finitely many $\frac{p}{q}\in\mathbb{Q}$ with $\text{gcd}(p,q)=1$ such that $|x-\frac{p}{q}|<1$ and $f(\frac{p}{q})=\frac{1}{q}\geq \epsilon$, so call this (finite) set $R$ (the set of these chosen rationals), and we may take $\delta=\frac{1}{2}\min_\limits{r\in R}\{1,|x-r|\}$. This $\delta$ makes sure that we throw out these kind of rationals that have $\frac{1}{q}\geq \epsilon$.

So for $|x-\frac{p}{q}|<\delta$ with $\text{gcd}(p,q)=1$ we have $|f(\frac{p}{q})|=\frac{1}{q}< \epsilon$. Therefore $f$ is continuous in the irrationals.

Remark: We saw that there are finitely many $\frac{p}{q}$ with $p\in\mathbb{Z}$ and $q\in\mathbb{N}$ such that $|x-\frac{p}{q}|<1$ and $f(\frac{p}{q})=\frac{1}{q}\geq \epsilon$. Now adding the restriction $\text{gcd}(p,q)=1$ gives us even fewer of these rationals, so of these there are also finitely many.

  • $\begingroup$ Hello Sir Thanks for elegant proof .I understand that .But one difficulty is remain. I come across one statement that Thomes function is simple discontinuous at every rational point .But I am not convinced with existence of f(x-) and f(x+) for x rational as for limit along irrational number will be 0 and along rational number will be some positive quantity .Please Help me out $\endgroup$ – MathLover May 20 '18 at 12:03
  • 2
    $\begingroup$ @SRJ You're welcome. The discontinuity in each rational point $x$ will be simple (i.e. $f(x^+)$ and $f(x^-)$ exist) using the same reasoning as in my answer: by making the neighborhood of $x$ smaller and smaller we can rule out every point $a$ that has $f(a)\geq\varepsilon$ ($x$ being the only exception here), and so the definition of limit applies: we obtain $f(x^+)=0=f(x^-)$. $\endgroup$ – The Phenotype May 20 '18 at 23:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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