Let $$f(x) = \begin{cases}1\qquad x\in\mathbb{Q}\\ 0\qquad x\notin\mathbb{Q} \end{cases}$$
Then how do I show that $xf(x)$ is continuous in $0$ and that $x^2f(x)$ is differentiable there as well?
When I try to visualize the Dirichlet function I get stuck thinking two parallel lines passing through $0$ and $1$.
$$|xf(x)|\le |x|\xrightarrow{x\to0}0$$
$$\left|\frac{g(x)-g(0)}{x-0}\right|=|xf(x)|\le |x|\xrightarrow{x\to0}0$$