by using Biot Savart Law, the calculation is very terrible. since it involve the cubic inverse distance. However, using vector potential is a way to make an analytic solution.  first in cylindrical coordinate, the current density is:

$\displaystyle \vec{J} = J_\phi \hat{\phi} = I \delta(z) \delta(\rho-a) \hat{\phi}$

the vector potential, without loss of generality, we set the field point on x-z plane and the vector potential is pointing $\hat{\phi}$ direction.

Oh, shit, i am tired on typing equation by Latex. anyway,

the finial result can be obtained in J.D. Jackson’s book. and it take the form of Elliptic Integral.

$\displaystyle A_\phi = \frac{\mu_0 I}{2\pi } \sqrt{\frac{a}{\rho}}\left( \frac{k^2-2}{2k} K(k^2) + \frac{1}{k} E(k^2) \right)$

where K(m) is the complete elliptic integral of first kind, and E(m) is the complete elliptic integral of second kind.

$\displaystyle K(m) = \int_0^{\pi/2} \frac{1}{\sqrt{1-m \sin^2(\theta)}}d\theta$

$\displaystyle E(m) = \int_0^{\pi/2} \sqrt{1-m \sin^2(\theta)} d\theta$

and

$\displaystyle k^2 = \frac{ 4 a \rho }{ (a+\rho)^2+z^2 }$

and using the derivative properties of elliptic integral, we can have the magnetic field in analytic form. The coil radius is $a$, at x-y plan. The observation point is $(\rho, z)$

$\displaystyle B_\rho(\rho,z) = \frac{\mu_0 I}{2\pi}\frac{z}{\rho \sqrt{(a+\rho)^2+z^2}} \left(K(k^2) - \frac{a^2+\rho^2 + z^2}{(a-\rho)^2 + z^2} E(k^2) \right)$

$\displaystyle B_z(\rho,z) = \frac{\mu_0 I}{2\pi}\frac{1}{ \sqrt{(a+\rho)^2+z^2}} \left(K(k^2) + \frac{a^2-\rho^2 - z^2}{(a-\rho)^2 + z^2} E(k^2) \right)$

Here is the PDF for the detail calculation. Field of Single Coil. Note that, in the pdf, the B-field is smaller by factor of 2. The denominator should be $2\pi$. As we check the magnetic field on the z-axis, the above formula will reduce to

$\displaystyle B_z(0,z) = \frac{\mu_0 I}{2}\frac{a^2}{ (a^2+z^2)^{3/2}}$

where $K(0) = E(0) = \pi/2$