# Continuity and Differentiability

Prove that if $f:\mathbb R\to\mathbb R$ is continuous at $a$ and differentiable at all $x\neq a$ in a neighborhood of $a$, and $\lim_{x\to a}f'(x)=L$, then $f$ is differentiable at $a$ and $f'(a)=L$.

It seems so obvious, yet I can't find the way to formulate a solution. Would appreciate any help.

-
This statement could be worded better - "so" is not the appropriate conjunction here. And there is no such thing as "the" neighborhood of $a$, there are infinitely many and no single neighborhood is special. By "is determinable" do you mean "exists?" Would you write the statement to be proved as an unambiguous "if these assumptions hold, then this is true"-type sentence? – Gyu Eun Lee Jan 18 '13 at 5:36
@proximal Sorry, I translated the problem from another language. – Harold Jan 18 '13 at 5:37
I tried to clarify the question; please check whether it now expresses what you intended. – joriki Jan 18 '13 at 7:53
Yes! Thanks you! – Harold Jan 18 '13 at 8:09
Here is nearly the same question. – David Mitra Jan 18 '13 at 12:16

Apply the Mean Value theorem with endpoints $x$ and $a$ and then let $x\rightarrow a$. This will give you exactly what you want.
As f is differentiable on the open interval with endpoints $x$ and $a$ and continuous on the corresponding closed interval (for $x$ sufficiently close to $a$), the MVT applies and we have: $$\frac{f(x)-f(a)}{x-a}=f'(c)$$ for some $c$ (depending on $x$) between $a$ and $x$. Now as $x\rightarrow a$ we have $c\rightarrow a$, and so: $$\frac{f(x)-f(a)}{x-a}=f'(c)\rightarrow L$$ as $x\rightarrow a$. – Sean Gomes Jan 18 '13 at 11:14