Solution (source code)

= Solution

For a steady filamentary <electric current> $I$ in vacuum, the <Biot-Savart law> is
$$
\boxed{\mathbf B(\mathbf r)=\frac{\mu_0 I}{4\pi}
\int\frac{d\boldsymbol\ell'\times(\mathbf r-\mathbf r')}{|\mathbf r-\mathbf r'|^3}.}
$$
The line element points with conventional <electric current>, and the <cross product> fixes the <magnetic flux density> direction by the <right-hand rule>.

As an application, an infinitely long straight wire has circular symmetry about its axis. At perpendicular distance $s$,
$$
B_\phi(s)=\frac{\mu_0I}{4\pi}\int_{-\infty}^\infty
\frac{s\,dz'}{(s^2+z'^2)^{3/2}}
=\boxed{\frac{\mu_0I}{2\pi s}.}
$$
Its direction follows the <right-hand rule>. The following part applies the same law to a circular current loop.