Integration of $\ln\sin x$ from 0 to$ \frac{\pi}{2}$by DUIS 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!
 A: 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.$$
A: You can start by defining
$$I(a)=\int_0^{\pi/2} \sin^a x\,dx$$
Your desired integral is then just $I'(0)$.
Now, in order to evaluate $I(a)$ in closed form, we will have to use the Beta function and its connection to the Gamma function: 
\begin{align}
I(a)&=\int_0^{\pi/2} \sin^a x\,dx \\
&=\frac{1}{2}B\left(a/2+1/2,1/2\right) \\
&=\frac{\Gamma\left(a/2+1/2\right)\Gamma\left(1/2\right)}{2\Gamma(a/2+1)}
\\
&= \frac{\sqrt{\pi}}{2}\frac{\Gamma\left(a/2+1/2\right)}{\Gamma(a/2+1)}
\end{align}
Differentiating $I(a)$ and letting $a\to 0$ then yields
\begin{align}
I'(a)\Big|_{a=0}&=\frac{\sqrt{\pi}}{2}\cdot\frac{\Gamma\left(a/2+1/2\right)\left(\psi^{(0)}\left(a/2+1/2\right) - \psi^{(0)}(a/2+1)\right)}{\Gamma(a/2)}\Biggr|_{a=0} \\
&=-\frac{\sqrt{\pi}}{2}\cdot \sqrt{\pi}\log 2 \\
&=-\frac{\pi}{2}\log 2
\end{align}
And we can conclude that
$$\int_0^{\pi/2} \log\sin x\,dx = -\frac{\pi}{2} \log 2$$
A: First we begin with an equivalence:
\begin{align}\int_{0}^{\pi\over 2}\ln(\sin x)\ dx=x\ln (\sin x)\ dx \biggr|_{0}^{\pi\over2}-\int_{0}^{\pi\over2}x\cot x\ dx\implies \int_{0}^{\pi\over 2}\ln(\sin x)\ dx=-\int_{0}^{\pi\over2}x\cot x\ dx \end{align}
We integrate the second integral by Leibnitz rule
\begin{align}\int_{0}^{\pi\over2}x\cot x\ dx=\int_{0}^{\pi\over2}\frac{\arctan{\tan x}}{\tan x}\ dx\end{align}
\begin{align}I'(a)=\int_{0}^{\pi\over2}\frac{\partial}{\partial a}\frac{\arctan{(a\tan x)}}{\tan x}\ dx=\int_{0}^{\pi\over2}\frac{1}{a^2\tan^2x+1}\ dx\end{align}
With the substitution $\tan x = \xi$ (and so $dx=\frac{d\xi}{\xi^2+1}$):
\begin{align}\frac{a^2}{a^2-1}\int_{0}^{\infty}\frac{d\xi}{a^2\xi^2+1}-\frac{1}{a^2-1}\int_{0}^{\infty}\frac{d\xi}{\xi^2+1}=\frac{a}{a^2-1}\int_{0}^{\infty}\frac{d\xi}{\xi^2+1}-\frac{1}{a^2-1}\int_{0}^{\infty}\frac{d\xi}{\xi^2+1}\end{align}
As the two integrals in the above expression would both equal $\pi\over2$, we would get:
\begin{align}I'(a)=\frac{\pi}{2(a+1)}\implies I(1)=\frac{\pi}{2}\ln (2)\end{align}
So,\begin{align}\int_{0}^{\pi\over 2}\ln(\sin x)\ dx=-\frac{\pi}{2}\ln (2)\end{align}
