Original problem is to prove that $$\int_0^{\pi}\frac{dx}{\sqrt{3-\cos x}} = \frac1{2\sqrt2}B\left(\frac14,\frac12\right)$$
$B(p,q)$ is the beta-function.
My attempt is to let $t = \tan\frac x2$ and then I get $$\sqrt2\int_0^{+\infty}\frac{dt}{\sqrt{(1+t^2)(1+2t^2)}}$$
Then I don't know how to go on.
Consider the substitution
$$x=\frac{\sqrt{\tan\theta}-\sqrt{\cot\theta}}{2}.$$
As $\theta$ increases from $0$ to $\frac{\pi}{2}$, $x$ increase from $-\infty$ to $+\infty$. Then with a bit of computation, we get
\begin{align*} \int_{0}^{\infty} \frac{\mathrm{d}x}{\sqrt{(1+x^2)(1+2x^2)}} &= \frac{1}{2} \int_{-\infty}^{\infty} \frac{\mathrm{d}x}{\sqrt{(1+x^2)(1+2x^2)}} \\ &= \frac{1}{2} \int_{0}^{\frac{\pi}{2}} \frac{\mathrm{d}\theta}{\sqrt{\sin2\theta}} \\ &= \frac{1}{4} B \left(\frac{1}{4}, \frac{1}{2}\right). \end{align*}