# Magnetic Field at center of solenoid - Is this correct?

I've seen some different ways to compute tha magnetic field at the center of a solenoid, and sometimes people say that the result $B=\mu_0 n i$ is just an approximation. Well, I've thought on this way to computing it and I want to know if it's valid. First, I've described the solenoid as a helix. Indeed we take the curve $\alpha : I \subset \Bbb R \to \Bbb R^3$ given by:

$$\alpha(t)=(R\cos t,R\sin t,bt)$$

To determine the interval $I$ and $b$ in terms of the number of loops $N$ and the height $L$ of the solenoid, I thought as follows: at $t = 0$, we have $\alpha(0)=(R,0,0)$. We'll have one turn, exactly when the first and second componentes are again $R$ and $0$, so for one turn we should use $t_1 = 2\pi$. Indeed, for $k$ turns we should use then $t_k = 2k\pi$. Now, the last component gives the height at the $k$-th turn, so after we have all the $N$ turns the height is $L$ so that $2N\pi b = L$ so that $b = L/2N\pi$. Also, the interval then should be $I=[0,2N\pi]$. In that case the curve is:

$$\alpha(t)=\left(R\cos t,R\sin t, \frac{tL}{2N\pi}\right)$$

To have the center of the solenoid at the origin, we shift it down half of it's size so we'll have

$$\alpha(t)=\left(R\cos t,R\sin t, \frac{tL}{2N\pi} - \frac{L}{2}\right)$$

I've used then Biot-Savart law to compute:

$$B(0)=\frac{\mu_0i}{4\pi}\int_0^{2N\pi}-\frac{\alpha'(t)\times \alpha(t)}{|\alpha(t)|^3}dt$$

After lots of calculations the main result was that the component in the direction of $e_3$ is:

$$B_3(0)=\mu_0 n i \sin\left(\arctan\left(\frac{L}{2R}\right)\right)$$

Where $n=N/L$. Now, the result people usually use $\mu_0 n i$ would only be achieved whenever $L/2R \to \infty$, in other words, it would be a good approximation when simultanuously $L$ is very big and $R$ is very small.

Is all of this correct? The other components gave complicated integrals, should they be zero as intuition tells or this way of calculating the field won't give the right answers?

-
Simplify your formula $\sin\left(\arctan\left(\frac{L}{2R}\right)\right)$, express $sin$ as function of $tan$. Compare then your result to this paper (Formula 3) – Trimok Jun 11 '13 at 18:06