If $f: \mathbb{R} \to \mathbb{R}$ is continuous at $a$, is it continuous in some open interval around $a$?
-
Not a duplicate, but the answer is a consequence of this answer. – Git Gud Jun 02 '13 at 20:47
-
4There you go! $5$ answers in less than a minute! – Pedro Jun 02 '13 at 20:47
6 Answers
No, that's not true. Take the function $f : \mathbb R \to \mathbb R$ defined by $f(x) = 0$ if $x \in \mathbb Q$ and $f(x) = x$ if $x \not\in \mathbb Q$. Then $f$ is discontinuous everywhere except at $0$ (can you prove this?).
- 7,007
- 56,269
-
5This is fascinating and basically stretches the concept of continuity, or at least illustrates a facet of it. The question suggests itself, if $f$ is continuous only at zero, to where does it continue? ;) – Kaz Jun 03 '13 at 04:56
-
This works whenever $x$ and $0$ are replaced by two functions that converge to the same value at certain points, right? For instance, with $x^2$ and $x$ the associated function would be continuous only at $0$ and $1$? – Jack M Jun 03 '13 at 12:59
-
-
No. Take $$x\mapsto \left\lfloor\frac 1 x\right\rfloor^{-1}$$
It is continuous at $x=0$; but has discontinuities on every $x_n=\dfrac 1 n$
ADD On a side note, it is not hard to show this function is continuous at $0$. Use the squeeze theorem with $x$ and $2x$ for $x\to 0^+$ and $x$ and $x/2$ for $x\to 0^{-}$. Of course, we need to set $0\mapsto 0$.
- 125,149
- 19
- 236
- 403
No. Consider the function $$f(x)=\begin{cases} x &\text{if } x\in \mathbb Q\\ -x &\text{otherwise} \end{cases}$$ which is continuous at $0$, but not at any other real number.
- 61,883
Not necessarily:
$$f(x)=\begin{cases} x,&\text{if }x\in\Bbb Q\\ -x&\text{if }x\in\Bbb R\setminus\Bbb Q \end{cases}$$
is continuous only at $0$.
- 631,399
Fix an enumeration of the rationals, $q_n$ for $n\in\Bbb N$. We define the following function:$$\large f(x)=\sum_{q_n<x}\frac1{2^n}$$
That is, we sum $\frac1{2^n}$ for all the $n$ such that $q_n$ is strictly smaller than $x$. This function is continuous at every irrational number, but discontinuous at every rational number. Therefore it cannot be continuous on any interval.
- 405,794