$$f(x)=\begin{cases} x+1, & \text{if $x$ is irrational} \\ x, & \text{if $x$ is rational} \end{cases}$$

Show that $f$ is discontinuous on $\mathbb{R}$

edit: It would be preferable if this could be proved without the use of sequences or epsilon-delta


closed as off-topic by Did, E. Joseph, Daniel W. Farlow, Namaste, Shailesh Nov 20 '16 at 1:06

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question is missing context or other details: Please improve the question by providing additional context, which ideally includes your thoughts on the problem and any attempts you have made to solve it. This information helps others identify where you have difficulties and helps them write answers appropriate to your experience level." – Did, E. Joseph, Daniel W. Farlow, Namaste, Shailesh
If this question can be reworded to fit the rules in the help center, please edit the question.

  • $\begingroup$ Any ideas? What have you tried? You tagged as epsilon-delta, have you tried applying the definition? $\endgroup$ – CompuChip Nov 19 '16 at 18:56
  • 1
    $\begingroup$ Hint: $f(x)=x+D(x)$, where $D$ is the Dirichlet function. $\endgroup$ – user378947 Nov 19 '16 at 18:57
  • $\begingroup$ The epsilon-delta definition was by mistake!Edited the question because of a mistake I made.I have tried the epsilon-delta but I'm supposed to solve it without it. $\endgroup$ – george wold Nov 19 '16 at 19:13

Let $r$ be a rational.

we have $\;f(r)=r$

and $\;\; \forall n>0$,



$$\lim_{n\to+\infty}f(r+\frac{\sqrt{2}}{n})=r+1\neq f(r)$$

which means that $\;f\;$ is not continuous at $x=r$.

Let $s$ be an irrational.

we have $f(s)=s+1$ and

$$s=\lim_{n\to+\infty}\frac{\lfloor 10^n s \rfloor}{10^n}$$


$$\lim_{n\to+\infty}f(\frac{\lfloor 10^n s \rfloor}{10^n})=\lim_{n\to+\infty}\frac{\lfloor 10^n s \rfloor}{10^n}$$

$=s\neq f(s)$ .

$f$ is not continuous at $x=s$.

  • $\begingroup$ That's the exact proof I wanted :). Thanks a lot! $\endgroup$ – george wold Nov 19 '16 at 19:14
  • $\begingroup$ @Abdallah Hammam (Y) keep it high! $\endgroup$ – Melina Nov 19 '16 at 19:16

Regardless of delta we can find a y within delta of x that is more than distance 1 from x (there are rationals and irrationals arbitrarily close to x). But then there exists no delta corresponding to epsilon less than 1.


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