Calculating the magnetic field of straight cable

Task Description

Given a straight cable, which is placed on the zz -Axis. Assuming a constant current II is flowing from AA to BB , calculate the magnetic field in a point PP . Assume point AA lies at distance aa from the origin on the zz -Axis. Assume point BB lies at distance bb from the origin on the z-Axis. Assume point PP is at distance pp from the origin on the xx -Axis.

Hint: Biot-Savart law dB=μ0I4πdl×urr2d\vec B=\frac{\mu_0 \cdot I}{4\pi} \cdot \frac{d\vec l \times \vec u_r}{r^2} , where dBd\vec B is the magnetic field created by an infinitely small cable of length and orientation dld\vec l in a point which is at distance rr to the infinitely small cable and the unit vector of the direction of the point relative to the cable is ur\vec u_r . μ0\mu_0 is the permeability of free space and II is the current flowing through the cable.

Solution

We can write the points as A=(00a)A=\begin{pmatrix} 0 \\ 0 \\ a \\ \end{pmatrix} , B=(00b)B=\begin{pmatrix} 0 \\ 0 \\ b \\ \end{pmatrix} and P=(p00).P=\begin{pmatrix} p \\ 0 \\ 0 \\ \end{pmatrix}. In order to calculate the magnetic field, we use the Biot-Savart law which states that a infinite small cable segment with a current II creates an infinitely small magnetic field in the form of dB=μ0I4πdl×urr2d\vec B=\frac{\mu_0 \cdot I}{4\pi} \cdot \frac{d\vec l \times \vec u_r}{r^2} .

The unit vector ur\vec u_r points from a point along the cable (any point, the exact point is given by the angle α\alpha ) to the point PP , so the ur\vec u_r will also depend on alpha:

ur=(cosα0sinα)\vec u_r = \begin{pmatrix} \cos\alpha \\ 0 \\ \sin\alpha \\ \end{pmatrix}

We can write the formula of the magnetic field component wise, because it is a vector, then we can perform the crossproduct to get the formula:dB=(dBxdBydBz)=μ0I4πr2(00dl)×(cosα0sinα)=μ0I4πr2(0cosαdl0)d\vec B = \begin{pmatrix} dB_x \\ dB_y \\ dB_z \\ \end{pmatrix}=\frac{\mu_0 \cdot I}{4\pi r^2} \cdot \begin{pmatrix} 0 \\ 0 \\ dl \\ \end{pmatrix} \times \begin{pmatrix} \cos\alpha \\ 0 \\ -\sin\alpha \\ \end{pmatrix}=\frac{\mu_0 \cdot I}{4\pi r^2} \begin{pmatrix} 0 \\ \cos\alpha\cdot dl \\ 0 \\ \end{pmatrix} It turns out, that the magnetic field will only have a component in the yy direction, the components in zz and xx direction are always zero. Thus we only have to perform the calculation for the yy direction, which is given by dBy=μ0I4πr2cosαdldB_y=\frac{\mu_0\cdot I}{4\pi r^2}\cdot \cos\alpha \cdot dl We integrate dBydB_y to get the total magnetic field in the yy axis: dBy=abμ0I4πr2cosαdl\int dB_y=\int_a^b \frac{\mu_0\cdot I}{4\pi r^2}\cdot \cos\alpha \cdot dl This equation can be rewritten by pulling out all the constant factors (everything that does not depend on the relative position on the cable): By=μ0I4πabcosαr2dl.B_y= \frac{\mu_0\cdot I}{4\pi }\int_a^b \frac{\cos\alpha}{r^2} \,dl. Since α\alpha and rr depend on ll , we need to express them in terms of ll . By applying the pythagorean theorem, we know that r=l2+d2r=\sqrt{l^2+d^2} . Furthermore we know that sinα=dr=dl2+d2\sin\alpha=\frac{d}{r}=\frac{d}{\sqrt{l^2+d^2}} . So we can write the integral as By=μ0I4πabdl2+d23dl.B_y= \frac{\mu_0\cdot I}{4\pi }\int_a^b \frac{d}{\sqrt{l^2+d^2}^3} \,dl. As this integral is not easily solvable, we try a different approach, we try not to express α\alpha in terms of ll , but the other way round. Using simple trigonometry, we can write l=dtanαl=d\cdot\tan\alpha . We take the derivative and get dldα=dcos2α\frac{dl}{d\alpha}=\frac{d}{\cos^2\alpha} . This gives us By=μ0I4πabcosαr2dl=μ0I4πφaφbcosαr2dcos2αdα.B_y= \frac{\mu_0\cdot I}{4\pi }\int_a^b \frac{\cos\alpha}{r^2} \,dl= \frac{\mu_0\cdot I}{4\pi }\int^{\varphi_b}_{\varphi_a} \frac{\cos\alpha}{r^2}\cdot\frac{d}{\cos^2\alpha} \,d\alpha. Where φa\varphi_a and φb\varphi_b are the limits of integration expressed in therms of the angle α\alpha . Next we can write rr in terms of α\alpha as r=dcosαr=\frac{d}{\cos\alpha} . By=μ0I4πφaφbcosαcos2αd2dcos2αdα.B_y= \frac{\mu_0\cdot I}{4\pi }\int^{\varphi_b}_{\varphi_a} \cos\alpha\cdot\frac{\cos^2\alpha}{d^2}\cdot\frac{d}{\cos^2\alpha} \,d\alpha. The cosα\cos\alpha and dd terms cancle, which gives us By=μ0I4πdφaφbcosαdα.B_y= \frac{\mu_0\cdot I}{4\pi\cdot d}\int^{\varphi_b}_{\varphi_a} \cos\alpha \,\,d\alpha. Integrating cosα\cos\alpha gives sinα\sin\alpha , so we get By=μ0I4πd[sinα]φaφb=μ0I4πd(sinφbsinφa).B_y= \frac{\mu_0\cdot I}{4\pi\cdot d} \left[ \sin\alpha \right]^{\varphi_b}_{\varphi_a}= \frac{\mu_0\cdot I}{4\pi\cdot d} (\sin\varphi_b-\sin\varphi_a ).

Now can calculate the sinφa=aa2+p2\sin\varphi_a=\frac{a}{\sqrt{a^2+p^2}} and sinφb=bb2+p2\sin\varphi_b=\frac{b}{\sqrt{b^2+p^2}} . This gives By=μ0I4πd(bb2+d2aa2+d2).B_y=\frac{\mu_0\cdot I}{4\pi\cdot d} (\frac{b}{\sqrt{b^2+d^2}}-\frac{a}{\sqrt{a^2+d^2}} ). So the total magnetic field is given by B=μ0I4πd(bb2+d2aa2+d2)(010).B=\frac{\mu_0\cdot I}{4\pi\cdot d} (\frac{b}{\sqrt{b^2+d^2}}-\frac{a}{\sqrt{a^2+d^2}} ) \begin{pmatrix} 0 \\ 1 \\ 0 \\ \end{pmatrix} .