TITLE: Find: $\int_0^\pi x^2\ln(\sin(x))dx$
QUESTION [7 upvotes]: I've been working on a few log-sine integrals. So far I have found
$$\int_0^\pi \ln(\sin(x))dx=-\pi\ln(2)$$
$$\int_0^\pi x\ln(\sin(x))dx=-\frac{\pi^2\ln(2)}{2}$$
...but I am struggling with the integral
$$\int_0^\pi x^2\ln(\sin(x))dx$$
and I can't figure it out... however, I do know that the answer will contain $\zeta(3)$. Any hints?

REPLY [4 votes]: Rewrite the integral as:
$$\begin{aligned}\int_0^\pi  {{x^2}\ln (\sin x)dx}  &= \int_{ - \pi /2}^{\pi /2} {{{(x + \frac{\pi }{2})}^2}\ln (\cos x)dx}  \\ &= 2\int_0^{\pi /2} {{x^2}\ln (\cos x)dx}  + \frac{{{\pi ^2}}}{2}\underbrace{\int_0^{\pi /2} {\ln (\cos x)dx}}_{-\pi \ln 2 / 2} \end{aligned}$$
To evaluate the first integral, we use the Fourier expansion of $\ln(\cos x)$:
$$\ln (\cos x) =  - \ln 2 - \sum\limits_{k = 1}^\infty  {\frac{{{{( - 1)}^k}\cos 2kx}}{k}} $$
Plug it into the integral (it is legitimate to interchange order of summation and integration, because the resulting series is absolutely convergent), we obtain
$$\begin{aligned}
\int_0^{\pi /2} {{x^2}\ln (\cos x)dx} &= - \ln 2\int_0^{\pi /2} {{x^2}dx}  - \sum\limits_{k = 1}^\infty  {\frac{{{{( - 1)}^k}}}{k}\int_0^{\pi /2} {{x^2}\cos 2kxdx} }  \\& =  - \frac{{{\pi ^3}\ln 2}}{{24}} - \sum\limits_{k = 1}^\infty  {\frac{{{{( - 1)}^k}}}{k}\frac{{\pi {{( - 1)}^k}}}{{4{k^2}}}}  \\ &=  - \frac{{{\pi ^3}\ln 2}}{{24}} - \frac{\pi }{4}\zeta (3) \end{aligned}$$
The final result is, $$\int_0^\pi  {{x^2}\ln (\sin x)dx}  = -\frac{\pi^3}{3}\ln 2 -\frac{\pi}{2}\zeta(3)$$