= Solution
Apply <Ampère's law> on a concentric circle. Uniform <current density> is $J=I/(\pi a^2)$, so the enclosed current is $Ir^2/a^2$ inside and $I$ outside. With permeability $\mu_0$,
$$
\boxed{B(r)=\begin{cases}\mu_0Ir/(2\pi a^2),&0\le r\le a,\\\mu_0I/(2\pi r),&r\ge a.\end{cases}}
$$
The field circulates azimuthally by the <right-hand rule>. Its magnitude rises linearly from zero, is continuous and maximal at the surface, then falls as $1/r$. End effects are neglected.
\Image[/past-exam-of-the-physics-course-of-the-year-1-of-the-natural-sciences-course-of-the-university-of-cambridge/2010/paper-1-ia2010-rod-field.png]
{title=Magnetic field of a uniform-current rod}
{description=Original dimensionless Ampere-law field curve: B divided by its surface value versus radius divided by rod radius, with the surface and the change of radial slope marked.}
Back to article page