Solution (source code)

= Solution

The <curl> of $\mathbf G=\mathbf a\times\mathbf r$ is $2\mathbf a$. Thus for $\mathbf a\ne0$ it cannot be a <gradient field>, while for $\mathbf a=0$ it is zero and all its <vector-field potentials> are constants. This zero-vector case is allowed by the question.

For the radial <vector field> $\mathbf H$, write $\rho=|\mathbf r|$. Choose a radial primitive
$$
\Phi(\rho)=\int_{\rho_0}^{\rho}s f(s)\,ds+C.
$$
For $\rho>0$, the <chain rule> gives
$$
\nabla\Phi=\Phi'(\rho)\frac{\mathbf r}{\rho}=f(\rho)\mathbf r.
$$
Hence all <vector-field potentials> on a connected domain where the field is defined are
$$
\boxed{\Phi(\mathbf r)=\int_{\rho_0}^{|\mathbf r|}s f(s)\,ds+C}.
$$
The assumed existence of the needed derivatives and integrals justifies this construction. If the domain includes the origin and the field is regular there, choose $\rho_0=0$ and extend the primitive there. Any two <vector-field potentials> differ by a constant on each connected component.