# Derivation Magnetic Field of a Helmholtz Coil

## Table of contents

Here we want to derive the **magnetic field** \(B\) along the symmetry axis. For this purpose, a Helmholtz coil with **radius** \(R\), with \(N\) **turns** and with **distance** \(d\) is placed in a coordinate system in such a way that the coordinate origin lies in the center of the Helmholtz coil. One coil is then at \(z = d/2\) and the other coil at \(z=-d/2\).

An electric current \(I\) flows through both coils of the Helmholtz coil. In the following, both the case where the two currents flow in the same direction and in the opposite direction will be considered.

The magnetic field of an arbitrarily shaped current-carrying wire can be calculated using the Biot-Savart law:

**Biot-Savart law for a thin wire**

Since there are two coils involved, the integral 1

is divided into two contributions, each representing the magnetic field generated by the respective coil. Using the superposition principle, we can then add the two contributions together to get the total magnetic field 1

:

**Biot-Savart law for the first and second coil**

\boldsymbol{B}_2(\boldsymbol{r}) & ~=~ \frac{\mu_0 \, I}{4\pi} \int_{S_2} \frac{\boldsymbol{r}-\boldsymbol{R}}{|\boldsymbol{r}-\boldsymbol{R}|^3} \times \text{d}\boldsymbol{s} \end{align} $$

Here \(S_1\) is the integration path around the first coil and \(S_2\) is the integration path along the second coil. The total path for the two coils is : \(S = S_1 + S_2\).

Since we want to calculate the magnetic field along the symmetry axis, the location vector \( \boldsymbol{r} \) to the field point looks like this:

**Position vector to field point**

The infinitesimal line element \( \text{d}\boldsymbol{s} \) runs in both coils at the distance \(R\) from the \(z\) axis. The integration over the line elements happens in cylindrical coordinates along the \(\varphi\) coordinate:

**Line element in cylindrical coordinates**

Here \(\boldsymbol{\hat{\varphi}}\) is the unit vector in \(\varphi\) direction in cylindrical coordinates - thus runs in a circle around the coil.

## Calculate the magnetic field of the first Helmholtz coil

Let's first look at the coil at \(z=d/2\), which generates the magnetic field \(\boldsymbol{B}_1(\boldsymbol{r})\). The position vector \( \boldsymbol{R} \) to the conducting element of the coil at \(z = d/2\) is in cylindrical coordinates as follows:

**Position vector to the line element of the first coil**

For the magnetic field \(\boldsymbol{B}_1(\boldsymbol{r})\) in Eq. 2

, we need the connecting vector \(\boldsymbol{r} - \boldsymbol{R}\). It is the difference between Eq. 3

and Eq. 5

:

**Connecting vector for the first Helmholtz coil**

Then we still have to calculate for Eq. 2

\(|\boldsymbol{r} - \boldsymbol{R}|^3\):

**Connecting vector magnitude to the power of three for the first coil**

& ~=~\left( R^2 + (z-d/2)^2 \right)^{3/2} \end{align} $$

In the last step we used the trigonometric relation \( \cos(\varphi)^2 + \sin(\varphi)^2 = 1\).

Then, according to Eq. 2

, we have to calculate the cross product between the connecting vector 6

and the line element vector 4

:

**Cross product between the connecting vector and line element for the first coil**

~&=~ -R \begin{bmatrix} (z-d/2) \, \cos(\varphi) \\ (z-d/2) \, \sin(\varphi) \\ R \end{bmatrix} \, \text{d}\varphi \end{align} $$

Now we need to integrate each component of Eq. 9

along the \(\varphi\) coordinate, from 0 to \(2\pi\). Fortunately, we do not have to integrate the magnitude in Eq. 7

because it is independent of \(\varphi\):

**Calculate integral for the first coil**

~&=~ -R \left( \begin{bmatrix} (z-d/2) \, \sin(2\pi) \\ -(z-d/2) \, \cos(2\pi) \\ 2\pi \,R \end{bmatrix} - \begin{bmatrix} (z-d/2) \, \sin(0) \\ -(z-d/2) \, \cos(0) \\ 0 \,R \end{bmatrix} \right) \\\\

~&=~ -R \begin{bmatrix} 0 \\ 0 \\ 2\pi \, R \end{bmatrix} \\\\

~&=~- 2\pi \, R^2 \, \boldsymbol{\hat{z}} \end{align} $$

Here \(\boldsymbol{\hat{z}}\) is the unit vector in \(z\) direction. Substituting the magnitude 7

of the connecting vector and the evaluated integral 9

into the Biot-Savart law 2

yields the desired magnetic field of *one* turn:

**Magnetic field of the first coil of one turn**

The coil has \(N\) turns, therefore the current through the coil is \(N\)-fold: \(N \, I\). Therefore the magnetic field is also \(N\)-fold:

**Magnetic field of the first Helmholtz coil**

## Calculate the magnetic field of the second Helmholtz coil

Now we have to calculate the magnetic field \(\boldsymbol{B}_2(\boldsymbol{r})\) in eq. 2

for the second coil at \(z=-d/2\). For the second coil, proceed in the same way as with the first coil. The position vector \( \boldsymbol{R} \) to the line element of this coil is in cylindrical coordinates:

**Position vector for the second coil**

As you can see, the position vector is exactly the same as for the first coil, only with a minus sign in the third component. The only thing that changes in the result for the magnetic field \(\boldsymbol{B}_2\) is that \((z-d/2)\) becomes \((z+d/2)\):

**Magnetic field of the second Helmholtz coil**

The superposition, i.e. the addition of the magnetic fields 11

and 13

gives the total magnetic field of the Helmholtz coil:

**Magnetic field of a Helmholtz coil along the symmetry axis (same current direction)**

In the case \(d=R\) the magnetic field inside the coil becomes homogeneous (constant). The minus sign in 14

simply says that the current flows counterclockwise in the coils.

If the current in the two coils does not flow in the same direction, but one flows clockwise \(I\) and the other counterclockwise \(-I\), then Eq. 14

becomes:

**Magnetic field of a Helmholtz coil along the axis of symmetry (opposite direction of current)**

As you can see from illustration 4: If the current in the coils flows in the *opposite* direction, then the magnetic field between the coils is linear.