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$$
 A: This turns out to be similar to Olivier Oloa's, but perhaps with a bit more detail or motivation.
Since $\frac{\mathrm{d}}{\mathrm{d}x}\cot(x)=-\csc^2(x)$, we have
$$
\begin{align}
\int\frac{\log(\sin(x))}{\sin^2(x)}\,\mathrm{d}x
&=-\int\log(\sin(x))\,\mathrm{d}\cot(x)\\
&=-\cot(x)\log(\sin(x))+\int(\csc^2(x)-1)\,\mathrm{d}x\\[6pt]
&=-\cot(x)\log(\sin(x))-\cot(x)-x\tag{1}
\end{align}
$$
Then since $\int\cot(x)\,\mathrm{d}x=\log(\sin(x))$
we have
$$
\begin{align}
&-\int(\cot(x)\log(\sin(x))+\cot(x)+x)\,\mathrm{d}x\\
&=-\frac12\log(\sin(x))^2-\log(\sin(x))-\frac12x^2\tag{2}
\end{align}
$$
Therefore, since $\int x^2f''(x)\,\mathrm{d}x=\color{#C00000}{x^2f'(x)}\color{#00A000}{-2xf(x)}+2\int f(x)\,\mathrm{d}x$
$$
\begin{align}
&\int_0^{\pi/2} x^2\frac{\log(\sin(x))}{\sin^2(x)}\,\mathrm{d}x\\
&=\color{#C00000}{-\frac{\pi^3}8}\color{#00A000}{+\frac{\pi^3}8}-\int_0^{\pi/2}\left(\log(\sin(x))^2+2\log(\sin(x))+x^2\right)\,\mathrm{d}x\tag{3}
\end{align}
$$
Using $(2)$ and $(9)$ from this answer, we get
$$
\begin{align}
\int_0^{\pi/2} x^2\frac{\log(\sin(x))}{\sin^2(x)}\,\mathrm{d}x
&=-\left(\frac{\pi^3}{24}+\frac\pi2\log(2)^2\right)+2\left(\frac\pi2\log(2)\right)-\frac{\pi^3}{24}\\
&=\bbox[5px,border:2px solid #C0A000]{\pi\log(2)-\frac\pi2\log(2)^2-\frac{\pi^3}{12}}\tag{4}
\end{align}
$$
A: 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.
A: I am too sleepy to finish my calculation, but you can check that
$$ \int_{0}^{\frac{\pi}{2}} \frac{x^2 \log\sin x}{\sin^2 x} \, dx = -\pi \int_{0}^{1} \frac{\log x \log(\frac{1+x}{2})}{(1+x)^2}\,dx.$$
I guess this may be an alternate starting point of a further calculation.
