# Ampere's law on a long wire with varying current density [closed]

On a question from my book:

A long straight wire with a circular cross section of radius $R$ carries a current $I$. Assume the current density is not constant over the cross section of the wire, but rather varies as $J=\alpha r$ where $\alpha$ is a constant. Given $I, R$

Find $\alpha$

Find the magnetic field as a function of r both inside and outside the wire

I think it's just the calculus parts confuses me. My attempt:

$$J=\alpha r' = \frac{dI}{dA}$$ $$dI = 2 \pi r'^2 dr' \alpha$$

$$I = 2 \pi \alpha \int_0^R r'^2 dr'$$ $$I = 2 \pi R^3 \alpha /3$$ $$\alpha = \frac{3I}{2 \pi R^3}$$

from here you just use ampere's and I believe there's no variance issues?

$$\oint \vec{B} \cdot \vec{dl} = \mu_0 I_{in}$$

apply J=I/A

$$B 2 \pi r = \mu_0 \alpha r A$$

$$B = \frac{\mu_0 \alpha A}{2 \pi}$$]

$$B = \frac{3 \mu_0 I r^2}{2 R^3}$$

Is this right? The units seem to line up so I'm hopeful.

Outside the wire is treated as the general uniform wire case I assume and am not too worried about that.

-

## closed as off-topic by tpg2114, centralcharge, John Rennie, Qmechanic♦Nov 9 '13 at 16:31

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" – tpg2114, centralcharge, John Rennie, Qmechanic
If this question can be reworded to fit the rules in the help center, please edit the question.

To check the first part you can check the units and see if they work out. Then you can pretty much only be off by a prefactor. To check the prefactor I would just recalculate $I$ in terms of $\alpha$ and $R$. That is, I would evaulate $\int \alpha r 2 \pi r dr$, plugging in your claimed expression for $\alpha$, and see if this does indeed give me $I$.
To test the value for $B$, you can check dimensions. Your expression has the same dimensions of $\mu_0 I /R$ so that is good. Another thing you can do is test the limits $r \to 0$ and $r \to R$. Do you get what you expect in these cases?