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

• Did you ever hear about elliptic integrals? If not, where did you get this problem from? – Fabian Apr 23 '14 at 12:35
• @Fabian never heard of it. It is an improper integral question. – derivative Apr 23 '14 at 12:37
• @derivate: the solution to your problem requires you to know either elliptic integrals, or at least the arithmetic–geometric mean. I was just wondering if the problem was taken from a book (would seem to be a typo then -> e.g. replacing the 3 by a 1) or from your own research. If it is from your research then you need to learn about the arithmetic–geometric mean. – Fabian Apr 23 '14 at 12:40
• @Fabian you mean AM-GM $(\frac{a+b}{2}\ge\sqrt{ab})$ ? – derivative Apr 23 '14 at 12:42
• @V-moy: good catch. Derivate you can learn all about the arithmetic-geometric mean here. – Fabian Apr 23 '14 at 12:51

$$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}}$$