We introduced Ampere's Law last time, which allowed the calculation of the magnetic field due to current elements with a significant amount of symmetry.

Today, we will learn to calculate the magnetic field due to current elements from “first principles”.

The Biot-Savart law provides the basis for obtaining the field (in principle) due to an arbitrary current distribution.

The field at some point in space due to an infinitesimal length $d\vec{l}$ through which a current $I$ flows is

$$d\vec{B}=\frac{\mu_{0}I}{4\pi}\frac{d\vec{l}\times\hat{r}}{r^{2}}$$

$\vec{r}$ is the displacement vector from the element $d\vec{l}$ to to the point and $\hat{r}$ is the unit vector in the direction of $\vec{r}$.

In the above diagram the magnitude of $d\vec{B}$ is

$$dB=\frac{\mu_{0}Idl\sin\theta}{4\pi r^{2}}$$

The total magnetic field is found by integrating over all the elements

$$\vec{B}=\int d\vec{B}=\frac{\mu_{0}I}{4\pi}\int\frac{d\vec{l}\times\hat{r}}{r^{2}}$$

We have to pay attention the directions of the $d\vec{B}$ vectors when we evaluate this integral!

$$\vec{B}=\int d\vec{B}=\frac{\mu_{0}I}{4\pi}\int\frac{d\vec{l}\times\hat{r}}{r^{2}}=\frac{\mu_{0}I}{4\pi}\int_{-\infty}^{\infty}\frac{dy\sin\theta}{r^{2}}$$

since $dy=dl$.

We need to write $r$ in terms of $y$, $r^{2}=R^{2}+y^{2}$ but we also need to realize that $y$ and $\theta$ are related to each other and $\sin\theta=\frac{R}{r}$.

We need to write $y$ in terms of $\theta$ i.e. $y = -R/\tan\theta$ and therefore:

$$dy = +\frac{Rd\theta}{\sin^2\theta} = \frac{Rd\theta}{(R/r)^2} = \frac{r^2d\theta}{R}$$

From the figure, we see that $y=-\infty$ corresponds to $\theta=0$ and $y=+\infty$ corresponds to $\theta=\pi$. Therefore:

$$|\vec{B}| = \frac{\mu_0I}{4\pi R}\int_{\theta=0}^{\pi}\sin\theta\cdot d\theta = \frac{\mu_0I}{2\pi R} $$

Taking in to account the Biot-Savart Law

$$d\vec{B}=\frac{\mu_{0}I}{4\pi}\frac{d\vec{l}\times\hat{r}}{r^{2}}$$

and/or our previous result for an infinite wire

$$B=\frac{\mu_{0}I}{4\pi R}\left[-\cos\theta\right]_{0}^{\pi} =\frac{\mu_{0}I}{4\pi}\left[\frac{1}{R}\frac{y}{(R^{2}+y^{2})^{1/2}}\right]_{-\infty}^{+\infty}=\frac{\mu_{0}I}{4\pi}\frac{2}{R}=\frac{\mu_{0}I}{2\pi R}$$

we can deduce that for any finite straight length of wire starting at $y_{1}$ and ending at $y_{2}$, where the point at which the field is measured is considered to be the origin,

$$B=\frac{\mu_{0}I}{4\pi R}\left[-\cos\theta\right]_{\theta_1}^{\theta_2}=\frac{\mu_{0}I}{4\pi R}\left[\frac{y}{(R^{2}+y^{2})^{1/2}}\right]_{y_{1}}^{y_{2}}$$

In the above figure it can be shown that the field at point 1 is

$$B=\frac{\mu_{0}I}{4\pi}\frac{2}{\sqrt{5}}\frac{1}{d}$$

at point 2 is

$$B=\frac{\mu_{0}I}{4\pi}\frac{1}{\sqrt{2}}\frac{1}{d}$$

and at point 3 is

$$B=0$$

The Biot-Savart law $d\vec{B}=\frac{\mu_{0}I}{4\pi}\frac{d\vec{l}\times\hat{r}}{r^{2}}$ tells us that current parallel to $\hat{r}$, or in other words current flowing directly towards or away from a point does not produce a magnetic field.

So in the following example we only need to consider the current due the curved part of the wire.

Everywhere along the wire $d\vec{l}$ is perpendicular to $\hat{r}$ and the contribution from each length element points in the same direction, so $dB=\frac{\mu_{0}I\,dl}{4\pi R^{2}}$.

$$B=\int\,dB=\frac{\mu_{0}I}{4\pi R^{2}}\int\,dl=\frac{\mu_{0}I}{4\pi R^{2}}\left(\frac{1}{4}2\pi R\right)=\frac{\mu_{0}I}{8R}$$

In the case of a current loop the Biot-Savart Law, $d\vec{B}=\frac{\mu_{0}I}{4\pi}\frac{d\vec{l}\times\hat{r}}{r^{2}}$, tells us that magnetic field $d\vec{B}$ for a point on the $x$ axis due to a length element $d\vec{l}$ has magnitude

$$dB=\frac{\mu_{0}I\,dl}{4\pi r^{2}}$$.

Here we should note that $d\vec{l}$ is always perpendicular to $r$ and the direction of the field that is produced may be determined by the right hand rule.

We can note that the symmetry of the situation will lead to the magnetic field perpendicular to the axis cancelling out when we integrate over all the contributions from the loop, so we can write that

$$B=B_{||}=\int\,dB_{||}=\int\,dB\cos\phi=\int\,dB\frac{R}{r}=\int\,dB\frac{R}{(R^{2}+x^{2})^{1/2}}$$

$$=\int\,\frac{\mu_{0}I\,dl}{4\pi r^{2}}\frac{R}{(R^{2}+x^{2})^{1/2}}=\frac{\mu_{0}I}{4\pi}\frac{R}{(R^{2}+x^{2})^{3/2}}\int\,dl$$

$$=\frac{\mu_{0}I}{4\pi}\frac{R}{(R^{2}+x^{2})^{3/2}}2\pi R=\frac{\mu_{0}IR^{2}}{2(R^{2}+x^{2})^{3/2}}$$

We saw previously that a current loop in a magnetic field could be described by giving it a dipole moment, $\vec{\mu}=NI\vec{A}$.

We can now see that the field due the the loop can also be described in these terms

$$B=\frac{\mu_{0}IR^{2}}{2(R^{2}+x^{2})^{3/2}}=\frac{\mu_{0}}{2\pi}\frac{\mu}{(R^{2}+x^{2})^{3/2}}$$

We can use Falstad's applet to look at the field distribution around the loop.

We can see that just like for the electric dipole as we get further away from the dipole the field decreases by an inverse cube law

For $x>>R$,

$$B=\frac{\mu_{0}}{2\pi}\frac{\mu}{x^{3}}.$$

We could use the Biot-Savart law to find the field at any point, not just along the dipole axis..but the symmetry would not be as kind to us.