Solution (source code)

= Solution

In SI units, the sourced <Maxwell equations> are
$$
\nabla\cdot\mathbf E=\rho/\epsilon_0,\qquad\nabla\cdot\mathbf B=0,
\qquad\nabla\times\mathbf E=-\partial_t\mathbf B,
\qquad\nabla\times\mathbf B=\mu_0\mathbf J+\mu_0\epsilon_0\partial_t\mathbf E.
$$
Take the <divergence> of the last equation. The <divergence> of a <curl> vanishes; using the first equation gives the necessary local conservation law
$$
\boxed{\partial_t\rho+\nabla\cdot\mathbf J=0.}
$$
For sources supported in a fixed region, integrate over a containing surface where the current vanishes. The <divergence> theorem gives
$$
\frac{d}{dt}\int_V\rho\,d^3x=-\int_{\partial V}\mathbf J\cdot\mathbf n\,dS=0.
$$
Thus the total charge is constant. For each component of the <electric dipole moment>, integration by parts gives
$$
\frac{d}{dt}\int_Vx_i\rho\,d^3x
=-\int_Vx_i\partial_jJ_j\,d^3x
=-\int_{\partial V}x_i\mathbf J\cdot\mathbf n\,dS+\int_VJ_i\,d^3x.
$$
The surface term again vanishes, so
$$
\boxed{\frac{d}{dt}\int_V\mathbf x\rho\,d^3x=\int_V\mathbf J\,d^3x.}
$$
Smooth <compact> support suffices for these manipulations; equivalently one may integrate the <charge continuity equation> over all space and use the fixed support to identify the <integrals> with those over $V$.