$\int^{\pi}_0 \log (1+\cos x)dx $ Problem : 
$$\int^{\pi}_0 \log (1+cosx)dx $$
My approach : 
$\displaystyle I = \int^{\pi}_0 \log (1+\cos x)dx $
Also $$\displaystyle I = \int^{\pi}_0 \log (1+\cos(\pi -x)dx ....(1)$$ [ Using $\displaystyle \int^a_0 f(x)dx = \int^a_0 f(a-x)dx]$
$$\Rightarrow \displaystyle \int^{\pi}_0 \log (1-\cos xdx) ......(2) $$
Adding $(1)$ and $(2)$ we get 
$$2I = \int^{\pi}_0 \log (1+\cos(\pi -x) + \int^{\pi}_0 \log (1-\cos xdx) dx$$
$$\Rightarrow 2I = \int^{\pi}_0 \log (1-\cos^2 x)dx $$
$$\Rightarrow 2I = \int^{\pi}_0 2 \log \sin x dx$$ 
Please suggest how to proceed further will be of great help thanks. 
 A: Let $I$ be the integral given by 
$$\begin{align}
I&=\int_0^{\pi}\log (\sin x)\,dx \tag 1\\\\
&=\int_0^{\pi/2}\log (\sin x)\,dx+\int_{\pi/2}^{\pi}\log (\sin x)\,dx\tag 2
\end{align}$$
Substitution $1$:   Let $x\to 2x$ in the integral on the right-hand side of $(1)$.  Then, 
$$I=2\int_0^{\pi/2}\log \sin (2x)\,dx\tag 3$$
Substitution $2$:   Let $x\to \pi-x$ in the second integral on the right-hand side of $(2)$.  Then, 
$$\begin{align}
I&=\int_0^{\pi/2}\log (\sin x)\,dx+\int_0^{\pi/2}\log (\cos x)\,dx\\\\
&=\int_0^{\pi/2}\log \frac 12\sin(2x)\,dx\\\\
&=-(\pi/2)\log (2)+\int_0^{\pi/2}\log \sin(2x)\,dx\tag 4
\end{align}$$
Upon comparing $(3)$ and $(4)$ we find that 
$$\int_0^{\pi/2}\log \sin(2x)\,dx=-(\pi/2)\log 2\implies \bbox[5px,border:2px solid #C0A000]{I=-\pi\log 2}$$
A: Let $$\displaystyle I = \int_{0}^{\pi}\ln(1+\cos x)dx.................(*)$$
Now Using $$\displaystyle \int_{0}^{a}f(x)dx = \int_{0}^{a}f(a-x)dx$$
so we get $$\displaystyle I = \int_{0}^{\pi}\ln(1-\cos x)dx............(*)$$
Now Add these two equations, We get
$$\displaystyle \displaystyle 2I  = \int_{0}^{\pi}\ln(1-\cos^2 x)dx = 2\int_{0}^{\pi}\ln (\sin x)dx$$
So we get $$\displaystyle I = \int_{0}^{\pi}\ln(\sin x)dx$$
Now Using  $$\displaystyle \int_{0}^{2a}f(x)dx = 2\int_{0}^{a}f(x)dx\;,$$ If $f(2a-x) = f(x)$
So we get  $$\displaystyle I = \int_{0}^{\pi}\ln(\sin x)dx = 2\int_{0}^{\frac{\pi}{2}}\ln (\sin x)dx $$
$$\underline{\bf{Calculation \; of\; \displaystyle \int_{0}^{\frac{\pi}{2}}\ln (\sin x)dx\;}}$$ 
$$
\begin{align}
\int_0^{\pi/2}\log(\sin(x))\,\mathrm{d}x
&=\frac12\int_0^\pi\log(\sin(x))\,\mathrm{d}x\\
&=\int_0^{\pi/2}\log(\sin(2x))\,\mathrm{d}x\\
&=\int_0^{\pi/2}\Big(\log(2)+\log(\sin(x))+\log(\cos(x))\Big)\,\mathrm{d}x\\
&=\frac\pi2\log(2)+2\int_0^{\pi/2}\log(\sin(x))\,\mathrm{d}x\tag{1}
\end{align}
$$
Therefore,
$$
\int_0^{\pi/2}\log(\sin(x))\,\mathrm{d}x=-\frac\pi2\log(2)\tag{2}
$$
Thus,
$$
\int_0^\pi\log(\sin(x))\,\mathrm{d}x=-\pi\log(2)
$$
