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.

I will present an evaluation that makes use of the following two Euler sums:
$$\sum_{n = 1}^\infty \frac{(-1)^n H_n}{n^2} = -\frac{5}{8} \zeta (3) \qquad \text{and} \qquad \sum_{n = 1}^\infty \frac{(-1)^n H_{2n}}{n^2} = \frac{23}{16} \zeta (3) - \pi \mathbf{G}.$$
Here $\mathbf{G}$ is Catalan's constant. For a proof of the first, see either here or Eq. (646) in this link. For a proof of the second, see Eq. (659) of this link.
Begin by enforcing a substitution of $x \mapsto 2 \arctan x$. Then
$$\int_0^{\frac{\pi}{2}} \frac{x^2}{\sin x} \, dx = 4 \int_0^1 \frac{\arctan^2 x}{x} \, dx.\tag1$$
Since $\displaystyle{\arctan x = \sum_{n = 0}^\infty \frac{(-1)^n x^{2n + 1}}{2n + 1}}$ for $|x| < 1$, applying the Cauchy product to the product between the two inverse tangent functions one obtains the following Maclaurin series expansion for $\arctan^2 x$ of:
$$\arctan^2 x = \sum_{n = 1}^\infty \frac{(-1)^{n + 1}}{n} \left (H_{2n} - \frac{1}{2} H_n \right ) x^{2n},$$
where $H_n$ is the $n$th Harmonic number. 
Substituting the Maclaurin series expansion for $\arctan^2 x$ into (1), after changing the order of the summation with the integration one obtains
\begin{align}
\int_0^{\frac{\pi}{2}} \frac{x^2}{\sin x} \, dx &= 4 \sum_{n = 1}^\infty \frac{(-1)^{n + 1}}{n} \left (H_{2n} - \frac{1}{2} H_n \right ) \int_0^1 x^{2n - 1} \, dx\\
&= -2 \sum_{n = 1}^\infty \frac{(-1)^n H_{2n}}{n^2} + \sum_{n = 1}^\infty \frac{(-1)^n H_n}{n^2}\\
&= -2 \left (\frac{23}{16} \zeta (3) - \pi \mathbf{G} \right ) - \frac{5}{8} \zeta (3)\\
&= 2 \pi \mathbf{G} - \frac{7}{2} \zeta (3),
\end{align}
as required. 
