How to solve $\int_0^\pi \frac{x\sin x}{1+ \sin^2 x}dx$?

I have solved
$$\int_0^\pi \frac{x\sin x}{1+ \cos^2 x}dx=\pi^2/4$$. But I cannot solve it with the same way that I used for the upper problem. Can you help me to solve this problem?

$$\int_0^\pi \frac{x\sin x}{1+ \sin^2 x}dx$$

Solutions Collecting From Web of "How to solve $\int_0^\pi \frac{x\sin x}{1+ \sin^2 x}dx$?"

$$A=\int_{0}^{\pi }\frac{xsinx}{1+sin^2x}dx =\int_{0}^{\pi }\frac{(\pi-x)sin(\pi-x)}{1+sin^2(\pi-x)}dx\\\int_{0}^{\pi }\frac{(\pi-x)sin(\pi-x)}{1+sin^2(\pi-x)}dx\\=\int_{0}^{\pi }\frac{(\pi-x)sin(x)}{1+sin^2(x)}dx\\=\int_{0}^{\pi }\frac{(\pi)sin(x)}{1+sin^2(x)}dx+\int_{0}^{\pi }\frac{(-x)sin(x)}{1+sin^2(x)}dx\\A=\int_{0}^{\pi }\frac{(\pi)sin(x)}{1+sin^2(x)}dx-A\\$$so$$ 2A=\int_{0}^{\pi }\frac{(\pi)sin(x)}{1+sin^2(x)}dx=\pi\int_{0}^{\pi }\frac{sin(x)}{1+sin^2(x)}dx$$now aplly this u=cos x

du=-sinx dx $$\int_{}^{ }\frac{sin(x)}{1+sin^2(x)}dx=\\\int_{}^{}\frac{sinx }{1+1-cos^2x}dx=\\\int_{}^{}\frac{-du }{2-u^2}du $$

Hint:

$$\begin{align}
I
&=\int_{0}^{\pi}\frac{x\sin{x}}{1+\sin^2{x}}\,\mathrm{d}x\\
&=\int_{0}^{\pi}\frac{(\pi-x)\sin{(\pi-x)}}{1+\sin^2{(\pi-x)}}\,\mathrm{d}x\\
&=\int_{0}^{\pi}\frac{(\pi-x)\sin{x}}{1+\sin^2{x}}\,\mathrm{d}x\\
\implies 2I&=\int_{0}^{\pi}\frac{x\sin{x}}{1+\sin^2{x}}\,\mathrm{d}x+\int_{0}^{\pi}\frac{(\pi-x)\sin{x}}{1+\sin^2{x}}\,\mathrm{d}x\\
&=\int_{0}^{\pi}\frac{\pi\sin{x}}{1+\sin^2{x}}\,\mathrm{d}x\\
\end{align}$$