$$ \text d \vec B=\frac{\mu_0I}{4\pi r^2}\,\text d \vec l\times \hat r $$

Biot-Savart Law.png

The resulting B-field at a point $P$ is a line integral

$$ \vec B_P=\frac{\mu_0}{4\pi}\int_C\frac{I\,\text d\vec l\times \hat r}{r^2} $$

B-field from loop of current

Consider a loop $C$ of current $I$ with radius $a$

$$ \begin{aligned} \text dB_z&=|\text d \vec B|\cos\theta=\frac{\mu_0 I \text d l}{4 \pi r^2}\cos\theta \\ B_z&=\oint_C\frac{\mu_0 I}{4\pi r^2}\frac{a}{r}\,\text dl=\frac{\mu_0 Ia}{4\pi(a^2+z^2)^{3/2}}\oint_C\text d l

\end{aligned} $$

$$ \vec B=\frac{\mu_0 Ia^2}{2(a^2+z^2)^{3/2}}\,\hat z $$

B-field from loop of current.png

B-field from infinitely long wire

B-field from infinitely long wire.png

Consider an infinite wire carrying current $I$

$$ r^2=z^2+s^2=\frac{s^2}{\cos^2\alpha} \; ; \; \tan\alpha=\frac{z}{s} \; ; \; \text d \vec l=\text dz\, \hat z $$

$\hat z \cdot \hat r=|\hat z||\hat r|\sin(\beta)\,\hat\theta=\cos(\alpha)\,\hat\theta$

$z=s\tan\alpha\Rightarrow \text dz=\frac{s\,\text d\alpha}{\cos^2\alpha}$

$$ \begin{aligned} \vec B(s)&=\frac{\mu_0 I}{4\pi}\int_C\frac{\hat z \times \hat r}{r^2}\,\text dz \\ &=\frac{\mu_0 I}{4\pi}\int_C\frac{\cos(\alpha)\,\hat \theta}{\frac{s^2}{\cos^2\alpha}}\frac{s\,\text d\alpha}{\cos^2\alpha} \\ &=\frac{\mu_0 I\,\hat\theta}{4\pi}\int_C\frac{\cos\alpha}{s}\,\text d\alpha \end{aligned} $$

$$ \vec B(s)=\frac{\mu_0 I\,\hat\theta}{4\pi}\left[ \frac{\sin\alpha}{s}\right]^\frac{\pi}{2}_{-\frac{\pi}{2}}=\frac{\mu_0 I}{2\pi s}\,\hat\theta $$

Force between two currents

Consider two parallel wires of length $l$, distanced by $s$ carrying currents $I_1,I_2$

$$ \vec B_1=\frac{\mu_0\vec I_1}{2\pi s} $$

$$ F_2=B_1I_2l $$

$\vec B_1 \perp \vec l_2$

$$ F_1=F_2=\frac{\mu_0 I_1I_2l}{2\pi s} $$

$$ \frac{F}{l}=\frac{\mu_0 I_1I_2}{2\pi s} $$

Force direction between two currents