Challenging integral: $\int_0^{\pi/2}x^2\frac{\ln(\sin x)}{\sin x}dx$

$\newcommand{\bbx}[1]{\,\bbox[15px,border:1px groove navy]{\displaystyle{#1}}\,} \newcommand{\braces}[1]{\left\lbrace\,{#1}\,\right\rbrace} \newcommand{\bracks}[1]{\left\lbrack\,{#1}\,\right\rbrack} \newcommand{\dd}{\mathrm{d}} \newcommand{\ds}[1]{\displaystyle{#1}} \newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,} \newcommand{\ic}{\mathrm{i}} \newcommand{\mc}[1]{\mathcal{#1}} \newcommand{\mrm}[1]{\mathrm{#1}} \newcommand{\pars}[1]{\left(\,{#1}\,\right)} \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}} \newcommand{\root}[2][]{\,\sqrt[#1]{\,{#2}\,}\,} \newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}} \newcommand{\verts}[1]{\left\vert\,{#1}\,\right\vert}$ \begin{align} I & \equiv \bbox[5px,#ffd]{\int_{0}^{\pi/2}x^{2}{\ln\pars{\sin\pars{x}} \over \sin\pars{x}}\,\dd x} \\[5mm] = &\ \left. \Re\int_{x\ =\ 0}^{x\ =\ \pi/2}\bracks{-\ic\ln\pars{z}}^{\, 2}\,{\ln\pars{\bracks{z - 1/z}/\bracks{2\ic}} \over \pars{z - 1/z}/\pars{2\ic}}\,{\dd z \over \ic z} \,\right\vert_{\ z\ =\ \exp\pars{\ic x}} \\[5mm] = &\ \left. 2\,\Re\int_{x\ =\ 0}^{x\ =\ \pi/2}\ln^{2}\pars{z} \ln\pars{{1 - z^{2} \over 2z}\,\ic}\,{\dd z \over 1 - z^{2}} \,\right\vert_{\ z\ =\ \exp\pars{\ic x}} \\[5mm] = & -2\,\Re\int_{1}^{0}\bracks{\ln\pars{y} + {\pi \over 2}\,\ic}^{2} \ln\pars{1 + y^{2} \over 2y}\,{\ic\,\dd y \over 1 + y^{2}} \\[2mm] &\ -\! 2\,\Re\int_{0}^{1}\ln^{2}\pars{x} \ln\pars{{1 - x^{2} \over 2x}\,\ic}\,{\dd x \over 1 - x^{2}} \\[5mm] = & -2\pi\int_{0}^{1}\ln\pars{y}\ln\pars{1 + y^{2} \over 2y} \,{\dd y \over 1 + y^{2}} \\[2mm] & \,\, -2\int_{0}^{1}\ln^{2}\pars{x} \ln\pars{1 - x^{2} \over 2x}\,{\dd x \over 1 - x^{2}} \\[5mm] = & -2\pi\ \overbrace{\int_{0}^{1}{\ln\pars{y}\ln\pars{1 + y^{2}} \over 1 + y^{2}}\,\dd y}^{\ds{I_{1}}}\ +\ 2\pi\ln\pars{2}\ \overbrace{\int_{0}^{1}{\ln\pars{y} \over 1 + y^{2}}\,\dd y}^{\ds{I_{2}}} \\[2mm] &\ +2\pi\ \underbrace{\int_{0}^{1}{\ln^{2}\pars{y} \over 1 + y^{2}}\,\dd y} _{\ds{I_{3}}} \\[2mm] & \,\, -2\ \overbrace{\int_{0}^{1}{\ln^{2}\pars{x} \ln\pars{1 - x^{2}} \over 1 - x^{2}}\,\dd x}^{\ds{I_{4}}}\ +\ 2\ln\pars{2}\ \overbrace{\int_{0}^{1}{\ln^{2}\pars{x} \over 1 - x^{2}} \,\dd x}^{\ds{I_{5}}} \\[2mm] &\ + 2\ \underbrace{\int_{0}^{1}{\ln^{3}\pars{x} \over 1 - x^{2}}\,\dd x} _{\ds{I_{6}}} \\[5mm] = &\ -2\pi I_{1} + 2\pi\ln\pars{2}I_{2} + 2\pi I_{3} - 2I_{4} + 2\ln\pars{2}I_{5} + 2I_{6}\label{1}\tag{1} \end{align}


\begin{equation} \!\!\!\!\!\!\!\!\!\!\!\!\left\{\begin{array}{rcl} \ds{\LARGE\bullet} && \ds{I_{2}, I_{3}, I_{5}}\ \mbox{and}\ \ds{I_{6}}\ \mbox{are rather trivial ones or/and amenable to standard} \\ && \mbox{techniques}\ (~\mbox{IBP, Polylogarithms, rescaling, etc$\ldots$}~) \\[1mm] \ds{\LARGE\bullet} && \ds{I_{4}}\ \mbox{can be evaluated via the Beta Function, after the rescaling}\ \ds{x^{2} \mapsto x}. \\[1mm] \ds{\LARGE\bullet} && \mbox{After the rescaling}\ \ds{y^{2} \mapsto y},\ \ds{I_{1}}\ \mbox{can be written as a sum that involves} \\ && \mbox{the}\ harmonic\ number\ \mbox{because}\ \ds{{\ln\pars{1 + x} \over 1 + x} = -\sum_{k = 1}^{\infty}H_{k}\,\pars{-1}^{k}x^{k}}. \\ && \mbox{It turns out that}\ \ds{I_{1} = \sum_{k = 1}^{\infty}\pars{-1}^{k}\,{H_{k} \over \pars{2k + 1}^{2}}} \\[3mm] && \mbox{Indeed,}\ \ds{I_{1}}\ \mbox{was}\ \underline{evaluated}\ \mbox{in a previous post by user}\ {\tt @user97357329}. \\ && \mbox{See the link at the very end.} \\ && \S\S\S\S\S\S\S\S\S\S\S\S\S\S\S\S\S\S\S\S\S\S\S\S\S\S\S\S\S\S\S\S\S\S\S\S\S\S\S\S \\[2mm] \ds{I_{1}} & \ds{=} & \ds{-\,{\pi^{3} \over 64} - \ln\pars{2}G - {\pi\ln^{2}\pars{2} \over 16} + 2\,\Im\mrm{Li}_{3}\pars{1 + \ic \over 2}} \\[2mm] \ds{I_{2}} & \ds{=} & \ds{-G\,\qquad\pars{~G:\ Catalan\ Constant~}} \\[2mm] \ds{I_{3}} & \ds{=} & \ds{\phantom{-}{\pi^{3} \over 16}} \\[2mm] \ds{I_{4}} & \ds{=} & \ds{-\,{\pi^{4} \over 32} + {7\ln\pars{2}\zeta\pars{3} \over 2}} \\[2mm] \ds{I_{5}} & \ds{=} & \ds{\phantom{-}{7\zeta\pars{3} \over 4}} \\[2mm] \ds{I_{6}} & \ds{=} & \ds{-\,{\pi^{4} \over 16}} \end{array}\right. \label{2}\tag{2} \end{equation}
Finally, with (\ref{1}) and (\ref{2}): \begin{align} I & \equiv \bbox[5px,#ffd]{\int_{0}^{\pi/2}x^{2}{\ln\pars{\sin\pars{x}} \over \sin\pars{x}}\,\dd x} \\[5mm] & = \bbx{{3\pi^{4} \over 32} + {\pi^{2}\ln^{2}\pars{2} \over 8} - 4\pi\,\Im\mrm{Li}_{3}\pars{1 + \ic \over 2} - {7\ln\pars{2}\zeta\pars{3} \over 2}} \\ & \end{align}

Thanks to user ${\tt @Ali Shather}$ who calls my attention to a link where $\ds{I_{1}}$ is evaluated.


We have

  • $\int \frac{\log ^3(1+i x)}{x} \, dx=6 \text{Li}_4(i x+1)+3 \text{Li}_2(i x+1) \log ^2(1+i x)-6 \text{Li}_3(i x+1) \log (1+i x)+\log (-i x) \log ^3(1+i x)$

So

  • $\Re\left(\int_0^1 \frac{\log ^3(1+i x)}{x} \, dx\right)=\int_0^1 \frac{\frac{1}{8} \log ^3\left(x^2+1\right)-\frac{3}{2} \log \left(x^2+1\right) \tan ^{-1}(x)^2}{x} \, dx\\=-\frac{3}{4} \pi C \log (2)+\frac{3}{64} \pi \Im\left(-32 \text{Li}_3\left(\frac{1}{2}+\frac{i}{2}\right)\right)+\Re\left(\text{Li}_3\left(\frac{1}{2}+\frac{i}{2}\right) \log (8)-6 \text{Li}_4\left(\frac{1}{2}-\frac{i}{2}\right)\right)-\frac{5}{64} \left(42 \zeta (3) \log (2)+\log ^4(2)\right)+\frac{1249 \pi ^4}{15360}+\frac{21}{128} \pi ^2 \log ^2(2)$

Also one have

  • $\int_0^1 \frac{\log ^3\left(x^2+1\right)}{x} \, dx=-3 \text{Li}_4\left(\frac{1}{2}\right)-\frac{7}{8} \zeta (3) \log (8)+\frac{\pi ^4}{30}-\frac{1}{8} \log ^4(2)+\frac{1}{8} \pi ^2 \log ^2(2)$

So

  • $\int_0^1 \frac{\log \left(x^2+1\right) \tan ^{-1}(x)^2}{x} \, dx=\frac{1}{2} \pi C \log (2)+\pi \Im\left(\text{Li}_3\left(\frac{1}{2}+\frac{i}{2}\right)\right)+\text{Li}_4\left(\frac{1}{2}\right)+\frac{7}{8} \zeta (3) \log (2)-\frac{421 \pi ^4}{11520}+\frac{\log ^4(2)}{24}-\frac{7}{96} \pi ^2 \log ^2(2)$

So

  • $\int_0^{\frac{\pi }{2}} \frac{x^2 \log (\sin (x))}{\sin (x)} \, dx=-4 \pi \Im\left(\text{Li}_3\left(\frac{1}{2}+\frac{i}{2}\right)\right)-\frac{7}{2} \zeta (3) \log (2)+\frac{3 \pi ^4}{32}+\frac{1}{8} \pi ^2 \log ^2(2)$