Solution (source code)

= Solution

For a time-independent current, the <Maxwell equations> reduce to <magnetostatics>:
$$
\nabla\mathbin\cdot\mathbf B=0,
\qquad
\nabla\mathbin\times\mathbf B=\mu_0\mathbf j.
$$
Write $\mathbf B=\nabla\mathbin\times\mathbf A$ using a <vector potential> and choose the <Coulomb gauge> $\nabla\mathbin\cdot\mathbf A=0$. The vector identity for the curl of a curl gives the <Poisson equation>
$$
-\nabla^2\mathbf A=\mu_0\mathbf j.
$$
The free-space <Green function> therefore gives
$$
\mathbf A(\mathbf r)=\frac{\mu_0}{4\pi}\int_V
\frac{\mathbf j(\mathbf r')}{|\mathbf r-\mathbf r'|}\,dV'.
$$
Taking the <curl> with respect to $\mathbf r$, moving it under the integral, and using $\nabla(1/|\mathbf r-\mathbf r'|)=-(\mathbf r-\mathbf r')/|\mathbf r-\mathbf r'|^3$ gives the <Biot-Savart law>
$$
\boxed{\mathbf B(\mathbf r)=\frac{\mu_0}{4\pi}\int_V
\frac{\mathbf j(\mathbf r')\mathbin\times(\mathbf r-\mathbf r')}{|\mathbf r-\mathbf r'|^3}\,dV'.}
$$