TITLE: Integration of $\ln\sin x$ from 0 to$ \frac{\pi}{2}$by DUIS
QUESTION [6 upvotes]: How can we evaluate the integration 
$$\int_0^{\frac{\pi}{2}}\ln \sin x\,dx$$ by using DUIS(Differentiating under the integral sign)?
This question popped in my head when I was reading an article about DUIS as $\ln |\sin x|$ is the integral of $\cot x$.
Although I am in 12th Standard, I am keen to learn any new and interesting concepts and techniques so please tell me if there are any related to the question. Thanks!

REPLY [7 votes]: There is another way to evaluate the integral.
Firstly, we have
$$\int_0^{\frac{\pi}{2}}\ln \sin x\ dx\overset{t=\frac{\pi}{2}-x}{=}\int_0^{\frac{\pi}{2}}\ln \cos t\ dt,$$
and
$$\int_{\frac{\pi}{2}}^{\pi}\ln \sin x\ dx\overset{t=x-\frac{\pi}{2}}{=}\int_0^{\frac{\pi}{2}}\ln \cos t\ dt.$$
Then
\begin{align}
2\int_0^{\frac{\pi}{2}}\ln \sin x\,dx &=\int_0^{\frac{\pi}{2}}\ln \sin x\,dx+\int_0^{\frac{\pi}{2}}\ln \cos x\,dx \\
&=\int_0^{\frac{\pi}{2}}\ln \sin 2x\,dx-\frac{\pi}{2}\ln 2 \\
&=\frac{1}{2}\int_0^{\pi}\ln \sin x\ dx-\frac{\pi}{2}\ln 2\\
&=\frac{1}{2}\left(\int_0^{\frac{\pi}{2}}\ln \sin x\ dx+\int_{\frac{\pi}{2}}^{\pi}\ln \sin x\ dx\right)-\frac{\pi}{2}\ln 2\\
&=\int_0^{\frac{\pi}{2}}\ln \sin x\ dx-\frac{\pi}{2}\ln 2.
\end{align}
That is
$$\int_0^{\frac{\pi}{2}}\ln \sin x\ dx=-\frac{\pi}{2}\ln 2.$$