Today a student asked me $\int \ln (\sin x) \, dx.$

Calculate the integral $$\int \ln (\sin x) \, dx.$$


Solution 1:

Consider the following. \begin{align} I &= \int \ln(\sin(x)) \ dx \end{align} can be evaluated by integration by parts and leads to \begin{align} I &= x \ln(\sin(x)) - \int x \ \cot(x) \ dx \\ &= x \ln(\sin(x)) -x \ln(1 - e^{ix}) - \frac{i}{2} \left( x^2 + \operatorname{Li}_2(e^{2ix}) \right) \end{align} where $i =\sqrt{-1}$ and $\operatorname{Li}_2(z)$ is the dilogarithm function. It is of note that \begin{align} \int_0^{\pi/2} \ln(\sin(x)) \ dx = \frac{\pi}{2} \ln(2). \end{align}