<s>[INST] Evaluate $\int\limits_0^\pi \frac{x}{1+\sin^2x} \ dx$ How can one evaluate 
$$\int_0^\pi \frac{x}{1+\sin^2x} \ dx\ ?$$
 [/INST] First, make the substitution $x\to \pi - x$ to get $$\int_{0}^{\pi} \frac{x}{1+\sin^2 x} \, dx = \frac{\pi}{2} \int_{0}^{\pi} \frac{1}{1+\sin^2 x} \, dx $$
Now, interpret the integral on the right as the area under a polar curve: set $r(\theta) = \frac{1}{\sqrt{1+\sin^2 \theta}}$. Converting this to Cartesian coordinates gives the ellipse $x^2 + 2y^2 = 1$. The area under this ellipse as the angle varies from $0$ to $\pi$ is $\frac{\pi}{2\sqrt{2}}$. Thus, $$\frac{1}{2} \int_{0}^{\pi} \frac{1}{1+\sin^2 x} \, dx = \frac{1}{2} \int_{0}^{\pi} r^2 \, d\theta = \frac{\pi}{2\sqrt{2}} \implies \int_{0}^{\pi} \frac{1}{1+\sin^2 x} \, dx= \frac{\pi}{\sqrt{2}}$$ Therefore, $$\int_{0}^{\pi} \frac{x}{1+\sin^2 x} \, dx = \frac{\pi^2}{2\sqrt{2}}$$
</s>