# Derivative has finite, unequal left and right limits at a point; is the function non-differentiable at this point?

I have a short question, related to the ongoing search of mathematics instructors for counter-examples to common undergraduate mistakes.

The classical example of a function that is differentiable everywhere but has discontinuous derivative is \begin{equation} f(x)=\left\{ \begin{array}{cc} x^2\sin(1/x) &(x\neq0), \\ 0 &(x=0), \end{array}\right. \end{equation} which has derivative \begin{equation} f'(x)=\left\{ \begin{array}{cc} 2x\sin(1/x)-\cos(1/x) &(x\neq0), \\ 0 &(x=0). \end{array}\right. \end{equation} $f'$ fails to be continuous at $0$ purely because its left- and right-hand limits do not even exist at $0$.

However, suppose that we have found a function $g$ whose derivative $g'$ has finite but unequal left- and right-hand limits at some cluster point $x_0$ in its domain. May we conclude that $g$ is not differentiable at $x_0$?

If this is not the case, is there a simple counter-example? (I'm guessing such a counter-example ought to be more complicated than the $f$ I have given above, as $f$ is sometimes claimed to be the simplest example of a differentiable function with discontinuous derivative.)

• This would produce a $g$ with a cusp, i.e., a point at which it is not differentiable. – Stromael Apr 24 '15 at 11:11
Suppose $f$ is differentiable over $(x_0-k,x_0+k)$, for some $k>0$, and that $$\lim_{x\to x_0^-}f'(x_0)=l \qquad\text{and}\qquad \lim_{x\to x_0^+}f'(x_0)=r$$ with $l\ne r$. It is not restrictive to assume $l<r$ (otherwise take $-f$).
Take $\varepsilon=(r-l)/4$. Then there exists $\delta$ with $0<\delta<k$ such that \begin{align} f'(x)&<l+\varepsilon &&\text{for every $x\in(x_0-\delta,x_0)$}\\ f'(x)&>r-\varepsilon &&\text{for every $x\in(x_0,x_0+\delta)$} \end{align}
This contradicts Darboux’s theorem, because $f'(x)$ should assume every value in the interval $(f'(x_0-\delta/2),f'(x_0+\delta/2))$, for some $x\in(x_0-\delta/2,x_2+\delta/2)$. But we see that infinitely many values are missed, as $f'(x_0)$ can only provide one of them.