TITLE: Problematic integral $\int_0^\pi \frac{x\sin x}{1+\cos^2x}\ dx$
QUESTION [5 upvotes]: How to calculate $$\int_0^\pi \frac{x\sin x}{1+\cos^2x}\ dx\ ?$$ I wish I could say I ran out of ideas, but actually I have none.

REPLY [2 votes]: Just make the change of variables $x\rightarrow\pi-x$ and add the two results:
$$2I=\int_0^\pi \frac{x\sin x}{1+\cos^2x}\ dx+\int_0^\pi \frac{(\pi-x)\sin x}{1+\cos^2x}\ dx=\pi \int_0^\pi \frac{\sin x}{1+\cos^2x}dx.$$
I believe you can take it from here.