How to integrate $\int_0^\pi \frac{1}{\sqrt{1+k^2\sin^2\phi}} d \phi$?

I am currently dealing with the integral $$\int_{0}^{\large\pi}\frac{{\rm d}\phi} {\,\sqrt{\vphantom{\Large A}\,1 + k^{2}\sin^{2} \phi \,}\,}$$

I know that if I had a minus sign in the denominator, then this would be similar to an elliptic integral, but in this case, I don't really know what this is.

• I am not much aware of elliptic integrals but can't you write $k^2=-(-k^2)$? You say you need a minus in the denominator so I guess this is what you are looking for. – Pranav Arora May 27 '14 at 16:51
• It is far more interesting to write $k^2 = - (\mathrm{ i} k)^2$. – Dmoreno May 27 '14 at 16:57

Notice $\sin^2\phi = 1 - \cos^2\phi$ and $\cos\phi = \sin\left(\frac{\pi}{2} - \phi\right)$, you have $$\int_0^\pi\frac{d\phi}{\sqrt{1+k^2\sin^2\phi}} = 2\int_0^{\pi/2}\frac{d\phi}{\sqrt{1+k^2\sin^2\phi}} = \frac{2}{\sqrt{1+k^2}}\int_0^{\pi/2}\frac{d\phi}{\sqrt{1-\frac{k^2}{1+k^2}\cos^2\phi}} = \frac{2}{\sqrt{1+k^2}}\int_0^{\pi/2}\frac{d\phi}{\sqrt{1-\frac{k^2}{1+k^2}\sin^2\phi}} = \frac{2}{\sqrt{1+k^2}}K\left(\frac{k}{\sqrt{1+k^2}}\right)$$
Hint. You can see $\sqrt{1+k^2\sin^2\phi}$ as the pythagorean sum of $1$ and $k\sin\phi$. That is, try drawing a right-angled triangle with angle $\phi$ and sides $1$ and $k\sin\phi$. Then, re-express your square root in terms of something easier.