# Can we use Ampere's law to compute the magnetic field inside a cylinder with circular current density?

I am having trouble computing the magnetic field from a cylinder carrying a uniform circular current density j as shown below.

My approach was to use Ampere's law, with a rectangular amperian loop with the two opposite sides parallel to the cylinder axis, as shown here :

I then want to determine the magnetic field in each region :

1. r < $$R_i$$
2. $$R_i$$ < r < $$R_e$$
3. r > $$R_e$$

For the first region, Ampere's law gives me :

$$\int \overrightarrow{B} \cdot \overrightarrow{dl} = |\overrightarrow{B}| \cdot l$$

And the enclosed current is :

$$I_{enc} = \mu_0 \cdot j \cdot l \cdot (R_e - R_i)$$

So that the magnetic field inside is $$|\overrightarrow{B}| = \mu_0 \cdot j \cdot (R_e - R_i)$$.

I hope this part is correct. I am struggling with the second point :

Should I move my amperian loop so that the lower part of my loop is within the intermediate region ? Because if I do not move the loop, I find that that $$\overrightarrow{B} \cdot \overrightarrow{dl} = 0$$, which would mean that there is no current enclosed, and that is clearly not the case.

Without moving the loop, is there a way to get the magnetic field in this intermediate region ?

Finally I have a similar question for the outter region. My intuition is that the B field should be zero, as for an infinite solenoid, but I am not sure if I can use Ampere's law to prove this.

I have looked into another post : Contradiction using amperes law to calculate magnetic field $B$

But I am not sure how to understand what is explained there.

I hope my problem is clear, please tell me if you need more details about anything.

You need to be more rigorous ( and watch what you mean by "B") and I have no idea how you came to your expression for the B field inside the solenoid without first proving B = 0 outside.

In this situation your logic is incorrect. We can only say that

$$\oint \vec{B} \cdot \vec{dl} = |\vec{B}(\rho)|l + -|\vec{B}(\rho+w)|l$$

If the solenoid is infinite. As the above analysis is only true when B is parrallel to the sides of the loop, which only happens on infinite solenoids.

Applying amperes law for a rectangular loop enclosing no current density of width w, length l.

$$0 = |\vec{B}(\rho)|l + -|\vec{B}(\rho+w)|l$$

$$|\vec{B}(\rho)| = |\vec{B}(\rho+w)|$$

So for an infinite loop, the B field is independant on $$\rho$$, for loops enclosing no current.

We know $$\vec{B}(\infty) = 0$$

Because we know $$\vec{B}$$ is independant on $$\rho$$ we know all of the field outside the solenoid must be 0 ! ( as this equation only applies to loops enclosing no current).

Now, to find the field for (2) we need to use an amperian loop, where the left side is inside the current, and the right side is outside of the solenoid. (Make sure to get a surface orientation, and stick with it. E.g anti clockwise with the line integral, with the orientation da being out of the page)

The only contribution to the line integral is

$$-|\vec{B}(\rho)|l$$

The area which encloses the current is a rectangle with a length l with a width of $$(R_{e} - \rho)$$, in my orientation, da and $$\vec{J}$$ are opposite eachother.

$$-|\vec{B}(\rho)|l = -\mu_0 |\vec{J}| l (R_{e} - \rho)$$

$$|\vec{B}(\rho)| = \mu_0 |\vec{J}| (R_{e} - \rho)$$

$$\vec{B}(\rho) = \mu_0 |\vec{J}| (R_{e} - \rho) \hat z$$

• You're incorrect. An amperian loop is for when current resembles a straight wire. This current density is of a solenoid.Applying an amperian ring would give 0 enclosed current at all points. Apr 28 at 17:18
• Interesting... You are correct I was not seeing the right current density. Then it is solenoidal. (Very strange setup up but it is what it is). Anyways I removed my comments, and had incorrectly downvoted your answer. Thankfully you had a small typo with "rigorous" so I corrected it to allow me to retract my downvote. Apr 28 at 17:21
• I see, I did not know how to justify that I "knew" the B field outside would be 0. From this, the applicarion ofAmpere's law is clear. However, should we not have another permittivity than $\mu_0$ for region (2) ? Apr 29 at 7:05
• Permitivity should only be changed if we are modelling region 2 as having molecular dipoles. We are only modelling it as having free current, so no. But even then. Biot savart is independant on the permitivity. You mean permeability, and no Apr 29 at 8:43