So, I'm given: $f(x) = \left\{\begin{array}{ll} x^2\sin\left(\frac{1}{x}\right) & \mbox{if $x\neq 0$,}\\ 0 &\mbox{if $x=0$.} \end{array}\right.$
I'm asked to show that this piecewise function is both continuous and differentiable on the real number line.
I'm not sure how to state what I know, i.e. that since $x^2$ and $\sin(1/x)$ are both continuous and differentiable on their domains, the product is also continuous and differentiable (on their domains where obviously $\sin(1/x)$ can't have $x = 0$.) But that case is covered since $f(x) = 0$ when $x = 0$.
I guess I just to know how I would state all that in a mathematically accurate fashion.
Any assistance is greatly appreciated.