# Magnetic field of a solenoid

1. Aug 8, 2013

### OperationalAmp

I'm a bit confused with the equation for a long solenoid. The usual derivation has us consider a rectangular loop enclosing N number of currents over the length L through it. So by Ampere's law one gets B=μNI/L.

The currents and the loop look like this right?
---------
| . . . . |
---------
x x x x

However, why doesn't one also consider the magnetic field contribution from the x's also? So that the sum will be B=2μNI/L? In fact one can find an infinite number of these loops each giving B and the magnetic field will sum to infinity. Which clearly is nonsense.

It's like Gauss's Law for charges, I have +q and -q seperated symmetrically. I ask what's the magnitude of the electric field at a distance r from both charges. I enclose each with a Gaussian surface and I find the field from each of them +q/r² and -(-q/r²); the double negatives to take direction into consideration. Later I also have to add the fields together to get 2q/r², and not say q/r² is what's actually there just from taking one Gaussian surface.

I hope someone can enlighten me. Thank you!

Last edited: Aug 8, 2013
2. Aug 8, 2013

### OperationalAmp

I have realised what was my problem. I simply misunderstood Ampere's law. You see Ampere's law is going to give a magnetic field associated to a current flowing in one wire. And in the solenoid, it is one wire! So it is nonsense to sum the same magnetic field many times over. Only when there are two currents in separate wire do we add their magnetic fields. In the case of the solenoid, the approximation was that each wire winding are not connected to one another, thus explaining the factor N. So at the end of the day, one do not add magnetic fields arising from the current in the same wire.

Problem solved!