Integral of $\log(\sin(x))$ using contour integrals I know the integral is possible with a simple fourier series expansion of $-\log(\sin(x))$
But I am interested in complex analysis, so I want to try this.
$$I = \int_{0}^{\pi} \log(\sin(x)) dx$$
The substitution $x = \arcsin(t)$ first comes to mind. 
But that substitution isnt valid as, 
The upper and lower bounds would both be $0$ because $\sin(\pi) = \sin(0) = 0$
What is a workaround using inverse trig or some other way?
Inverse sine is good, because that gives us a denominator from which we will be able to find poles.
$$x = arctan(t)$$
Is also good, but it would hard to do.
Idea?

We have
\begin{align}\int_0^{\pi} \log(\sin x)\, dx &= \int_0^{\pi} \log\left|\frac{e^{ix}-e^{-ix}}{2i}\right|\, dx\\
&= \int_0^{\pi} \log\left|\frac{e^{2ix}-1}{2}\right|\, dx\\
&= \int_0^{\pi} \log|e^{2ix}-1|\, dx - \int_0^{\pi} \log 2\, dx\\
&= \frac{1}{2}\int_0^{2\pi} \log|1 - e^{ix}|\, dx - \pi\log 2\\
&= \lim_{r\to 1^{-}} \frac{1}{2}\int_0^{2\pi} \log|1 - re^{ix}|\, dx - \pi\log 2\\
&= \lim_{r\to 1^{-}}\bigl(\pi\log|1 - z||_{z = 0}\bigr) - \pi \log 2 \quad (\text{by Gauss's mean value theorem})\\
&= -\pi\log 2.
\end{align}
