Derivative of continuous function exists if limit of derivative exists

I'm stuck on this old qualifier problem. I suppose one could do it using the basic definitions of continuity and differentiability, but is there a simpler way? (For example, using DCT, FTC, Lebesgue differentiation theorem, etc.)

Let $f:\mathbb{R} \mapsto \mathbb{R}$ be continuous. Suppose $f$ is differentiable away from $0$ and lim$_{x \to 0} f^\prime(x)$ exists. Show $f^\prime(0)$ exists.


Solution 1:

By the mean value theorem, there is a $c_x\in (0,x)$ resp. $c_x\in (x,0)$, depending on whether $x > 0$ or $x < 0$, such that

$$\frac{f(x)-f(0)}{x} = f'(c_x).$$

As $x\to 0$, by the squeeze lemma, also $c_x\to 0$, hence

$$\lim_{x\to 0} \frac{f(x)-f(0)}{x} = \lim_{x\to 0}f'(c_x)$$

exists.