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:

\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.

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. 

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

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


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. Here is the PDF for the detail calculation. Field of Single Coil