Solution (source code)

= Solution

The <product rule for divergence>, $\nabla\cdot\mathbf r=3$, and the result in (a) give, for $r>0$,
$$
\nabla\cdot\frac{\mathbf r}{r}
=\frac1r\nabla\cdot\mathbf r+\mathbf r\cdot\nabla\frac1r
=\frac3r-\frac{\mathbf r\cdot\mathbf r}{r^3}
=\boxed{\frac2r}.
$$
This is a pointwise identity away from the origin, where the radial <unit vector> is undefined.