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

This is from an old S level paper. I am struggling with part (ii). Any hints?

• point (i) seems quite easy but (2) I can't solve – gimusi Jan 5 '18 at 17:59
• @gimusi this must be a mistake – qbert Jan 5 '18 at 19:08
• @qbert sorry, what must be a mistake? – gimusi Jan 5 '18 at 19:09
• unless I am missing something, that this was asked on an exam for high school students – qbert Jan 5 '18 at 19:10
• If you are ok, you can accept the answer and set as solved. Thanks! – gimusi Jan 8 '18 at 22:41

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$$

$\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.

• not so simple, I can stop to try!!! – gimusi Jan 5 '18 at 18:21
• Setting $I=\int_{0}^{\pi/2}x\log\sin x\,dx$ it follows $2I=\int_{0}^{\pi/2}x\log\tan x\,dx-\frac{\pi^2}{4}\log 2$. I guess we can't solve $\int_{0}^{\pi/2}x\log\tan x\,dx$ "easily". This method works only for point (i). – gimusi Jan 5 '18 at 18:25
• @gimusi BTW, this kind of integral with $x^n\log(\tan(x))$ is discussed in this paper of Elessaoui and Guennoun, where they show that they result in sum of Zeta function values at odd positive integers. – Paul Enta Jan 5 '18 at 18:36
• @PaulEnta Thus with this reference I've solved the problem! Thanks! – gimusi Jan 5 '18 at 18:38

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}
