Tough definite integral: $\int_0^\frac{\pi}{2}x\ln^2(\sin x)~dx$ Any ideas on evaluating the definite integral
$$\int_0^\frac{\pi}{2}x\ln^2(\sin x)\ dx$$
The best numerical approximation I could get is $0.2796245358$.
Is there even a closed form solution?
 A: Solution by real methods:
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)$$
A: Here is an elementary approach. Denote $ K= \int_0^\infty \frac{\ln t\ln(1+t^2) \tan^{-1}t}{1+t^2}dt $
\begin{align}
I= &\int_0^\frac{\pi}{2}x\ln^2(\sin x)\ dx
\overset{t=\tan x}= \frac14 \int_0^\infty \frac{\tan^{-1}t \ln^2\frac{t^2}{1+t^2}}{1+t^2}dt\\
=& \int_0^\infty \frac{\tan^{-1}t\ln^2t}{1+t^2}\overset{t\to 1/t}{dt} +\frac14
\int_0^\infty \frac{\tan^{-1}t\ln^2(1+t^2)}{1+t^2}\overset{t\to 1/t}{dt}
-K\\
=& \frac\pi8 \int_0^\infty \frac{\ln^2t}{1+t^2}dt
 + \frac\pi{16}\int_0^\infty \frac{\ln^2(1+t^2)}{1+t^2}dt -I -K\\
 =& \frac\pi8 \cdot\frac{\pi^3}8
+\frac\pi{16}\left(\frac{\pi^3}6+2\pi\ln^22\right)  -I-K
=\frac{5\pi^4}{192}+\frac{\pi^2}8\ln^22-\frac12K\tag1
\end{align}
Note that, with the substitution $x=\frac{(1+t^2)y}{1-y}$
\begin{align}
\int_0^1 \frac{2t\ln\frac{1-y}y}{1+t^2y^2}dy
= \int_0^\infty \frac{2t\ln\frac{1+t^2}x}{(1+x)^2+t^2}dx=\ln(1+t^2)\tan^{-1}t
\end{align}
Then, integrate $K$ as follows
\begin{align}
K=& \int_0^\infty \frac{\ln t}{1+t^2}\int_0^1 \frac{2t\ln\frac{1-y}y}{1+t^2y^2}dy \>\overset{t^2\to t}{dt}\\
= &\frac12 \int_0^1 \ln\frac{1-y}y\int_0^\infty 
\frac{\ln t}{(1+t)(1+y^2t)}dt\>dy
=\int_0^1 \ln\frac{1-y}y
\frac{\ln^2y}{1-y^2}dy\\
=&\frac{\pi^4}{16}+\frac12\int_0^1\frac{\ln^2y\ln(1-y)}{1-y}dy
+ \frac12\int_0^1\frac{\ln^2y\ln(1-y)}{1+y}dy
\end{align}
The pair of integrals above are known and given below
\begin{align}
&\int_0^1\frac{\ln^2y\ln(1-y)}{1-y}dy= -\frac{\pi^4}{180}\\
&\int_0^1\frac{\ln^2y\ln(1-y)}{1+y}dy= 
-4Li_4\left(\frac12\right) +\frac{\pi^4}{90}+\frac{\pi^2}6\ln^22-\frac16\ln^42\\
\end{align}
Plug them into $K$ and then into (1) to obtain
$$\int_0^\frac{\pi}{2}x\ln^2(\sin x)\ dx
= Li_4\left(\frac12\right)-\frac{19\pi^4}{2880}+\frac{\pi^2}{12}\ln^22+\frac1{24}\ln^42
$$
A: Not a closed form, but still might be a useful result:

$$\int_0^\frac{\pi}{2}x\ln^2(\sin x)\ dx= \frac{1}{8} \frac{d^2}{db^2} B \left(b,\frac{1}{2} \right) ~{_3F_2} \left(\frac{1}{2},\frac{1}{2},b;\frac{3}{2},b+\frac{1}{2};1 \right) \bigg|_{b=1}$$

Not sure how to get the closed form  user178256 provided in their comment, but still the method I used is general enough to be worth posting here.
Making a substitution $t=\sin x$, we obtain:
$$\int_0^1 \arcsin t \ln^2 t \frac{dt}{\sqrt{1-t^2}}=\int_0^1 \int_0^1  \frac{t \ln^2 t ~dt~dy}{\sqrt{1-t^2}\sqrt{1-y^2t^2}}=$$
$$=\frac{1}{8} \int_0^1 \int_0^1 \ln^2 u~ (1-u)^{-1/2} (1-y^2 u)^{-1/2} ~du ~dy$$
Consider another integral:
$$I(b)=\int_0^1 \int_0^1 u^{b-1}~ (1-u)^{-1/2} (1-y^2 u)^{-1/2} ~du~dy$$
Quite clearly from Euler integral for the hypergeometric function:
$$I(b)=B \left(b,\frac{1}{2} \right) \int_0^1 {_2F_1} \left(\frac{1}{2},b;b+\frac{1}{2};y^2 \right) dy$$
Using another Euler integral for generalized hypergeometric functions, we integrate w.r.t. $y$ to obtain:
$$I(b)=B \left(b,\frac{1}{2} \right) {_3F_2} \left(\frac{1}{2},\frac{1}{2},b;\frac{3}{2},b+\frac{1}{2};1 \right)$$
Which immediately gives us the listed result by differentiating under the integral twice.

From numerical standpoint, this result may be useful, as $I(b)$ is a very nice looking function around $b=1$:

We can approximate it by polynomials for example, and find the second derivative with good accuracy.

Also worth noting some special values:
$$I \left( \frac{1}{2} \right)=4G$$
$$I \left( \frac{3}{2} \right)=2$$
$$I \left( 1 \right)=\frac{\pi^2}{4}$$
Where $G$ is Catalan's constant.
A: Using the Fourier series of $\ln^2(2\sin x):$
$$\ln^2(2\sin x)=\left(\frac{\pi}{2}-x\right)^2+2\sum_{n=1}^\infty\frac{H_{n-1}}{n}\cos(2nx),\quad 0<x<\pi$$
we get
$$
\int_0^{\frac{\pi}{2}}x\ln^2(2\sin x)\, dx$$
$$=\int_0^{\frac{\pi}{2}} x\left(\frac{\pi}{2}-x\right)^2\, dx+2\sum_{n=1}^\infty\frac{H_{n-1}}{n}\int_0^{\frac{\pi}{2}} x\cos(2nx)\, dx$$
$$=\frac{15}{32}\zeta(4)+2\sum_{n=1}^\infty\frac{H_{n-1}}{n}\left(\frac{(-1)^n}{4n^2}-\frac{1}{4n^2}\right)$$
$$=\frac{45}{32}\zeta(4)-\frac12\sum_{n=1}^\infty\frac{H_n}{n^3}+\frac12\sum_{n=1}^\infty\frac{(-1)^n H_n}{n^3}$$
$$=\operatorname{Li_4}\left(\frac12\right)-\frac{19}{32}\zeta(4)+\frac78\ln(2)\zeta(3)-\frac14\ln^2(2)\zeta(2)+\frac{1}{24}\ln^4(2).$$
On the other hand, we can write
$$\int_0^{\frac{\pi}{2}}x\ln^2(2\sin x)\, dx$$
$$=\ln^2(2)\int_0^{\frac{\pi}{2}}x\, dx+2\ln(2)\int_0^{\frac{\pi}{2}}x\ln(\sin x)\, dx+\int_0^{\frac{\pi}{2}}x\ln^2(\sin x)\, dx$$
$$=\frac78\ln(2)\zeta(3)-\frac34\ln^2(2)\zeta(2)+\int_0^{\frac{\pi}{2}}x\ln^2(\sin x)\, dx.$$
Thus,
$$\int_0^{\frac{\pi}{2}} x\ln^2(\sin x)\,dx=\operatorname{Li}_4\left(\frac{1}{2}\right)-\frac{19}{32}\zeta(4)+\frac{1}{2}\ln^2(2)\zeta(2)+\frac{1}{24}\ln^4(2).$$
