<s>[INST] Can this integral $\int_0^{2\pi} \frac{d\theta}{(a^2 \cos^2 \theta +b^2\sin^2\theta)^{3/2}}$ be written in the form of  a elliptic integral I am trying to find the magnetic field due to an elliptic loop of wire. How to do integrals of the type $$\int_0^{2\pi} \frac{d\theta}{(a^2 \cos^2 \theta +b^2\sin^2\theta)^{3/2}}$$ Where a and b are the axes of the ellipse. From dimensional considerations in the problem, I have deduced that the value of the integral must be must reduced to $$\frac{ L}{(ab)^2}$$ where $L$ is the circumference of the ellipse. How do I show it. 
OK. So now I know from wikipedia that the circumference of ellipse involves something called elliptic integrals, so thankfully, I wouldnt have to be looking for a closed form. But does this reduce to the elliptic integral? Or have I done something wrong?
 [/INST] Wow, this really worked out incredibly nicely!
The elliptic integral which gives $L$ is
$$
\frac{L}{4} = J(a,b) := \int_0^{\pi/2} \sqrt{a^2 \cos^2 \theta + b^2 \sin^2 \theta} \, d\theta
$$
and it is clearly symmetric, $J(a,b)=J(b,a)$.
The change of variables $t=b \tan\theta$ gives
$$
\sqrt{a^2 \cos^2 \theta + b^2 \sin^2 \theta} = \cos \theta \, \sqrt{a^2 + t^2},
\qquad 
\cos \theta = \frac{b}{\sqrt{b^2 + t^2}},
\qquad
d\theta = \frac{b}{b^2 + t^2} \, dt;$$
thus
$$
J(a,b) = \int_0^\infty \frac{b^2 \, \sqrt{a^2 + t^2}}{(b^2 + t^2)^{3/2}} \, dt.
$$
Applying the same change of variables to $1/4$ of your integral (that is, with integration from $0$ to $\pi/2$ instead of to $2\pi$) results in
$$
\frac{1}{b^2} \int_0^\infty \frac{\sqrt{b^2 + t^2}}{(a^2 + t^2)^{3/2}} \, dt,
$$
which, from comparison with the above,
clearly equals $J(b,a)/(ab)^2$.
Using the symmetry of $J$, and multiplying by 4, we conclude that your integral indeed equals $L/(ab)^2$.
</s>