Differentiability of a function at a point 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?
 A: Your teacher gave a rough guide. The standard example with oscillation, the next item on a fuller list, is
$$  f(x) = x \sin \left( \frac{1}{x} \right)  $$
which is continuous at $x=0,$ with the proviso that $f(0) = 0.$ 
I think you will find that your teacher was aware of this and did not want to muddy the waters.  
I do not know what you mean by the word cusp.
EEDDIIIITTTTT: There may or may not be a way to build this next one with a single formula: take any function you like for $1 \leq x \leq 2,$ a polynomial should be possible, such that the graph $y = f(x)$ is tangent to the line $y=x$ at both $x=1,2$ and is tangent to $y = -x$ at $x = 3/2.$ Next, put in a half size version for $1/2 \leq x \leq 1,$ with the result that we have a differentiable function on the larger domain owing to the tangency at $x=1.$ Do the same for $1/4 \leq x \leq 1/2.$ And so on forever. Then make $f(0) = 0,$ and $f(-x) = - f(x).$ This results in a   function of bounded derivative and $|f(x)| \leq |x|$ for $x \neq 0,$ but no derivative at the origin. 
