How to integrate $\int_0^\pi\frac{dx}{\sqrt{3-\cos(x)}}$? 
How to integrate $\displaystyle\int_o^\pi\frac{dx}{\sqrt{3-\cos(x)}}$ ?

If I take $y=\sin\left(\frac{x}{2}\right)$ then,
$\displaystyle dx=\frac{2dy}{\cos\left(\frac{x}{2}\right)}=\frac{2dy}{\sqrt{1-y^2}}$
and with $\displaystyle\cos(x)=\cos^2\left(\frac{x}{2}\right)-\sin^2\left(\frac{x}{2}\right)=1-y^2-y^2=1-2y^2$, I obtain:
$\displaystyle\int_o^\pi\frac{dx}{\sqrt{3-\cos(x)}}=\int_0^1\frac{1}{\sqrt{3-(1-2y^2)}}\frac{2dy}{\sqrt{1-y^2}}=\int_0^1\frac{2}{\sqrt{2}\sqrt{1+y^2}\sqrt{1-y^2}}$
$\displaystyle=\sqrt{2}\int_0^1\frac{dy}{\sqrt{1-y^4}}=?$
How can I proceed? Thanks in advance.
 A: The integral can be written as an elliptic integral of the first kind with complex elliptic modulus:
$$I=\int_{0}^{\pi}\frac{d\phi}{\sqrt{3-\cos{\phi}}}\\
=\int_{0}^{\pi}\frac{d\phi}{\sqrt{2+2\sin^2{\left(\frac{\phi}{2}\right)}}}\\
=\frac{1}{\sqrt2}\int_{0}^{\pi}\frac{d\phi}{\sqrt{1+\sin^2{\left(\frac{\phi}{2}\right)}}}\\
=\sqrt2\int_{0}^{\frac{\pi}{2}}\frac{d\theta}{\sqrt{1+\sin^2{\theta}}}\\
=\sqrt2\,K(-1)$$
The integral could also be written as a beta function by first substituting $x=\sin\theta$, $\theta=\arcsin{x}$, $d\theta=\frac{dx}{\sqrt{1-x^2}}$, and then substituting $t=x^4$, $x=t^{\frac14}$, $dx=\frac14t^{-\frac34}dt$:
$$I=\sqrt2\int_0^1\frac{1}{\sqrt{1+x^2}}\frac{dx}{\sqrt{1-x^2}}\\
=\sqrt2\int_0^1\frac{dx}{\sqrt{1-x^4}}\\
=\sqrt2\int_0^1\frac{dt}{4t^{\frac34}\sqrt{1-t}}\\
=\frac{\sqrt2}{4}\int_{0}^{1}t^{-\frac34}(1-t)^{-\frac12}dt\\
=\frac{\sqrt2}{4}\text{B}(\frac14,\frac12).$$
Using the identity $\text{B}(x,y)=\frac{\Gamma(x)\Gamma(y)}{\Gamma(x+y)}$ and Euler's reflection formula $\Gamma(1-z)\Gamma(z)=\frac{\pi}{\sin{(\pi z)}}$, this becomes
$$I=\frac{\sqrt2}{4}\text{B}(\frac14,\frac12)=\frac{\sqrt2}{4}\frac{\Gamma(\frac14)\Gamma(\frac12)}{\Gamma(\frac34)}=\frac{\Gamma(\frac14)^2}{4\sqrt{2\pi}}$$
