= On-axis magnetic field of a finite solenoid
{title2=$B_z(z)$}
Model a finite <solenoid> as a continuum of coaxial turns shaped as <circles> of <radius> $a>0$, uniformly distributed over length $\ell$ with <solenoid turn density> $n=N/\ell$. Put its centre at $z=0$, so its ends are $z=\pm\ell/2$. With the same <electric current> orientation as in the <long-solenoid approximation>, its axial <magnetic field> is
$$
B_z(z)=\frac{\mu_0nI}{2}
\left[
\frac{z+\ell/2}{\sqrt{a^2+(z+\ell/2)^2}}
-\frac{z-\ell/2}{\sqrt{a^2+(z-\ell/2)^2}}
\right].
$$
This formula applies only on the axis, where <symmetry> cancels the transverse <magnetic field>. It does not describe points off the axis. It is exact for the continuum circular-turn model, which neglects winding thickness, discrete wire spacing, and helical advance. https://web.mit.edu/8.02t/www/test/materials/StudyGuide/guide09_revised.pdf[MIT 8.02 course notes, §9.4, equations 9.4.5–9.4.6: the finite-solenoid axial field]{ref}.
The derivation is an especially direct use of the <superposition principle>. The <on-axis magnetic field of a circular current loop> at source position $z'$ is $\mu_0Ia^2/[2(a^2+(z-z')^2)^{3/2}]$. There are $n\,dz'$ turns in an axial slice, so
$$
B_z(z)=\frac{\mu_0nIa^2}{2}
\int_{-\ell/2}^{\ell/2}
\frac{dz'}{[a^2+(z-z')^2]^{3/2}}.
$$
Substitute $u=z-z'$ and use the <antiderivative> $u/[a^2\sqrt{a^2+u^2}]$ to obtain the displayed expression. If the centre is instead at $z=z_0$, replace every $z$ in that expression by $z-z_0$.
At the centre and at either end, respectively,
$$
\frac{B_z(0)}{\mu_0nI}=\frac{\ell}{\sqrt{\ell^2+4a^2}},
\qquad
\frac{B_z(\ell/2)}{\mu_0nI}
=\frac{\ell}{2\sqrt{\ell^2+a^2}}.
$$
For aspect ratios $\ell/a=2,6,20$, the centre ratios are approximately $0.7071,0.9487,0.9950$. The end ratio tends to $1/2$ as $\ell/a$ becomes large, even though the centre ratio tends to $1$. Thus a long coil can have an excellent central <magnetic field> while the ends still differ strongly from that value. Convergence to the <long-solenoid approximation> is not uniform across the end region.
\Image[/solenoid-axial-field-profile.png]
{title=Finite <solenoid> axial <magnetic fields> compared with the ideal interior value}
{description=Original profiles for $\ell/a=2,6,20$ on the axis, normalized by $\mu_0nI$. The dashed step is the approximation that assigns the ideal interior value within the coil and zero outside; an infinite <solenoid> itself has no ends. The finite profiles stay smooth through the end planes and remain nonzero beyond them. These curves describe no off-axis points.}
For a concrete geometry, give the earlier coil <radius> $a=0.025\,\mathrm m$, so $\ell/a=20$. Its central <magnetic field> is approximately $1.2504\,\mathrm{mT}$, its end value is $0.6275\,\mathrm{mT}$, and at $z=\ell$ its axial <magnetic field> is still $0.00277\,\mathrm{mT}$. The last point is outside the coil: finite length does not permit the zero-exterior conclusion of the infinite model. Off the axis, the <magnetic field lines> bend around to form the return field. A central axial value alone also does not determine the total <magnetic flux> through every turn of a short coil.
Back to article page