Solution (source code)

= Solution

At zero, $g(0)=0$ and
$$
\frac{g(h)-g(0)}h=hf(h)\longrightarrow0
$$
by <continuity> of $f$ at zero. Thus $g$ is always <differentiable> there, with $g'(0)=0$, regardless of whether $f'(0)$ exists.

At $x\ne0$, if $f$ is <differentiable>, the <product rule> applied to $t^2f(t)$ proves that $g$ is <differentiable>. Conversely, if $g$ is <differentiable> at $x$, the function $t^{-2}$ is <differentiable> on a neighborhood of $x$. Apply the <product rule> to $f(t)=t^{-2}g(t)$ on that neighborhood. This proves the <differentiability restored by a quadratic zero> equivalence:
$$
\boxed{g\text{ is differentiable at }x\iff x=0\text{ or }f\text{ is differentiable at }x.}
$$
At a nonzero differentiability point, $g'(x)=2xf(x)+x^2f'(x)$.