Solution (source code)

= Solution

For this <vector field>,
$$
\nabla\cdot\mathbf G=3x^2+3y^2+3z^2=3r^2.
$$
The <divergence theorem> and <spherical coordinates> therefore give the outward <flux>
$$
\boxed{\oiint_S\mathbf G\cdot\mathbf n\,dS
=\iiint_V3r^2\,dV
=12\pi\int_0^a r^4\,dr=\frac{12\pi a^5}{5}.}
$$
The $a^5$ dependence also follows by combining the cubic field magnitude with the quadratic scaling of <surface area>.