Solution (source code)

= Solution

Outside the wire, the <Amperian loop> encloses the entire <electric current>, so
$$
\boxed{B(r)=\frac{\mu_0I}{2\pi r},\qquad r>a.}
$$
Its direction is again azimuthal, fixed by the <right-hand rule>. The inside and outside formulas join continuously at the maximum $B(a)=\mu_0I/(2\pi a)$. The outer branch decays as $1/r$.

\Image[/past-exam-of-the-physics-2-paper-of-the-university-of-oxford/2016-resit-wire-magnetic-field.png]
{title=Magnetic-field magnitude inside and outside a uniformly conducting cylindrical wire}