I know that there exists functions where the derivatives are discontinuous, but most of the examples look sort of artificial. For example: the function $ f(x) = x^2 \sin (1/x)$ when x is non zero and taking value zero when x is zero. Here the original function itself has an undefined point. So I am a bit confused as to whether seemingly ordinary functions can have discontinuous derivatives.
Hence I am looking for any sort of lemmas or theorems which will give hints to as when a function will have a continuous derivative.