4

came across this one $$\int_0^{\pi / 2} \ln (\sin x)\;dx$$

I wanted to find it using the residues, but, I don't thing they are isolated ones

BCLC
  • 13,459

4 Answers4

7

Let us write $I$ this integral. Changing the variable $x$ into $y=\frac\pi2-x$, we get $$I=\int_0^{\pi/2}\ln(\cos y)\,\mathrm dy$$ so we can add up the two integrals $$\begin{split}2I&=\int_0^{\pi/2}\left[\ln(\sin x)+\ln(\cos x)\right]\mathrm dx=\int_0^{\pi/2}\ln\left(\frac12\sin 2x\right)\,\mathrm dx\\&=-\frac\pi2\ln 2+\int_0^{\pi/2}\ln(\sin 2x)\,\mathrm dx\end{split}\tag{1}$$ Let us change the variable in the last integral into $z=2x$ : $$\begin{split}\int_0^{\pi/2}\ln(\sin 2x)\,\mathrm dx&=\frac12\int_0^\pi\ln(\sin z)\,\mathrm dz\\&=\frac12\int_0^{\pi/2}\ln(\sin x)\,\mathrm dx+\frac12\int_{\pi/2}^\pi\ln(\sin x)\,\mathrm dx\\&=\frac12I+\frac12J.\end{split}\tag{2}$$ Then we use the change of variable $t=\pi-x$ to compute $J$ : $$J=\int_{\pi/2}^\pi\ln(\sin x)\,\mathrm dx=\int_0^{\pi/2}\ln(\sin t)\,\mathrm dt=I.$$ As a conclusion, we obtain that $2I=-\frac\pi2\ln2+I$, hence the result $I=-\frac\pi2\ln2$.

Tom-Tom
  • 6,867
4

Strange but true, it is enough to use the definition of the Riemann integral through Riemann sums.

$$ I = \int_{0}^{\pi}\log\sin x\,dx = \lim_{n\to +\infty}\frac{\pi}{ n}\sum_{k=1}^{n-1}\log\sin\frac{\pi k}{n}=\lim_{n\to +\infty}\frac{\pi}{n}\log\prod_{k=1}^{n-1}\sin\frac{\pi k}{n}\tag{1} $$ but $$ \prod_{k=1}^{n-1}\sin\frac{\pi k}{n} = \frac{2n}{2^n}\tag{2} $$ is a well-known identity, giving:

$$ \int_{0}^{\pi}\log\sin(x)\,dx = \color{red}{-\pi\log 2}.\tag{3}$$

Jack D'Aurizio
  • 353,855
0

Noting that $\int_0^{\frac{\pi}{2}} \ln (\cos x) d x=I’(0),$ where $$ \begin{aligned} I(a) & =\int_0^{\frac{\pi}{2}} \cos ^a x d x \\ & =\int_0^{\frac{\pi}{2}} \sin ^{2\left(\frac{1}{2}\right)-1} x \cos ^{2\left(\frac{a+1}{2}\right)-1} x d x \\ & =\frac{1}{2} B\left(\frac{1}{2} ,\frac{a+1}{2}\right) \end{aligned} $$ Differentiating w.r.t. $a$ gives $$ \begin{aligned} I^{\prime}(a) & =\frac{1}{4}\left(\psi\left(\frac{a+1}{2}\right)-\psi\left(\frac{a}{2}+1\right)\right) B\left(\frac{1}{2}, \frac{a+1}{2}\right) \\ I&=I^{\prime}(0) & \\&=\frac{1}{4}\left(\psi\left(\frac{1}{2}\right)-\psi(1)\right) B\left(\frac{1}{2}, \frac{1}{2}\right) \\ & =\frac{1}{4}(-\gamma-2 \ln 2+\gamma) \pi \\ & =-\frac{\pi}{2} \ln 2 \end{aligned} $$

Lai
  • 20,421
0

I think there's an easier way: try differentiation by parts, set $\int_{0}^{\frac{\pi}{2}} 1 \cdot \ln (\sin x)dx = x \log \sin x |_{0}^{\frac{\pi}{2}} -\int_{0}^{\frac{\pi}{2}} \frac{x \cos x dx}{\sin x}$

Lucian
  • 48,334
  • 2
  • 83
  • 154
Alex
  • 19,262