Solution (source code)

= Solution

For the <divergence> in <Cartesian coordinates>, differentiate each component with respect to its own coordinate:
$$
\boxed{\nabla\cdot\mathbf G=2xz+3y^2z+0=z(2x+3y^2)}.
$$
The third component contributes zero because it is independent of $z$.