Solution (source code)

= Solution

For a steady uniform <current density> in a nonmagnetic wire, the enclosed <electric current> at radius $r<a$ is $I_{\mathrm{enc}}=Ir^2/a^2$. A circular <Amperian loop> and <Ampère's law> then give
$$
\boxed{B(r)=\frac{\mu_0Ir}{2\pi a^2},\qquad 0\leq r<a.}
$$
The <magnetic field> circles the wire according to the <right-hand rule> relative to the current direction. Its magnitude increases linearly from zero on the axis. The uniform-current assumption excludes <skin effect>.