Showing $\int\limits_0^{\pi}\log(\sin(\theta))d\theta = -\pi \log(2)$ I have to show that
$$
\int_{0}^{\pi}\log(\sin(\theta))d\theta = -\pi \log(2)
$$
This is a problem from the complex & real analysis qualifying exam.
This problem is maybe solvable by usual integration techniques but I strongly believe that they want us to prove it using complex analysis methods. Any approach will be appreciated.
I already tried with no luck:


*

*$u = \sin(\theta)$

*$u = \theta - \frac{\pi}{2}$

*$\sin(\theta) = \frac{e^{i\theta} - e^{-i\theta}}{2i}$ and define a semi-circle that avoids $\{0\}$ and define a branch outsite that region (for example in the III or IV quadrants). 

 A: Set $I = \displaystyle \int_0^{\pi/2}\log(\cos(x))dx$. Then 
\begin{align}
I &= \displaystyle \frac{I+I}{2}\\ \\
&=\frac12\int_0^{\pi/2}\log\big(\sin(x))+\log(\cos(x)\big)dx \\ \\
&=\frac12\int_0^{\pi/2}\log\big(\sin(x)\cos(x)\big)dx\\ \\
&=\frac12\int_0^{\pi/2}\log\left(\frac12\sin(2x)\right)dx\\ \\
&=\frac\pi4 \log\left(\frac12\right) + \frac12\int_0^{\pi /2}\log(\sin(2x))dx\\ \\
&=\frac\pi4 \log\left(\frac12\right) + \frac I4 + \frac14\int_0^{\pi/2}\log(\cos(x))dx\\ \\
&=\frac\pi4 \log\left(\frac12\right) + \frac I4 + \frac I4\\ \\
&= \frac\pi4 \log\left(\frac12\right) + \frac I2.
\end{align}
Hence $I = \displaystyle \frac\pi 2 \log\left(\frac12\right).$
Edit: perhaps my choice to attack the problem as I did is unclear. Here's maybe a little intuition for why the integrals for $\log\circ \sin$ and $\log \circ \cos$ should be equal on this interval. Look at the Riemann sums. Take a rectangle on the left half, while looking at $\log \circ \cos$. It will correspond exactly to a rectangle on the right half of the interval for $\log \circ \sin$ by the symmetry of $\sin$ and $\cos$ about $\displaystyle \frac\pi4$.
Here is a full calculation, with all the gory details.
Set $u= x-\displaystyle\frac\pi2$, so $\cos(x) = -\sin(u)$. Then we have 
$$\int_0^{\pi/2}\log(\cos(x))dx = \int_{-\pi /2}^0 \log(-\sin(u))du = \int_{-\pi/2}^0 \log(\sin(-u))du $$
$$= \int_{\pi/2}^0 \log(\sin(u))(-du) = \int_0^{\pi/2}\log(\sin(u))du$$
as desired.
