Differentiability of a function at a point to prove it differentiable everywhere on the given condition. A simple question which I came across recently. Just wanted to confirm if my logic on it is right....
Suppose $f(x)$ is a function and it's given that it's differentiable everywhere except possibly at $0$, but for the point "$0$", it's given that $\lim_{x\to 0} f'(x) = 0.$ We need to prove that its differentiable everywhere. 
What I think is the left hand derivative will be equal to $\lim_{x\to 0^-} f'(x) = 0$ and similarly right hand derivative will be equal to $0$ too on similar lines. 
Is this right? I thought of the question myself as I was working on some other question and this bumped in my head. Can we do it this way or there should be some more condition given in the question to work our proof? Thanks.
 A: Suppose $f$ is continuous at $0$. Without this assumption, user math_man's answer shows that the statement is not true. 
We need to argue that $\displaystyle f'(0)=\lim_{h\to 0}\frac{f(h)-f(0)}h$ exists. But this is now immediate from L'Hôpital's rule: The assumptions that $f$ is continuous at $0$ (and therefore everywhere), and differentiable away from $0$ give us that we can apply the mean-value theorem. This allows us to conclude that for any $h$ there is a $\xi_h$ in between $0$ and $h$ such that $$ \frac{f(h)-f(0)}h=\frac{f'(\xi_h)}1=f'(\xi_h). $$ Now note that $\xi_h\to0$ as $h\to 0$. Since we are given that $\lim_{t\to0}f'(t)=0$, it follows that $\lim_{h\to0}f'(\xi_h)=0$ as well, so $f'(0)$ exists and is $0$.
A: Well, if you imagine the function $f(x)=1 \;\;x\in [0,\infty)$ and $f(x)=-1\;\;x\in(-\infty,0)$ then it is differentiable everywhere except in $0$ and $f'(x)=0\;\forall x\neq 0$. Anda $\lim_{x\to 0}f'(x)=0$. And this functions  is not continuous in $0$, and so it is not differentiable.
