Solution (source code)

= Solution

Away from the origin, the <chain rule> gives $r_x=x/r$ and $r_y=y/r$. Differentiating once more yields the two-dimensional case of the <Hessian of the Euclidean norm>:
$$
\boxed{r_x=\frac xr,\quad r_y=\frac yr,\quad r_{xx}=\frac{y^2}{r^3},\quad r_{yy}=\frac{x^2}{r^3},\quad r_{xy}=-\frac{xy}{r^3}.}
$$
These <partial derivatives> are smooth wherever $r>0$, so <Clairaut's theorem> gives $\boxed{r_{yx}=r_{xy}=-xy/r^3}$. None of these formulas supplies a <derivative> at the origin: even the restriction $r(x,0)=|x|$ has no two-sided <derivative> there.