I came across this question as stated below:
let $g(x) = xf(x)$ where $ f(x)= \begin{cases} x \hspace{0.1cm}\sin(\frac{1} {x} ) &\text{if}\ x\neq 0\\ 0 &\text{if}\, x= 0 \end{cases} $
Show that $g(x)$ is differentiable at $x = 0 \hspace{0.2cm}$but $g'(x)$ is not continuous at $x=0$
Please note that I do NOT want answers to the question
What I want to know is whether functions can exist which are differentiable but their derivative isn't continuous at that point. And, if they do exist, why would the derivative be discontinuous but the function be differentiable?
Until now, whenever they asked to check differentiability, instead of going for the limit definition, I directly differentiate the function and then check the continuity of the new function which clearly goes wrong as in this example.
Why are there functions that behave like that?
*To know exactly what I mean to ask, re-read the lines below the bold sentence.