Let $f$ be a continuous function at $x_0$ and differentiable in the neighborhood of $x_0$. If $\lim_{x\to x_0}f'(x)$ exists, then $f$ differentiable at $x_0$ and $f'(x_0)=\lim_{x\to x_0} f'(x)$. It might be a classic result, but I didn't really find the post here using MVT. If someone could give a feedback on my proof, I would really appreciate it. Thank you in advance.
First of all, as $f$ is differentiable in the neighborhood of $x_0$, then there exists $\delta>0$ such that $f$ is differentiable on $]x_0-\delta,x_0+\delta[$. Consider an interval $[x_0, x]$ with $x \in ]x_0,x_0+\delta[$. $f$ is continuous on $[x_0,x]$ (because differentiable in the neighborhood of $x_0$ and continuous at $x_0$) and differentiable on $]x_0,x[$. Let $\lim_{x\to x_0}f'(x)=L\in \mathbb{R}$ Then, by MVT, $\exists c_x \in ]x_0,x[$:
$f(c_x)=\frac{f(x)-f(x_0)}{x-x_0}$ $\implies$ $\lim_{x\to x_0}f'(c_x)=L=\lim_{x\to x_0}\frac{f(x)-f(x_0)}{x-x_0}=f'(x_0)$ as wanted. So, $f$ differentiable at $x_0$ and $f'(x_0)=\lim_{x\to x_0}f'(x)$.
I'm not really sure about my definition $x$ (it's domain). I think that it is not well defined. I could have passed by another definition of derivative and use the limit as $\delta\to 0 $, but I didn't really find how to define correctly my interval.