# Magnetic field due to a current

Gold Member

## Homework Statement

I set up myself to derive the formula of the magnetic field due to a current I carried by an infinite wire. At a point P situated at a distance d from the wire.

## Homework Equations

Ampere's law and Biot-Savart's law.

## The Attempt at a Solution

With Ampere's law, it's simple: $$\oint \vec B d\vec l = \mu _0 I$$, thus $$B=\frac{\mu _0 I}{2 \pi d}$$ and its direction is easy to figure out thanks to the right hand rule.
I'm having problems with Biot and Savart's law.
$$d\vec B =\frac{\mu _0}{4\pi} I d\vec l \times \frac{\vec r}{r^3}\Rightarrow \vec B=\frac{\mu _0}{4 \pi} \oint I d\vec l \times \frac{\vec r}{r^3}$$, thus $$B=\frac{\mu _0 I}{4 \pi d}$$. I don't see how I can get a factor 2 in this result, to make it coincide with the anterior result.

Aside question: If I understand well, an infinitesimal length dl of the wire contributes to the magnetic field only in an orthogonal plane to it, right? So that it doesn't contribute to points out of this plane, right?

Thanks for all.

How can you do a closed integral if the wire is from - infinity to + infinity. I think that there could be a factor of two also in that integral. because your wire is infinitely long, any point d could be said to be in the middle of the wire. So you would want to take the integral from -infinity to +infinity, which could be equal to twice the integral from 0 to infinity.

And I'm pretty sure the magnitude depends on the radial distance from the wire, and always acts orthogonal to that radial vector

Gold Member
How can you do a closed integral if the wire is from - infinity to + infinity. I think that there could be a factor of two also in that integral. because your wire is infinitely long, any point d could be said to be in the middle of the wire. So you would want to take the integral from -infinity to +infinity, which could be equal to twice the integral from 0 to infinity.
Because as I implied, I believe that the only part of the wire that contributes to the magnetic field at point P is the orthogonal projection of P into the wire. In other words, almost all the wire doesn't create the magnetic field at point P.
I wanted to know if I'm right on this.

And I'm pretty sure the magnitude depends on the radial distance from the wire, and always acts orthogonal to that radial vector
I'm also sure of that! Look at my formula. The d is the distance from the wire to the point P.

if only one part of the wire contributes you shouldnt be doing an integral at all right?

Gold Member
if only one part of the wire contributes you shouldnt be doing an integral at all right?

Hmm ok... I'm (very) confused.