Solution (source code)

= Solution

The <vector field> has only a vertical component, namely $f(r)$. Its <divergence> is therefore its vertical <partial derivative>:
$$
\boxed{\nabla\cdot[\widehat{\mathbf k}f(r)]=\frac{\partial f(r)}{\partial z}=\frac zr f'(r),\qquad r>0.}
$$