How to evaluate $\int_0^{\pi/2} x\ln^2(\sin x)\textrm{d}x$ in a different way?

To solve this integral use the following integral which can be proved using contour integration.

$$\int_{0}^{\frac π 2}(\cos^{p-1}x )\cos(ax)dx=\frac{π}{2^p}\frac{\Gamma(p)}{\Gamma(\frac {p+a+1}{2})\Gamma(\frac {p-a+1}{2})}$$

On differentiating with respect to $a$, we get

$$\int_{0}^{\frac π 2}x(\cos^{p-1}x )\sin(ax)dx=\frac{π}{2^p}\Gamma(p)\frac{\psi(\frac {p+a+1}{2})-\psi(\frac {p-a+1}{2})}{\Gamma(\frac {p+a+1}{2})\Gamma(\frac {p-a+1}{2})}$$

where $p>0$ and $ -(p+1)<a<(p+1)$ and $\Gamma(x)$ and $\psi(x)$ are the gamma and digamma functions.Let $p_1=(\frac {p+a+1}{2})$ and $p_2=(\frac {p-a+1}{2})$.On differentiating the above equation.

$$\frac{\partial }{\partial a}I(a,p)=\frac{π}{2^{p+1}}\frac{\Gamma(p)}{\Gamma(p_1)\Gamma(p_2)}[-(\psi(p_1)-\psi(p_2))^2+\psi'(p_1)+\psi'(p_2)]$$$$=\int_{0}^{\frac π 2}x^2(cos^{p-1}x )\cos(ax)dx$$

On putting $a=0$, we get

$$J_p=\int_{0}^{\frac π 2}x^2(\cos^{p-1}x )dx=\frac{π}{2^{p+1}}\frac{\Gamma(p)}{\Gamma^2(\frac{p+1}{2})}\psi'(\frac{p+1}{2})$$

Again differentiating with respect to parameter $p$ ,we get

$$\frac d {dp}J_p=\int_{0}^{\frac π 2}x^2(\cos^{p-1}x)\log(\cos x)dx=\frac{π}{2^{p+1}}\frac{\Gamma(p)}{\Gamma^2(\frac{p+1}{2})}\psi'(\frac{p+1}{2})[-\log2+\psi(p)-\psi(\frac{p+1}{2})+\frac {\psi''(\frac{p+1}{2})}{\psi'(\frac{p+1}{2})}$$

From the above integral we can also calculate below integral by letting $p=1$.

$$\int_{0}^{\frac π 2}x^2\log(\cos x)dx=\frac{π^3}{24}[-\log2+\frac{\psi''(1)}{\psi'(1)}]=-\frac{π^3}{24}\log2-\fracπ2 \zeta(3)$$

Now, $$J''_p=\int_{0}^{\frac π 2}x^2(\cos^{p-1}x)\log^2(\cos x)dx=\frac{π}{2^{p+1}}\frac{\Gamma(p)}{\Gamma^2(\frac{p+1}{2})}\psi'(\frac{p+1}{2}) \left ( \left ( [-\log2+\psi(p)-\psi(\frac{p+1}{2})+\frac {\psi''(\frac{p+1}{2})}{\psi'(\frac{p+1}{2})} \right )^2+\psi'(p)-\frac12\psi'(\frac{p+1}{2})+\frac12\frac d {dp}\frac {\psi''(\frac{p+1}{2})}{\psi'(\frac{p+1}{2})} \right ) $$

On letting $p=1$ ,we get

$$\int_{0}^{\fracπ2}x^2\log^2(\cos x)dx=\fracπ {1440}[11π^4+60π^2\log^2 2+720\zeta(3)\log2]$$

Now you can get your desired integral using all of the above integrals but this is lenghty task as it involves some other integrals which will create polylogarithms and the term containing $ \zeta(3)$ will cancel.

These are some generalisations of log-sine integrals:


$$\int_0^zx^m\log\left(2\sin\frac{x}{2}\right)\mathrm{d}x=\frac{z^{m+1}}{m+1}\log\left(2\sin\frac{z}{2}\right)-\frac{z^{m+1}}{(m+1)^2}+\frac{2z^{m+1}}{m+1}\sum_{k=1}^{\infty}\frac{\zeta(2k)}{m+2k+1}\left(\frac{z}{2\pi}\right)^{2k} \;\;\;\;\; (|z|<2\pi;m\in\mathbb{N}).$$

$$\int_0^{2\pi}\left(2\sin\frac12 \theta\right)^{\lambda}e^{i\nu\theta}\mathrm{d}\theta=2\pi e^{i\nu\pi}\frac{\Gamma(1+\lambda)}{\Gamma(1+\frac12\lambda+\nu)\Gamma(1+\frac12\lambda-\nu)}.$$

$$2^p\int_0^\pi x^n\log^p(\sin (x))\mathrm{d}x=\pi^n\left(\frac{\pi}{n+1}\frac{\mathrm{d}^p}{\mathrm{d}m^p}\left(\left.\frac{\binom{2m}{m}}{4^m}\right)\right|_{m=0}-\sum_{k=1}^{\infty}\frac{\partial^p}{\partial m^p}\left(\left.\frac{\binom{2m}{m+k}}{4^m}\right)\right|_{m=0}\sum_{j=1}^{\lfloor\frac{n}{2}\rfloor}\frac{n!(-1)^{j+k}}{(n+1-2j)!(2\pi)^{2j-1}k^{2j}}\right).$$

$$\frac{1}{2\pi}\int_0^{2\pi}\left[\log\left(2\sin \frac{x}{2}\right)\right]^n\mathrm{d}x=\frac{(-1)^nn!}{2}a_n\ \ \ \ \ (n\in N_0)\\[2ex] \text{coefficients $a_n$ are given by:}\\[2ex] \frac{2^{-2z}\Gamma\left(\frac12-z\right)}{\sqrt{\pi}\ \Gamma(1-z)}=\sum_{n=0}^{\infty}a_nz^n$$



From here we have

$$\frac23\arcsin^4x=\sum_{n=1}^\infty\frac{H_{n-1}^{(2)}(2x)^{2n}}{n^2{2n\choose n}}=\sum_{n=1}^\infty\frac{H_{n}^{(2)}(2x)^{2n}}{n^2{2n\choose n}}-\sum_{n=1}^\infty\frac{(2x)^{2n}}{n^4{2n\choose n}}$$

Set $x=1$ we get

$$\sum_{n=1}^\infty\frac{4^n}{n^4{2n\choose n}}=\sum_{n=1}^\infty\frac{4^nH_{n}^{(2)}}{n^2{2n\choose n}}-\frac{15}{4}\zeta(4)\tag1$$

In this question we showed $$\sum_{n=1}^\infty\frac{4^nH_n}{n^3{2n\choose n}}=-\sum_{n=1}^\infty\frac{4^nH_n^{(2)}}{n^2{2n\choose n}}+12\ln^2(2)\zeta(2)\tag2$$

Adding $(1)$ and $(2)$ yields

$$\sum_{n=1}^\infty\frac{4^n}{n^4{2n\choose n}}=12\ln^2(2)\zeta(2)-\frac{15}{4}\zeta(4)-\sum_{n=1}^\infty\frac{4^nH_n}{n^3{2n\choose n}}$$

By using the Fourier series of $\tan x\ln(\sin x)$, we showed in this solution:

$$\sum_{n=1}^\infty\frac{4^nH_n}{n^3{2n\choose n}}=-8\text{Li}_4\left(\frac12\right)+\zeta(4)+8\ln^2(2)\zeta(2)-\frac{1}{3}\ln^4(2)$$

substitute this result we get

$$\sum_{n=1}^\infty\frac{4^n}{n^4{2n\choose n}}=8\text{Li}_4\left(\frac12\right)-\frac{19}{4}\zeta(4)+4\ln^2(2)\zeta(2)+\frac{1}{3}\ln^4(2)\tag3$$

Now we use the well-known series expansion of $\arcsin^2 x$:

$$\arcsin^2(x)=\frac12\sum_{n=1}^\infty\frac{4^n x^{2n}}{n^2{2n\choose n}}$$

Multiply both sides by $-\frac{\ln x}{x}$ then $\int_0^1$ and use that $-\int_0^1 x^{2n-1}\ln xdx=\frac{1}{4n^2}$ we get

$$\frac18\sum_{n=1}^\infty\frac{4^n}{n^4{2n\choose n}}=-\int_0^1\frac{\ln x\arcsin^2(x)}{x}dx$$

$$\overset{IBP}{=}\int_0^1\frac{\ln^2x\arcsin(x)}{\sqrt{1-x^2}}dx\overset{x=\sin\theta}{=}\int_0^{\pi/2}x\ln^2(\sin x)dx\tag4$$

From $(3)$ and $(4)$ we obtain

$$\int_0^{\pi/2} x\ln^2(\sin x)dx=\frac{1}{2}\ln^2(2)\zeta(2)-\frac{19}{32}\zeta(4)+\frac{1}{24}\ln^4(2)+\operatorname{Li}_4\left(\frac{1}{2}\right)$$


Some generalizations. Enjoy!

  • $\small \int_0^{\frac{\pi }{2}} x^3 \log ^2(2 \sin (x)) \, dx=-\frac{3}{4}\zeta(\bar 5,1)+\frac{3}{4} \pi ^2 \text{Li}_4\left(\frac{1}{2}\right)-\frac{3 \zeta (3)^2}{8}+\frac{21}{32} \pi ^2 \zeta (3) \log (2)-\frac{187 \pi ^6}{26880}+\frac{1}{32} \pi ^2 \log ^4(2)-\frac{1}{32} \pi ^4 \log ^2(2)$

  • $\small \int_0^{\frac{\pi }{2}} x^3 \log^3 (2 \sin (x)) \, dx=\frac{9}{4} \zeta(\bar5,1,1)+\frac{9}{4} \pi ^2 \text{Li}_5\left(\frac{1}{2}\right)+\frac{9}{4} \pi ^2 \text{Li}_4\left(\frac{1}{2}\right) \log (2)-\frac{\pi ^4 \zeta (3)}{16}-\frac{759 \pi ^2 \zeta (5)}{512}-\frac{45 \zeta (7)}{512}+\frac{63}{64} \pi ^2 \zeta (3) \log ^2(2)+\frac{3}{40} \pi ^2 \log ^5(2)-\frac{1}{16} \pi ^4 \log ^3(2)$

  • $\scriptsize \int_0^{\frac{\pi }{2}} x^4 \log ^4(2 \sin (x)) \, dx=-\frac{7}{4} \pi ^3 \zeta(\bar5,1)-15 \pi \zeta(\bar7,1)-6 \pi \zeta(\bar5,1,\bar1,1)+9 \pi \log ^2(2)\zeta(\bar5,1)+18 \pi \log (2) \zeta(\bar5,1,1)-24 \pi \text{Li}_5\left(\frac{1}{2}\right) \zeta (3)-\frac{1}{6} \pi ^5 \text{Li}_4\left(\frac{1}{2}\right)+6 \pi ^3 \text{Li}_6\left(\frac{1}{2}\right)+3 \pi ^3 \text{Li}_4\left(\frac{1}{2}\right) \log ^2(2)+6 \pi ^3 \text{Li}_5\left(\frac{1}{2}\right) \log (2)+\frac{3 \pi ^3 \zeta (3)^2}{8}+\frac{2835 \pi \zeta (3) \zeta (5)}{64}+\frac{1}{5} \pi \zeta (3) \log ^5(2)+\frac{13}{24} \pi ^3 \zeta (3) \log ^3(2)-\frac{31}{8} \pi \zeta (5) \log ^3(2)+\frac{9}{2} \pi \zeta (3)^2 \log ^2(2)-\frac{8}{15} \pi ^5 \zeta (3) \log (2)-\frac{65}{32} \pi ^3 \zeta (5) \log (2)+\frac{465}{16} \pi \zeta (7) \log (2)-\frac{36493 \pi ^9}{4838400}+\frac{1}{12} \pi ^3 \log ^6(2)-\frac{5}{72} \pi ^5 \log ^4(2)+\frac{25 \pi ^7 \log ^2(2)}{1008}$