Solution (source code)

= Solution

The free-space <Green function of the Laplacian> for the <Poisson equation> gives the <electric potential>
$$
\boxed{\phi(\mathbf x)=\frac1{4\pi\epsilon_0}
\int_{\mathbb R^3}\frac{\rho(\mathbf x')}{|\mathbf x-\mathbf x'|}\,d^3x'}.
$$
For $r=|\mathbf x|\gg R$, its <electric multipole expansion> begins with
$$
\frac1{|\mathbf x-\mathbf x'|}
=\frac1r+\frac{\widehat{\mathbf x}\cdot\mathbf x'}{r^2}+O(r^{-3}).
$$
Define the <electric charge>[total electric charge] and <electric dipole moment> by
$$
Q=\int\rho(\mathbf x')\,d^3x',
\qquad
\mathbf p=\int\mathbf x'\rho(\mathbf x')\,d^3x'.
$$
Then
$$
\boxed{\phi(\mathbf x)=\frac1{4\pi\epsilon_0}
\left(\frac Qr+\frac{\mathbf p\cdot\widehat{\mathbf x}}{r^2}+O(r^{-3})\right)}.
$$

The analogous solution for the <magnetic vector potential> is
$$
\boxed{\mathbf A(\mathbf x)=\frac{\mu_0}{4\pi}
\int_{\mathbb R^3}\frac{\mathbf J(\mathbf x')}{|\mathbf x-\mathbf x'|}\,d^3x'}.
$$
Its apparent $r^{-1}$ coefficient is $\mu_0(4\pi)^{-1}\int\mathbf J\,d^3x'$. For each component, the supplied identity and the <divergence-free vector field> condition give
$$
\int J_i\,d^3x'
=\int\frac{\partial}{\partial x'_j}(x'_iJ_j)\,d^3x'.
$$
The <divergence theorem> turns this into a surface integral outside the compact support of the <current density>, where $\mathbf J=0$. Hence $\int\mathbf J\,d^3x'=0$, so the $1/r$ term vanishes.