Computing the integral of $\log(\sin x)$ How to compute the following integral? 
$$\int\log(\sin x)\,dx$$



Motivation: Since $\log(\sin x)'=\cot x$, the antiderivative $\int\log(\sin x)\,dx$ has the nice property $F''(x)=\cot x$. Can we find $F$ explicitly? Failing that, can we find the definite integral over one of intervals where $\log (\sin x)$ is defined?
You can calculate
$$
\int_0^\pi\log(\sin x)\,dx = -\pi\log2
$$
and integrating up to $\pi/2$ would give half of this.

Note that integrating $\log(\sin x)$ from 0 to $\pi/2$ is the same as integrating $\log(\cos x)$ so that
$$
\begin{align}
\int_0^{\pi/2}\log(\sin x)\,dx &amp;= \frac12\int_0^{\pi/2}\log(\sin x\cos x)\,dx\\
&amp;= \frac12\int_0^{\pi/2}\log(\sin 2x)\,dx - \frac{\pi}{4}\log 2.
\end{align}
$$
After a change of variables, this can be rearranged to get the result.
For the indefinite integral, you have this closed form:


  $$ \frac{i{x}^{2}}{2}+x\ln  \left( \cos \left( x \right)  \right) -x\ln 
 \left( 1+{{\rm e}^{2\,ix}} \right) +\frac{i}{2} Li_2 ( -{
{\rm e}^{2\,ix}} ), $$


where $Li_2$ is a polylogarithm.