Evaluate the integral $\int\limits_0^{\pi}\log (1-\cos x)\, dx$ Question: What is the value of the integral $\int\limits_0^{\pi}\log (1-\cos x)\, dx$
Proceed:
Let $I=\int\limits_0^{\pi}\log (1-\cos x)\, dx$, then
$I=\pi \log 2+\int\limits_0^{\pi}\log \sin^2(x/2)\, dx$.
What can I do now?
 A: Let's make the substitution $x = 2u$, so
$$I = 2\int^{\pi/2}_{0}\ln[1-\cos(2u)]\,du = 2\int^{\pi/2}_{0}\ln[1-(1-2\sin^{2}u)]\,du$$
$$= 2\int^{\pi/2}_{0}\ln(2\sin^{2}u)\,du = 2\int^{\pi/2}_{0}[\ln 2+2\ln(\sin u)]\,du$$
$$= 2 \cdot \frac{\pi}{2}\ln 2+4\int^{\pi/2}_{0}\ln(\sin u)\,du = 2 \cdot \frac{\pi}{2}\ln 2-4 \cdot \frac{\pi}{2}\ln 2 =-\pi \ln 2$$
For that last integral, I used the fact that:
$$\int^{\pi/2}_{0}\ln(\sin u)\,du =\int^{\pi/2}_{0}\ln(\cos u)\,du $$
so
$$2\int^{\pi/2}_{0}\ln(\sin u)\,du=\int_{0}^{\frac{\pi}{2}}\left( \ln \sin u+\ln \cos u\right)\; du=\int_{0}^{\frac{\pi}{2}}\ln \sin 2u\;du-\frac{\pi}{2}\ln 2$$
and
$$\int_{0}^{\frac{\pi}{2}}\ln \sin 2x\;dx=\frac{1}{2}\int_{0}^{\pi}\ln \sin t\;dt=\int_{0}^{\frac{\pi}{2}}\ln \sin t\;dt=\int^{\pi/2}_{0}\ln(\sin u)\,du$$
so:
$$\int^{\pi/2}_{0}\ln(\sin u)\,du = -\frac{\pi}{2}\ln 2$$
A: $$
\begin{aligned}
I=&\int_{0}^{π} \ln(1-\cos (x))dx\\
=&\int_{0}^{\frac{π}{2}} (\ln(1-\cos (x))+\ln(1+\cos (x)))dx\\
=&\int_{0}^{\frac{π}{2}} \ln(1-\cos ^2x)dx\\
=&\int_{0}^{\frac{π}{2}} \ln(\sin ^2x)dx\\
=&2\int_{0}^{\frac{π}{2}} \ln(\sin x)dx\\
=&2\int_{o}^{\frac{π}{4}} (\ln(\sin x)+\ln(\cos (x)))dx\\
=&2\int_{0}^{\frac{π}{4}} \ln\left(\frac{\sin 2x}{2}\right)dx\\
=&2\int_{0}^{\frac{π}{4}}\ln(\sin 2x) dx-2\int_{0}^{\frac{π}{4}} \ln(2) dx\\
=&I_1-2\ln(2).\frac{π}{4}\,\,\,,{\rm where}\,I_1=2\int_{0}^{\frac{π}{4}} \ln(\sin 2x) dx
\end{aligned}
$$
In integral $I_1$ take substitution let  $2x=t\,\,\Rightarrow dt=2dx$
$$I_1=\int_{0}^{\frac{π}{2}} \ln(\sin t)dt=\frac{I}{2}$$
$$\therefore I=\frac{I}{2} -\frac{π}{2}(\ln2)$$
$$\therefore \frac{I}{2}=-\frac{π}{2}(\ln2)$$
$$\therefore I=-π\ln(2)$$
