I have this function $x^2|\cos \frac \pi x|$ . To check if it's differentiable at $x=0$, I first directly differentiated the given function- having two cases, opening the mod sign with positive and negative signs. In both cases I end up with a $\sin \frac \pi x $ term in the derivative, so that at $x=0$ the derivative is discontinuous (oscillatory discontinuity) and so the derivative shouldn't exist at $x=0$. But, if I differentiate using first principles instead, I get the derivative as $0$, and so the function IS differentiable at $x=0$. So, is the function differentiable or not, which result do I take?
Apparently this type of function is an example of a function whose derivative at a point exists (this can be checked by applying the first principle of differentiation), however it's derivative is also discontinuous at that very same point. Such functions do exist. Another example of this is $x^2sin1/x$ . Thanks @Matt Samuel for explaining