TITLE: If a function is derivable in a point then there exists an open interval around the point in which the function is continuous
QUESTION [1 upvotes]: Let $f:\ \mathbb{R} \rightarrow \mathbb{R}$ be a function that is differentiable in $a\in \mathbb{R}$.
Prove or give a counterexample:
There exists a $\delta \in \mathbb{R}_0^+$ as follows:
$$ \forall x \in (a-\delta,a+\delta):\ f \text{ is continuous in } x $$ 
I started by writing down what this means, but I got stuck immediately:
exists a $\delta \in \mathbb{R}_0^+$ as follows:
$$ \forall x \in (a-\delta,a+\delta):\ \forall y \in (a-\delta,a+\delta) \forall \epsilon \exists \eta: \forall z\in (a-\delta,a+\delta):\ |y-z|< \eta \Rightarrow |f(y)-f(z)|< \epsilon $$

REPLY [3 votes]: Take $$g(x)=\begin{cases}0,&x\notin\mathbb{Q}\\x^2,&x\in\mathbb{Q}\end{cases}$$
We can compute $$g'(0)=\lim_{x\to0}\frac{g(x)-g(0)}{x}=\lim_{x\to0}\begin{cases}0,&\text{ along the irrationals}\\\frac{x^2}{x},&\text{ along the rationals}\end{cases}=0$$
If $x\neq0$ there are arbitrarily close irrationals at which the function takes the value $0$ and rationals $y$ arbitrarily close $|x-y|<\delta<\left|\frac{x}{2}\right|$ (and in particular we use $x-\delta<y$ for $x>0$ or $y<x+\delta$ for $x<0$) at which the function takes the value $$y^2>(x\mp\delta)^2\geq x^2/4>0$$.
Therefore, the function is discontinuous at all points $x\neq0$.
{"set_name": "stack_exchange", "score": 1, "question_id": 1222287}