Finding $\int^{\frac{\pi}{2}}_{0}\ln(\sin x)\cdot \sin xdx$

\begin{align} I&=\int^{\frac{\pi}{2}}_{0}\ln(\sin x)\cdot \sin x\,dx \tag{1}\label{1} \end{align}

\begin{align} I&=\int^{\frac{\pi}{2}}_{0}\tfrac12\ln(\sin^2 x)\cdot \sin x\,dx \tag{2}\label{2} \\ &= \int^{\frac{\pi}{2}}_{0} \tfrac12\ln(1-\cos^2 x)\cdot \sin x\,dx \tag{3}\label{3} . \end{align}

Let $t=\cos x$, then we have

\begin{align} I&=\tfrac12\int_0^1\ln(1-t^2)\,dt \\ &= \tfrac12\int_0^1\ln(1-t)+\ln(1+t)\,dt \\ &= \left.\tfrac12 ( 1-t-(1-t)\ln(1-t) +(t+1)\ln(t+1)-1-t )\right|_0^1 =\ln2-1 . \end{align}


$\log\sin x$ has a well-known Fourier series: $$ \log\sin x=-\log 2-\sum_{k\geq 1}\frac{\cos(2k x)}{k} $$ and for any $k\in\mathbb{N}^+$ we have $$ \int_{0}^{\pi/2}\cos(2kx)\sin(x)\,dx = -\frac{1}{(2k-1)(2k+1)}, $$ hence $$ \int_{0}^{\pi/2}\sin(x)\log\sin(x)\,dx = -\log(2)+\sum_{k\geq 1}\frac{1}{(2k-1)k(2k+1)} $$ where the last series equals $-1+2\log 2$ by partial fraction decomposition. It follows that $$ \int_{0}^{\pi/2}\sin(x)\log\sin(x)\,dx = \log(2)-1 $$ as wanted.


Other answers are good but I prefer to talk about yours. You found (with a typo) \begin{align} \int_{0}^{\frac{\pi}{2}}\ln(\sin x)\ \sin x\ dx &= -\ln(\sin x)\cos x+\ln\bigg(\tan\frac{x}{2}\bigg)\color{red}{+}\cos x\Big|_{0}^{\frac{\pi}{2}} \\ &= 0 + \lim_{x\to0}\bigg(\ln(\sin x)\cos x+\ln\tan\frac{x}{2}\bigg)-1 \\ &= 0 + \lim_{x\to0}\bigg(\ln(1+\cos x)-(1-\cos x)\ln\sin x\bigg)-1 \\ &= \ln2-1 \end{align}

Tags:

Integration