Evaluating $\int_0^{2\pi} \cos^2(x)\sqrt{1+\cos(x)}\,dx$ I'm stuck with the following
$$
\int_0^{2\pi} \cos^2(x)\sqrt{1+\cos(x)}\,dx.
$$
I came out of
$$
\int_0^{2\pi} \cos(x)\sqrt{1+\cos(x)}\,dx
$$
integrating by parts, knowing that
$$
\int \sqrt{1+\cos(x)}\,dx=\text{sgn}(\sin(x))2\sqrt{1-\cos(x)}+C
$$
and thus integrating $\int_0^{2\pi} \cos(x)\sqrt{1+\cos(x)}\,dx$ first on $[0,\pi]$ and then on $[\pi,2\pi]$. I tried the same strategy (integration by parts) with the first integral, but it didn't work. I am also not sure this
$$
\int \sqrt{1+\cos(x)}\,dx=\int \sqrt{1+\cos(x)}\frac{\sqrt{1-\cos(x)}}{\sqrt{1-\cos(x)}}dx=\int \frac{\sqrt{1-\cos^2(x)}}{{\sqrt{1-\cos(x)}}}dx=\int \frac{\sqrt{\sin^2(x)}}{{\sqrt{1-\cos(x)}}}dx=\int\frac{|\sin(x)|}{\sqrt{1-\cos(x)}}dx=\ldots
$$
is the best way to come out of $\int \sqrt{1+\cos(x)}\,dx$.
Thank you.
 A: Use $$\int_{0}^{2a} f(x) dx=2 \int_{0}^{a} f(x) dx,~if~ f(2a-x)=f(x).$$
And $$\int_{0}^a f(x) dx=\int_{0}^{a} f(a-x) dx$$
Then $$I=\int_{0}^{2\pi} \cos^2 x \sqrt{1+\cos x}~dx=2\int_{0}^{\pi} \cos^2 x\sqrt{1-\cos x}~dx$$
$$I=2\int_{0}^{\pi} \frac{\cos^2 x \sin x}{\sqrt{1+\cos x}} dx$$
Let $\cos x=t \implies -\sin x~ dx =dt$
$$\implies I=2\int_{-1}^{1} \frac{t^2}{\sqrt{1+t}}=4\int_{0}^{\sqrt{2}} (u^2-1)^2 du=\frac{28\sqrt{2}}{15}.$$
A: hint
With the substitution $$t=x-\pi$$
it becomes
$$\int_{-\pi}^\pi\cos^2(t)\sqrt{1-\cos(t)}dt=$$
$$2\int_0^{\pi}\Bigl(2\cos^2(\frac t2)-1\Bigr)^2\sqrt{2\sin^2(\frac t2)}dt=$$
$$2\sqrt{2}\int_0^\pi\Bigl(2\cos^2(\frac t2)-1\Bigr)^2\sin(\frac t2)dt$$
because $0\le \frac t2\le \frac{\pi}{2}$ and $\;\;\sin(\frac t2)\ge 0$.
Now, put $$u=\cos(\frac t2)$$
to get
$$4\sqrt{2}\int_0^1(2u^2-1)^2du$$
$$=4\sqrt{2}(\frac 45-\frac 43+1)=\frac{28\sqrt{2}}{15}$$
A: Per the symmetry of the integrand with respect to $x=\pi$
\begin{align}
& \int_0^{2\pi} \cos^2 x\sqrt{1+\cos x}dx\\
 =& \ 2\sqrt2 \int_0^{\pi}\cos^2 x \cos\frac x2 dx\\
=& \ 4\sqrt2 \int_0^{\pi} \left(1-2\sin^2\frac x2\right)^2 \cos\frac x2\ dx\\
 =&\ 4\sqrt2 \int_0^{\pi} (1-4\sin^2 \frac x2+4\sin^4 \frac x2)d(\sin \frac x2)\\
=&\ \frac{28\sqrt2}{15}
\end{align}
