[Math] Prove continuity on a function at every irrational point and discontinuity at every rational point.

real-analysis

Consider the function:

$f(x)= \begin{cases}
1/n \quad &\text{if $x= m/n$ in simplest form} \\
0 \quad &\text{if $x \in \mathbb{R}\setminus\mathbb{Q}$}
\end{cases} $

Prove that the function is continuous at every irrational point and also that the function is not continuous at every rational point. Also, we can say that the function is continuous at some point $k$ if $\displaystyle\lim_{x \to k} f(x)=f(k)$.

I was thinking of doing an epsilon delta proof backwards using the fact that $\mathbb{Q}$ is dense in $\mathbb{R}$ for rational points and irrational points. Any ways on how to expand on this are welcome.

Best Answer

This function is known as Thomae's function and is an excellent example of a function that is continuous at uncountably infinite number of points while discontinuous at countably infinite number of points. Note that the reverse result is not possible, i.e. one cannot have a function that is discontinuous on an uncountably infinite dense set and continuous on a countably infinite dense set.

As for the proof , the discontinuity part follows from the fact that irrationals are dense in $ R $ as you rightly thought. The continuity part is a little bit more involved and it would help to employ the Archimedean principle in tandem with the $ \epsilon$-$\delta $ definition.

Crudely, look at $ x=\sqrt3 $ , see that using the non-terminating decimal expansion i.e. $ \sqrt 3=1.732148\ldots $ , one can forge a sequence of rationals $ \ \ 1 , 17/10 ,173/100 ,\ldots \ $ that converges to $ x $, while at the same time your $ f(x_n) $ is $ \ \ 1/10,1/100,1/1000,\ldots \ $ which converges to $ 0 $ which is nothing but $ f(x) $. This is merely an illustration of the continuity and not a rigorous proof.

Related Question