## Challenge Example: Magnetic Field from a Ring of Current

Suppose you have a circular ring, in which which there is a current $I$. The radius of the ring is $R$. The current produces a magnetic field. What is the magnetic field at the center of the ring?

#### Facts

- The current in the ring is $I$.
- The radius of the ring is $R$.

#### Lacking

- $\vec{B}$

#### Approximations & Assumptions

- If we orient the ring in the $xy$-plane and look down, the current flows in the counterclockwise direction.
- The current is steady.
- There are no other contributions to the magnetic field.

#### Representations

- We represent the Biot-Savart Law for magnetic field from a current as

$$\vec{B} = \int \frac{\mu_0}{4 \pi}\frac{I \cdot d\vec{l}\times \vec{r}}{r^3}$$

- We represent the situation below. We put the center of the ring at the origin. We choose cylindrical coordinates because we will be integrating over the length of the ring, and being able to represent its radius as constant will simplify calculations.

### Solution

Below, we show a diagram with a lot of pieces of the Biot-Savart Law unpacked. We show an example $\text{d}\vec{l}$, and a separation vector $\vec{r}$. Notice that $\text{d}\vec{l}$ is directed along the segment, in the same direction as the current. The separation vector $\vec{r}$ points as always from source to observation.

Let's start breaking down some of the components of the Biot-Savart Law we listed in our representations. We can say for now that $\text{d}\vec{l}$ is directed in the $\hat{\phi}$ direction. (Note: We could also express $\hat{\phi}$ in Cartesian coordinates as $\hat{\phi} = -\sin(\phi) \hat{x} + \cos(\phi) \hat{y}$. This approach would yield the same solution, but we'll stick with cylindrical coordinates for this solution.) The length of our $\text{d}\vec{l}$ is $R\text{d}\phi$ which comes from the arc length formula. We can therefore write $$\text{d}\vec{l} = R\text{d}\phi\hat{\phi}$$

We also represent the separation vector using a cylindrical unit vector, too: $$\vec{r} = \vec{r}_{\text{obs}} - \vec{r}_{\text{source}} = 0 - R\hat{s} = -R\hat{s}$$

Now, we combine the two vectors in their cross product: $$\text{d}\vec{l} \times \vec{r} = (R\text{d}\phi\hat{\phi}) \times (-R\hat{s}) = R^2 \text{d}\phi (-\hat{\phi} \times \hat{s}) = R^2 \text{d}\phi \hat{z}$$

Notice that even though the direction of $\hat{\phi}$ and $\hat{s}$ depend on the angle $\phi$ at which the vectors exist, their cross product, $\hat{z}$, does not depend at all on $\phi$. This will greatly simplify our integration later.

In order to set up the integration, we also need the magnitude of the separation vector, which conveniently is just $R$. This should make some intuitive sense because everywhere on the ring would be the same distance away from the center. Lastly, we need the bounds on our integration. We will be integrating over $\text{d}\phi$. We want to account for every piece of the ring, so it will sufficient to set our integration from $\phi=0$ to $\phi=2\pi$.

\begin{align*} \vec{B} &= \int \frac{\mu_0}{4 \pi}\frac{I \cdot d\vec{l}\times \vec{r}}{r^3} \\ &= \int_0^{2\pi} \frac{\mu_0}{4 \pi}\frac{I \cdot R^2 \text{d}\phi \hat{z}}{R^3} \\ &= \frac{\mu_0}{4 \pi}\frac{I \hat{z}}{R} \int_0^{2\pi} \text{d}\phi \\ &= \frac{\mu_0 I}{2R} \hat{z} \end{align*}

We show the visual result below.