Can $ \int_0^{\pi/2} \ln ( \sin(x)) \; dx$ be evaluated with "complex method"? Can the following integral be evaluated using complex method by substituting $\sin(x) = {e^{ix}-e^{-ix} \over 2i}$?
$$ I=\int_0^{\pi/2} \ln ( \sin(x)) \; dx = - {\pi \ln(2) \over 2}$$

Note first that
\begin{align*}
\int_0^{2\pi} \ln(\sin t)\,dt
&= 2\int_0^{\pi/2} \ln(\sin t)\,dt + 2\int_0^{\pi/2} \ln(-\sin t)\,dt \\
&= 2\int_0^{\pi/2} \ln(\sin t)\,dt + 2\int_0^{\pi/2} \Bigl(\ln(\sin t) + i\pi\Bigr)\,dt \\
&= 4I + \pi^2i
\end{align*}
and, using the substitution $z=e^{it}$
\begin{align*}
\int_0^{2\pi} \ln(\sin t)\,dx
&= \int_{|z|=1} \ln\left(\frac{z-1/z}{2i}\right)\,\frac{dz}{iz} \\
&= \int_{|z|=1} \frac{\ln(1-z^2)}{iz}\,dz - \int_{|z|=1} \frac{\ln z}{iz}\,dz + \int_{|z|=1} \frac{\ln(i/2)}{iz}\,dz.
\end{align*}
The first integral on the right is zero $\dots$ this is because $\ln(1-z^2)$ is analytic inside the unit disk and vanishes at $z=0$ so the singularity in the integrand there is removable (you need to shrink the circle of integration slightly to avoid the points $z=\pm1$ and then let the radius go to 1).
The second integral we do directly
$$ \int_{|z|=1} \frac{\ln z}{iz}\,dz = \left[\frac{1}{2i}\bigl(\ln z\bigr)^2\right]_{-1^+}^{-1^-} = \frac{1}{2i}\Bigl[(\pi i)^2 - (-\pi i)^2 \Bigr] = 0
$$
where $-1^\pm$ indicate points just above and below $-1$ and on either side of the branch cut of $\ln$ along the negative real axis.
The third integral is just $2\pi i\ln(i/2)/i = 2\pi\bigl(-\ln2 + \pi i/2\bigr)$.
Therefore $4I + \pi^2i = -2\pi\ln2 + \pi^2i$ and $I = -\frac{\pi}{2}\ln2$.
