# function continuous at only one point

Let us show that the function $f:\mathbb{R}\to \mathbb{R}$,

$$f(x)=\{\begin{array}{cc}x,\hfill & \text{when}x\text{is rational},\hfill \\ -x,\hfill & \text{when}x\text{is irrational},\hfill \end{array}$$ |

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

We shall use the following characterization of continuity for $f$: $f$ is continuous at $a\in \mathbb{R}$ if and only if ${lim}_{k\to \mathrm{\infty}}f({x}_{k})=f(a)$ for all sequences $({x}_{k})\subset \mathbb{R}$ such that ${lim}_{k\to \mathrm{\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

$\underset{k\to \mathrm{\infty}}{lim}|f({x}_{k})|$ | $=$ | $\underset{k\to \mathrm{\infty}}{lim}|f({x}_{k})|$ | ||

$=$ | $\underset{k\to \mathrm{\infty}}{lim}|{x}_{k}|$ | |||

$=$ | $0.$ |

Suppose $a\ne 0$. Then there exists a sequence of irrational numbers ${x}_{1},{x}_{2},\mathrm{\dots}$ 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

$\underset{k\to \mathrm{\infty}}{lim}f({x}_{k})$ | $=$ | $-\underset{k\to \mathrm{\infty}}{lim}{x}_{k}$ | ||

$=$ | $-a.$ |

On the other hand, we can also construct a sequence of rational numbers^{} ${y}_{1},{y}_{2},\mathrm{\dots}$
converging to $a$. For example, if $a$ is irrational, this follows as the rational numbers
are dense in $\mathbb{R}$, and if $a$ is rational, we can set ${y}_{k}={x}_{k}+1/k$.
For this sequence we have

$\underset{k\to \mathrm{\infty}}{lim}f({y}_{k})$ | $=$ | $\underset{k\to \mathrm{\infty}}{lim}{y}_{k}$ | ||

$=$ | $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 |
---|---|

Canonical name | FunctionContinuousAtOnlyOnePoint |

Date of creation | 2013-03-22 14:56:19 |

Last modified on | 2013-03-22 14:56:19 |

Owner | Andrea Ambrosio (7332) |

Last modified by | Andrea Ambrosio (7332) |

Numerical id | 7 |

Author | Andrea Ambrosio (7332) |

Entry type | Example |

Classification | msc 26A15 |

Classification | msc 54C05 |

Related topic | DirichletsFunction |

Related topic | FunctionDifferentiableAtOnlyOnePoint |