I am reading through Introduction to Electrodynamics by David J. Griffiths and came across the following problem:

A steady current $I$ flows down a long cylindrical wire of radius $a$. Find the magnetic field, both inside and outside the wire if the current is distributed in such a way that $J$ is proportional to $s$, the distance from the axis.

If $J$ is proportional to the distance from the axis $r$, then we have:


We also have:

$$\iint_{\Sigma} \vec{J}(\vec{r})\cdot\:\mathrm{d}\vec{A}=I$$

We therefore have:

$$\int_{0}^{2\pi}\int_{0}^{a}kr^{2}\:\mathrm{d}r\:\mathrm{d}\theta=\frac{2\pi k a^{3}}{3}=I $$

And therefore we have:

$$\vec{J}(\vec{r})=\frac{3Ir}{2\pi a^{3}}\,\boldsymbol{\hat{z}}$$

Using Ampére's law we have:

$$2\pi r B = \mu_{0}I \implies \vec{B}(\vec{r})=\frac{\mu_{0} I}{2\pi r}\,\boldsymbol{\hat{\theta}}$$

If we take a Ampérian loop inside the cylinder, we have:

\begin{align} 2\pi r B &= \mu_{0} \iint_{\Sigma}\vec{J}(\vec{r})\cdot\:\mathrm{d}\vec{A} \\ &= \mu_{0}\int_{0}^{2\pi}\int_{0}^{r}\frac{3 I r'^{2}}{2\pi a^{3}}\:\mathrm{d}r'\:\mathrm{d}\theta \\ &= \frac{\mu_{0} I r^{3}}{a^{3}} \end{align}

And therefore we have:

$$\vec{B}(\vec{r})=\begin{cases}\frac{\mu_{0} I r^{2}}{2\pi a^{3}} \,\boldsymbol{\hat{\theta}} & r < a \\ \frac{\mu_{0} I}{2\pi r}\,\boldsymbol{\hat{\theta}} & r \geq a \end{cases}$$

Is this the correct magnitude and direction of the magnetic field?


closed as off-topic by Rob Jeffries, Danu, ACuriousMind, Qmechanic Sep 9 '15 at 14:34

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Homework-like questions should ask about a specific physics concept and show some effort to work through the problem. We want our questions to be useful to the broader community, and to future users. See our meta site for more guidance on how to edit your question to make it better" – Rob Jeffries, Danu, ACuriousMind, Qmechanic
If this question can be reworded to fit the rules in the help center, please edit the question.


Those answers are correct. A first check is to see if the units match. You can always check direction by the right hand rule. The part for outside the wire is the same as if the current were uniform, because the enclosed current is all that matters when you have enough symmetry for Ampére's Law. For the part inside the wire, check to see if the function makes sense: for a uniformly distributed current, the magnetic field grows linearly with the distance from the axis, so it makes sense that for this current it would grow like the square of the distance from the axis.

  • $\begingroup$ Final check - continuity of the solution at the boundary $r=a$. Which complements the sanity check you did. $\endgroup$ – Floris Oct 7 '14 at 4:10

Not the answer you're looking for? Browse other questions tagged or ask your own question.