# Magnetic Field along an Infinitely Long Current-Carrying Wire

My question regards the equations below, which provide the y and z components of magnetic flux density for a current-carrying wire of length 'a', at a point x, y, z.

where,

I was tasked with finding the equations for the y and z components of magnetic field in an infinitely long current-carrying wire. After dividing by the permeability of free space, I took the limit as 'a' goes to infinite. This gave me a result of zero for both the y and z components of magnetic field. Wouldn't the y and z components only be dependent on the perpendicular distance from the wire though, since along the x direction the magnetic field is uniform?

• There is a fundamental difference between a finite and infinite wire carrying a DC current. The current along the wire corresponds to a flow of charges, so if you have a finite wire, the charges have nowhere to go at the ends of the wires. Thus, there must be a buildup of charge at the ends of the wire, which constitutes an increasing electric field. If you look at Ampere's law with Maxwell's modification, the changing electric field must be accounted for in the curl of the magnetic field. This is not the case for an infinite wire, where there is no charge build up. Dec 25, 2021 at 16:17
• Actually, taking a closer look at those equations, when a is large, both r1x and r2x approach a. So the last term in By and Bz are both approximately -1 - 1 = -2. I'm not sure how you're getting zero. Dec 25, 2021 at 16:22

Just to be clear, those equations for $$\B_y\$$ and $$\B_z\$$ are almost (but not exactly) the magnetic field associated with a finite segment of wire between the points $$\(-a,0,0)\$$ and $$\(a,0,0)\$$, which has a total length of $$\2a\$$ with a current of $$\\vec{I} = (I, 0, 0)\$$ in the wire.

Taking the limit, \begin{align} \lim_{a\rightarrow \infty} B_y &= \frac{\mu_0 I}{4 \pi} \frac{z}{y^2 + z^2} \lim_{a\rightarrow \infty} \frac{x-a}{r_{1x}}-\frac{x+a}{r_{2x}}\\ &= \frac{\mu_0 I}{4 \pi} \frac{z}{y^2 + z^2} \lim_{a\rightarrow \infty} \frac{-a}{\sqrt{a^2}}-\frac{a}{\sqrt{a^2}}\\ &= -\frac{\mu_0 I}{2 \pi} \frac{z}{y^2 + z^2} \end{align} This is clearly not 0 everywhere, but has a $$\1/r\$$ dependency (where $$\r\$$ is the perpendicular distance), and also doesn't depend on $$\x\$$ anymore. You can repeat the same process to find $$\B_z\$$.

There is a separate easier approach for deriving the B field generated by an infinite line of current which uses Ampere's Law, control surfaces and loops (Stokes' theorem), and symmetry arguments, though that derivation is left as an exercise to the reader.

What I mean by "almost" is that the $$\B_y\$$ and $$\B_z\$$ equations you show were derived assuming

$$\nabla \times \vec{B} = \mu_0 \vec{J}$$

which is only true if $$\\partial_t \vec{E} = 0\$$. However, an isolated non-closed finite segment this can't be true since we have a change in the charge density at both ends of the wire (since $$\\nabla \cdot \vec{J} \neq 0\$$ at the two ends). Luckily, for a long enough segment of wire if $$\x \ll a\$$ and $$\y^2 + z^2 \ll a^2\$$ the field approaches the true B field.

These equations are still useful for finite segment lengths, though, since we can rotate/translate/stretch the results and superimpose multiple segments together to get a closed loop of wire, in which case we satisfy $$\\nabla \cdot \vec{J} = 0\$$ and the computed B field is exact.