Evaluate $\int_{0}^{\frac{\pi}{2}}\frac{x^2}{ \sin x}dx$ I want to evaluate $$\int_{0}^{\frac{\pi}{2}}\frac{x^2}{ \sin x}dx$$
First,I tried to evaluate like this:
$$\int_{0}^{\frac{\pi}{2}}\frac{x^2}{ \sin x}dx=\int_{0}^{\frac{\pi}{2}}x^2\left(\frac{1+\cos x}{\sin x}\right)\frac{dx}{1+\cos x}=\int_{0}^{\frac{\pi}{2}}x^2\left(\frac{1+\cos x}{\sin x}\right)d\left(\frac{\sin x}{1+\cos x}\right)$$
$$=\int_{0}^{\frac{\pi}{2}}x^2d\log\left(\frac{\sin x}{1+\cos x}\right)=x^2\log\left(\frac{\sin x}{1+\cos x}\right)|_{0}^{\frac{\pi}{2}}-2\int_{0}^{\frac{\pi}{2}}x\log\left(\frac{\sin x}{1+\cos x}\right)dx$$
$$=0+2\int_{0}^{\frac{\pi}{2}}x\log\left(\frac{1+\cos x}{\sin x}\right)dx=2\int_{0}^{\frac{\pi}{2}}x\log\left(1+\cos x\right)dx-2\int_{0}^{\frac{\pi}{2}}x\log\left(\sin x\right)dx$$
$$=2\int_{0}^{\frac{\pi}{2}}x\log\cot \left(\frac{x}{2}\right)dx=8\int_{0}^{\frac{\pi}{4}}x\log\cot xdx$$
but I can't proceed next step,help me,thanks.

$$\mathcal{J}=\int_{0}^{\pi/2}\frac{x^2}{\sin x}\,dx = \int_{0}^{1}\frac{\arcsin^2(x)}{x\sqrt{1-x^2}}\,dx=\sum_{n\geq 1}\frac{2^{2n-1}}{n^2\binom{2n}{n}}\int_{0}^{1}\frac{x^{2n-1}}{\sqrt{1-x^2}}\,dx \tag{1}$$
by the Maclaurin series of $\arcsin^2(x)$. Euler's Beta function then leads to
$$ \mathcal{J}=\sum_{n\geq 1}\frac{16^n}{4n^3 \binom{2n}{n}^2}=\phantom{}_4 F_3\left(1,1,1,1;\tfrac{3}{2},\tfrac{3}{2},2;1\right)\tag{2} $$
where the RHS is a manageable hypergeometric function (similar objects are evaluated both here and here) and as already shown by Claude Leibovici, $\mathcal{J}=4\int_{0}^{1}\frac{\arctan^2(u)}{u}\,du $ is simply given by a combination of a dilogarithm and a trilogarithm. Indeed
$$ \int_{0}^{\pi/2}\int_{0}^{\theta}\frac{u}{\sin u}\,du\,d\theta =-\pi G+\frac{7}{2}\zeta(3)\tag{3}$$
leading to $\mathcal{J}=2\pi G-\frac{7}{2}\zeta(3)$, has already been a key lemma in this historical thread.
An alternative way for proving this identity is just to write $\frac{x}{\sin x}$ and $|x|$ as Fourier cosine series.
The Shafer-Fink inequality leads to
$$ \int_{0}^{\pi/2}\frac{x^2}{\sin x}\,dx = 4 \int_{0}^{1}\frac{\arctan^2(u)}{u}\,du \approx \frac{6}{7}(3\sqrt{2}-5)+9\log\left(\frac{2\sqrt{2}+1}{3}\right)\approx 1.54.\tag{4}$$
