# Differentiability and exceptional sets proof

I am trying to prove the following theorem:

Let $f$ and $g$ be continuous functions from $\mathbb{R}$ to $\mathbb{R}$ and let $S$ be the set of all points $x$ such that $f$ is differentiable at $x$ and $f '(x)=g(x)$. Set $E=\mathbb{R}-S$. Then $E$ has no isolated points.

I have tried using proof by contradiction, via continuity arguments. However, I have been having trouble formalizing the approach and making it work. In particular how can I show that if a function is differentiable in arbitrary small neighborhoods of a point then it must be differentiable at that point?

P.S. I was told that using the Fundamental Theorem of Calculus this problem could be reduced to the case $g=0$. At the time I thought I understood it but I have been trying to prove it and haven't been able. I think I am missing something painfully obvious. Any ideas?

• Can anyone suggest improvements or corrections to the question? Or is the question not appropriate? – Student Jul 5 '14 at 16:14

This is an application of the mean value theorem. It is saying if $x\in (a,b)$ and $f$ is differentiable with continuous derivative on $(a,x)$ and $(x,b)$ then $f$ is differentiable at $x$. Consider $[x,x+h]$ for small $h$ the conditions of the mean value theorem are met and so $$f(x+h)-f(x)=f^{\prime}(z)h$$ for some $z \in [x,x+h]$ so
$$\frac{f(x+h)-f(x)}{h}=f^{\prime}(z)=g(z)$$ and since $g$ is continuous the limit as $h\to 0$ is $z\to x$ and exists and is equal to $g(x)$. The other side of the interval is the same.