Theorem
Suppose that $f$ is continuous on $\mathbb{R}$ and differentiable except perhaps at $a\in \mathbb{R}$. Suppose further that $\lim_{x\rightarrow a}f'(x)= L<\infty$ exists. Then $f$ is differentiable at $a$ with derivative $f'(a)=\lim_{x\rightarrow a}f'(x)$.
Proof: Let $h>0$. $f$ is continuous on $[a,a+h]$ and differentiable on $ (a,a+h)$. Then, by the Mean Value Theorem, $\exists\,c_h\in(a,a+h)$ such that
$$ f'(c_h)=\frac{f(a+h)-f(a)}{h}.$$
Now taking the limit as $ h\rightarrow 0$ on both sides:
$$\lim_{h\rightarrow 0^+}f'(c_h)=\lim_{h\rightarrow 0^+}\frac{f(a+h)-f(a)}{h}.$$
Now $c_h\rightarrow a^+$ as $h\rightarrow 0^+$ hence the left hand side is equal to $L$:
$$ \lim_{h\rightarrow 0^+}\frac{f(a+h)-f(a)}{h}=L.$$
Similarly taking $ h<0$ and $ h\rightarrow 0^-$ we can show:
$$ \lim_{h\rightarrow 0^-}\frac{f(a+h)-f(a)}{h}=L.$$
Hence $ f$ is differentiable at $a$ with derivative $f'(a)=L$ $\bullet$