# Magnetic field due to infinite current carrying wire in the X and Y axes

wcjy
Homework Statement:
Consider 2 identical infinite current-carrying wires which runs along the X and Y axes
respectively. They carry identical currents I and the currents flow in the directions of the
axes. Find the net magnetic field (in vector form) at the coordinate (x, y, z) = (4,4,5).
Relevant Equations:
Biot savar law
$$B = \frac {\mu_0 I}{2 \pi r}$$

By Right-hand Grip Rule, the direction of the magnetic field by wire in y-axis is into the paper (z)
while the direction of the magnetic field by wire in X-axis is upwards (+i)

The answer state the Magnetic field is in the (i - y) direction though.

Next calculating the magnitude,
Distance of point to the Y axis is $$\sqrt{4^2 + 4^2} = \sqrt{32}$$
Distance of point to the X axis is $$\sqrt{4^2 + 5^2} = \sqrt{41}$$

Therefore, Magnetic field = $$B = \frac {\mu_0 I}{2 \pi \sqrt{32}} +\frac {\mu_0 I}{2 \pi \sqrt{41}}$$
This will give some weird fraction which is wrong.

Correct answer is $$B = \frac {5\mu_0 I}{82 \pi } (\hat{i} - \hat{j})$$

Delta2

wcjy
Oh wait is the Magnetic field from wire in Y axis in the (z and x direction) and b field from wire in x-axis in the ( -z and direction) so when adding those B field, the z cancels out?

Homework Helper
Gold Member
I think so too , the z-component cancels. To see it clearly you must work with both fields in the same cartesian coordinate system. The popular expression $$\vec{B}=\frac{\mu_0}{2\pi}\frac{I}{r}\hat\phi$$ is in cylindrical coordinate system, not in cartesian.

I think in the OP, you do two mistakes: one mistake is that the distance of the (4,4,5) point to the y-axis is i believe ##\sqrt{4^2+5^2}##. The other mistake is that you can't just add those two B-fields cause each has its own ##\hat\phi## direction (hard to explain this without doing a diagram)...

wcjy
wcjy
Ok i think i realized my first mistake.
Ok i just realized this. can help me check if what i said is correct.

I drew a 2d diagram for z and x-axis for the wire (yaxis).
the b field will be pointing in the i and z direction.
z direction is $$B = \frac{\mu_o I}{2 \pi r }sin \theta$$
while the i direction is $$\frac{\mu_o I}{2 \pi r }cos \theta$$
cos theta = 5/ sqrt 41
so $$B = \frac{5\mu_o I}{2 *\sqrt{41}*\sqrt{41}*\pi }$$
$$B = \frac{5\mu_o I}{82 \pi } (\hat{i})$$

for the other wire is the same.
but $$B = \frac{5\mu_o I}{82 \pi } (\hat{j})$$

But arent I suppose to add or do the sqrt( B^2 + B^2 ) thing?

Homework Helper
Gold Member
Yes you are supposed to add them but add them as vectors of a cartesian coordinate system, since the answer given is a vector in a cartesian coordinate system (it contains the unit vectors ##\hat i,\hat j##).

wcjy
Homework Helper
Gold Member
I think you calculated correctly the i-component of the B-field from the wire in y-axis, so the result in vector form would be ##\vec{B_{y wire}}=\frac{5\mu_0 I}{82\pi}\hat i+...\hat k## but we are missing the z or ##\hat k##-component.

Then write a similar expression for the B-field from the wire in x-axis. Then just add them as vectors.

wcjy
wcjy
to 'add' them, isn't it $$\sqrt {2 (\frac{5\mu_o I}{82 \pi })^2}$$

wcjy
I think you calculated correctly the i-component of the B-field from the wire in y-axis, so the result in vector form would be ##\vec{B_{y wire}}=\frac{5\mu_0 I}{82\pi}\hat i+...\hat k## but we are missing the z or ##\hat k##-component.

Then write a similar expression for the B-field from the wire in x-axis. Then just add them as vectors.
for the k direction, its just sin theta. but it cancels out with the other wire. so i left it out

Homework Helper
Gold Member
to 'add' them, isn't it $$\sqrt {2 (\frac{5\mu_o I}{82 \pi })^2}$$
That's the magnitude of the total vector. You are being asked for the vector of total magnetic field (if i judge from the given answer) and not for the magnitude of this vector.

wcjy
wcjy
oh so if it is
$$\frac{5\mu_o I}{82 \pi } (\hat{i})$$ and $$\frac{5\mu_o I}{82 \pi } (-\hat{j})$$,
the answer is $$\frac{5\mu_o I}{82 \pi } (\hat{i}-\hat{j})$$ ??

Homework Helper
Gold Member
yes that's what you get if you add the first two as we do in vector addition.

wcjy
wcjy
Okay. Thanks so much!

Delta2