TITLE: Integral with bounds
QUESTION [5 upvotes]: I have define integral:
$$\int_0^\pi\frac{x\sin x\,dx}{1+\cos^2x}=\frac{\pi}{2}\int_0^\pi\frac{\sin x\,dx}{1+\cos^2x}$$
my question is how do we get that $\pi/2$

REPLY [4 votes]: Write:
$$I=\int_0^\pi\frac{x\sin x\,dx}{1+\cos^2x},$$
$$I=\int_0^\pi (x-\frac{\pi}{2})\frac{\sin x\,dx}{1+\cos^2x}+\frac{\pi}{2}\int_0^\pi\frac{\sin x\,dx}{1+\cos^2x},$$
$$I=I_1+\frac{\pi}{2}\int_0^\pi\frac{\sin x\,dx}{1+\cos^2x}.$$
Now
$$I_1\stackrel{\text{substitute: }x\to (x-\frac{\pi}{2})}=\int_{-\frac{\pi}{2}}^{\frac{\pi}{2}}\frac{x\cos{x}}{1+\sin^2{x}} dx=\int_{-\frac{\pi}{2}}^{\frac{\pi}{2}} f(x)=0,$$ where in the last step we used the fact that $f(x)$ is odd.
Finally, $$I=\frac{\pi}{2}\int_0^\pi\frac{\sin x\,dx}{1+\cos^2x}.$$