My high-school calculus teacher has asserted that a function $f(x)$ can only fail to be differentiable at a point $x=a$ if one of the following is true:
The function is discontinuous at $x=a$: $\lim_{x\to a}f(x) \ne f(a)$
The function has a cusp or vertical tangent at $x=a$: $\lim_{x\to a}\left|{{f(x)-f(a)}\over{x-a}}\right| = \infty$
The function has a corner at $x=a$: $\lim_{x\to a^+} {{f(x)-f(a)}\over{x-a}} \ne \lim_{x\to a^-} {{f(x)-f(a)}\over{x-a}}$
While in most cases that is probably correct, I find it somewhat hard to swallow that it is that way for all functions. Specifically, the function
$$f(x)=\begin{cases}x\sin \ln x^2, & x\ne0 \\ 0, & x=0\end{cases}$$
is most definitely not differentiable at $x=0$, but it also doesn't appear to satisfy any of the properties listed above.
The derivative $\frac{\mathrm{d} }{\mathrm{d} x}f(x)$ of the function for $x\ne0$ appears to be $\sin{{\ln x^2}}+2\cos{{\ln x^2}}$, which doesn't show any signs of increasing without bounds as $x\to0$ or suddenly changing at $x=0$, and $f$ is most definitely continuous at that point.
So, the Question is: What's up with$f$? Does it actually fall into one of the cases above, or are they only good as a rough guide for some sorts of functions?
