Assistance with solving the integral Can you give me an idea how to handle this integral?
$\int_{0}^{2\pi} (1+\cos{x})\sqrt{3+\cos{x}}\,dx$
 A: Since $1 - \cos(x) = 2 \sin^2\left(\frac{x}{2} \right) $ then
\begin{align}
\int_{0}^{2\pi} (1+\cos{x})\sqrt{3+\cos{x}}\, \mathrm{d}x & \overset{u= x -\pi}{=} 2\int_{0}^{\pi}2 \sin^2\left(\frac{u}{2} \right) \sqrt{2+2\sin^2\left(\frac{u}{2} \right)}\, \mathrm{d}u \\
& \overset{t = \frac{u}{2}}{=} 8 \sqrt{2} \int_0^{\frac{\pi}{2}} \sin^2(t) \sqrt{1 + \sin^2(t)}\, \mathrm{d}t\\
\end{align}
And from this answer we know
$$
\int_0^{\frac{\pi}{2}} \sin^2\theta \sqrt{1-k^2\sin^2 \theta}\, \mathrm{d}\theta = \frac{(1-k^2)K(k)-(1-2k^2)E(k)}{3k^2}
$$
So with $k=i$ you get
$$
\int_{0}^{2\pi} (1+\cos{x})\sqrt{3+\cos{x}}\, \mathrm{d}x  =8 \sqrt{2} E(i) - \frac{16 \sqrt{2}}{3} K(i)
$$
A: Using the tangent half-angle substitution
$$I=\int_{0}^{2\pi} (1+\cos(x))\sqrt{3+\cos(x)}\,dx=2\int_{0}^{\pi} (1+\cos(x))\sqrt{3+\cos(x)}\,dx$$
$$I=8 \sqrt{2} \int_0^\infty \sqrt{\frac{t^2+2}{\left(t^2+1\right)^5}}\,dt=4 \sqrt{2}\int_1^\infty \frac 1 {x^2}\sqrt{\frac{x+1}{(x-1) x}}$$ The antiderivative is  nasty but its evaluation at $\infty$ is simply
$$I=\frac{2 }{3 \sqrt{\pi }}\left(\Gamma \left(\frac{1}{4}\right)^2+12\, \Gamma
   \left(\frac{3}{4}\right)^2\right)$$ which is the same as
$$I=16  \left(E\left(\frac{1}{2}\right)-\frac{1}{3}K\left(\frac{1}{2}\right)\right)$$ and
$$I=8 \sqrt{2} \left(E(-1)-\frac{2 }{3}K(-1)\right)$$ already given by @Robert Lee.
