Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

If $f(x)$ is continuous at $a$, then is there a $\sigma$ such that $f(x)$ is also continuous on $(a-\sigma, a+\sigma)$? This looks very intuitive, but I don't know how to prove it.

share|cite|improve this question
up vote 3 down vote accepted

No, for example take $$f(x) = \begin{cases} x &\text{ if } x\in\mathbb{Q} \\ -x &\text{ if } x\in\mathbb{R}-\mathbb{Q} \end{cases}$$

then $f$ is continous in $x=0$, but not continous on $\left(-\varepsilon,\varepsilon\right)$ ($\forall\varepsilon\gt0$)

If you chose $f:\left[0,1\right]\rightarrow\mathbb{R}$ with

$$f(x) = \begin{cases} 1 &\text{ if } x=0 \\ 0 &\text{ if } x\in\mathbb{R}-\mathbb{Q} \\ q^{-1} & \text{ if } x=pq^{-1} \text{ with } p,q\in\mathbb{N} \text{ and } gcd(p,q)=1 \end{cases}$$

then $f$ becomes even continous in every irrational point, but you cannot find any intervall $\left(a,b\right)$ with $a\neq b$ where $f$ is continous.

share|cite|improve this answer
I have selected this answer because it's the most detailed, and the second example is wonderful. Thanks! BTW, how do you format those set symbols like $Q$ and $R$? – qed Dec 4 '12 at 23:29
@CravingSpirit: e.g: \mathbb{Q} $\rightarrow \mathbb{Q}$ – user127.0.0.1 Dec 4 '12 at 23:34

This is not true. A standard example is $$ f(x)=\begin{cases} x\text{ if }x\in\mathbb{Q}\\ 0\text{ if }x\not\in\mathbb{Q} \end{cases} $$ The function $f(x)$ is continuous at $x=0$, but not continuous on any open interval.

share|cite|improve this answer

It’s false: the function

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

is continuous only at $x=0$.

share|cite|improve this answer

It is a theorem that the discontinuity set of a real valued function is a $F_{\sigma}$ set, which means that it can be expressed as a countable union of closed sets. Conversely, the set of continuous points is $G_{\delta}$, which means it is a countable intersection of open sets. In general, a $G_{\delta}$ set need not contain an interval, so the answer to your question is no. What is true, however, is that it will always almost contain an interval, in a precise sense.

See here.

share|cite|improve this answer
Thanks for the reference! – qed Dec 4 '12 at 23:32

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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