Integral of $x\log(\sin x)$

$\log_e$ for denoting the natural logarithm? Oh my dear.

$$ \int_{0}^{\pi/2}x\log\sin x\,dx = \int_{0}^{1}\frac{\arcsin(u)\log u}{\sqrt{1-u^2}}\,du\tag{1}$$ and by recalling $$ \arcsin(u) = \sum_{n\geq 0}\frac{\binom{2n}{n}}{4^n(2n+1)}u^{2n} \tag{2} $$ $$ \int_{0}^{1}\frac{u^{2n}\log(u)}{\sqrt{1-u^2}}\,du = \frac{\pi\binom{2n}{n}}{4^{n+1}}\left(H_{n-1/2}-H_n\right)\tag{3} $$ (where $(3)$ follows by differentiating Euler's Beta function) the LHS of $(1)$ is converted into a twisted hypergeometric series, according to the terminology introduced here. On the other hand, by exploiting the Fourier series of $\log\sin$ or Fourier-Chebyshev series expansions, the LHS of $(1)$ turns out to be $$ \int_{0}^{\pi/2}x\log\sin x\,dx = \color{red}{\frac{7}{16}\,\zeta(3)-\frac{\pi^2}{8}\,\log(2)}.\tag{4}$$ One may tackle the equivalent integral $\int_{0}^{\pi/2}x^2\cot(x)\,dx$ also by recalling that $\cot(x)=\frac{1}{x}+\sum_{n\geq 1}\left(\frac{1}{x-n\pi}+\frac{1}{x+n\pi}\right)$, but symmetry is definitely not enough to carve the $\zeta(3)$ term out of thin air.


From point (i) it can be easily shown that

$$\int_{0}^{\pi/2}\log\sin x\,dx=\int_{0}^{\pi/2}\log\cos x\,dx=-\frac{\pi}{2}\log 2$$

Now consider for point (ii)

$$I=\int_{0}^{\pi/2}x\log\sin x\,dx=\int_{0}^{\pi/2}\left(\frac{\pi}{2}-x\right)\log\cos x\,dx$$

thus

$$2I=\int_{0}^{\pi/2}x\log\sin x\,dx+\int_{0}^{\pi/2}\left(\frac{\pi}{2}-x\right)\log\cos x\,dx=$$ $$=\int_{0}^{\pi/2}x\log\tan x\,dx+\frac{\pi}{2}\int_{0}^{\pi/2}\log\cos x\,dx=\int_{0}^{\pi/2}x\log\tan x\,dx-\frac{\pi^2}{4}\log 2$$

since from the following reference from Paul Enta

$$\int_{0}^{\pi/2}x\log\tan x\,dx=\frac{7}{8}\,\zeta(3)$$

we finally have

$$I=\int_{0}^{\pi/2}x\log\sin x\,dx=\frac{7}{16}\,\zeta(3)-\frac{\pi^2}{8}\log 2$$


Using $\text{(1d)}$ from this answer $$ \log(\sin(x))=-\log(2)-\sum_{k=1}^\infty\frac{\cos(2kx)}k $$ we get $$ \begin{align} \int_0^{\pi/2}x\log(\sin(x))\,\mathrm{d}x &=-\int_0^{\pi/2}x\left(\log(2)+\sum_{k=1}^\infty\frac{\cos(2kx)}k\right)\,\mathrm{d}x\\ &=-\frac{\pi^2}8\log(2)-\sum_{k=1}^\infty\frac1k\int_0^{\pi/2}x\cos(2kx)\,\mathrm{d}x\\ &=-\frac{\pi^2}8\log(2)-\sum_{k=1}^\infty\frac1k\frac{(-1)^k-1}{4k^2}\\ &=-\frac{\pi^2}8\log(2)+\frac12\sum_{k=1}^\infty\frac1{(2k+1)^3}\\ &=\frac7{16}\zeta(3)-\frac{\pi^2}8\log(2) \end{align} $$

Tags:

Integration