<s>[INST] How to solve $\int_0^{\frac{\pi}{2}}\frac{x^2\cdot\log\sin x}{\sin^2 x}dx$ using a very cute way? Few days ago my friend gave me this integral and i cant get how to solve this. The integral is:$$\int_0^{\large \frac{\pi}{2}}\frac{x^2\cdot\log{{\sin{x}}}}{\sin^2{x}}dx$$
 [/INST] Hint. You may observe that 
$$
\frac{\log{{\sin{x}}}}{\sin^2{x}}=\left( -\frac{x^2}{2}-\log \sin x-\frac{1}{2} \log^2 \sin x\right)''
$$ thus integrating by parts twice, using $(x^2)''=2$, leads to
$$
\begin{align}
\int_0^{\pi/2}\frac{x^2\cdot\log{{\sin{x}}}}{\sin^2{x}}dx&=2\int_0^{\pi/2}\left( -\frac{x^2}{2}-\log \sin x-\frac{1}{2} \log^2 \sin x\right)dx\\\\
&=-\int_0^{\pi/2}x^2dx-2\int_0^{\pi/2}\log \sin x dx-\int_0^{\pi/2}\log^2 \sin x dx\\\\
&=-\frac{\pi ^3}{24}+\pi  \ln 2-\frac{1}{24} \pi  \left(\pi ^2+12 \ln^2 2\right)
\end{align} 
$$ that is 

$$
\int_0^{\pi/2}\frac{x^2\cdot\log{{\sin{x}}}}{\sin^2{x}}dx=-\frac{\pi ^3}{12}+\pi  \ln 2-\frac{1}{2} \pi  \ln^2 2,
$$

where we have used standard evaluations for the last integrals.
</s>