I want to show that
$$f(x) = x|x|$$
is differentiable for all reals.
My approach would be:
Since $ \forall x \in \mathbb{R}$ such that $x < 0$ we have $f(x) = -x^2$ which is differentiable. also $\forall x \in \mathbb{R}$ such that $x > 0$ we have $f(x) = x^2$ which is also differentiable.
Last but not least I would have to show that $f$ is differentiable at $x=0$ and from this it would follow that $f$ is differentiable $\forall x \in \mathbb{R}$ and of course also continuous.
Is this correct?
Yes. If you prove the differentiability at $x<0, x>0$ and $x=0$ then $f$ is differentiable.