# function continuous at only one point

Let us show that the function $f\colon\mathbbmss{R}\to\mathbbmss{R}$,

 $f(x)=\begin{cases}x,&\mbox{when x is rational},\\ -x,&\mbox{when x is irrational},\end{cases}$

is continuous at $x=0$, but discontinuous for all $x\in\mathbbmss{R}\setminus\{0\}$ [1].

We shall use the following characterization of continuity for $f$: $f$ is continuous at $a\in\mathbbmss{R}$ if and only if $\lim_{k\to\infty}f(x_{k})=f(a)$ for all sequences $(x_{k})\subset\mathbbmss{R}$ such that $\lim_{k\to\infty}x_{k}=a$.

It is not difficult to see that $f$ is continuous at $x=0$. Indeed, if $x_{k}$ is a sequence converging to $0$. Then

 $\displaystyle\lim_{k\to\infty}|f(x_{k})|$ $\displaystyle=$ $\displaystyle\lim_{k\to\infty}|f(x_{k})|$ $\displaystyle=$ $\displaystyle\lim_{k\to\infty}|x_{k}|$ $\displaystyle=$ $\displaystyle 0.$

Suppose $a\neq 0$. Then there exists a sequence of irrational numbers $x_{1},x_{2},\ldots$ converging to $a$. For instance, if $a$ is irrational, we can take $x_{k}=a+1/k$, and if $a$ is rational, we can take $x_{k}=a+\sqrt{2}/k$. For this sequence we have

 $\displaystyle\lim_{k\to\infty}f(x_{k})$ $\displaystyle=$ $\displaystyle-\lim_{k\to\infty}x_{k}$ $\displaystyle=$ $\displaystyle-a.$

On the other hand, we can also construct a sequence of rational numbers $y_{1},y_{2},\ldots$ converging to $a$. For example, if $a$ is irrational, this follows as the rational numbers are dense in $\mathbbmss{R}$, and if $a$ is rational, we can set $y_{k}=x_{k}+1/k$. For this sequence we have

 $\displaystyle\lim_{k\to\infty}f(y_{k})$ $\displaystyle=$ $\displaystyle\lim_{k\to\infty}y_{k}$ $\displaystyle=$ $\displaystyle a.$

In conclusion $f$ is not continuous at $a$.

## References

• 1 Homepage of Thomas Vogel, http://www.math.tamu.edu/ tom.vogel/gallery/node3.htmlA function which is continuous at only one point.
Title function continuous at only one point FunctionContinuousAtOnlyOnePoint 2013-03-22 14:56:19 2013-03-22 14:56:19 Andrea Ambrosio (7332) Andrea Ambrosio (7332) 7 Andrea Ambrosio (7332) Example msc 26A15 msc 54C05 DirichletsFunction FunctionDifferentiableAtOnlyOnePoint