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?

Consider $f(z)=\ln(1-z)$. Then $f$ is analytic in $|z|<r<1$. Thus by Cauchy's Formula, we have
$$\int_{|z|=r}\frac{\ln(1-z)}{z}dz= 2\pi i 0=0.$$
Letting $z=re^{i\theta}$, we have
$$ \int_0^{2\pi}r\ln\left(1-re^{i\theta}\right) \,d\theta=0. $$
Letting $r\to0^-$, we have
$$ \int_0^{2\pi}\ln\left(1-e^{i\theta}\right) \,d\theta=0 $$
so that
$$ \Re\int_0^{2\pi}\ln\left(1-e^{i\theta}\right) \,d\theta = \int_0^{2\pi}\Re\ln\left(1-e^{i\theta}\right) \,d\theta = \int_0^{2\pi}\ln\left|1-e^{i\theta}\right| \,d\theta=0. $$
But
\begin{eqnarray}
|1-e^{i\theta}|&=&|1-\cos\theta-i\sin\theta|=4\sin^2\frac{\theta}{2}
\end{eqnarray}
and hence
$$ \int_0^{2\pi}\ln\left(4\sin^2\frac{\theta}{2}\right) \,d\theta=0.$$
Changing variable $\theta\to\frac{\theta}{2}$, we have
$$\int_0^\pi\ln(\sin\theta) \,d\theta=-\pi\ln2. $$
