A shortcut given in a book says that to check differentiability of a continuous function at $x=a$ we can differentiate $f(x)$ to get $f'(x)$ and if $\lim _{x\to a} f'(x)$ exists then function is differentiable at $x=a$.
Will above shortcut always work or will it fail in some cases?