Evaluate $\int_0^{\pi}\frac{x\sin x}{1+\cos^2x}\,\mathrm dx$ I can't seem to get any kind of result which I find useful when I use the fact that $$\int_0^af(x)\,\mathrm dx=\int_0^af(a-x)\,\mathrm dx$$
After using trigonometry, I end up getting:
$$\int_0^{\pi}\frac{(\pi-x)\sin x}{1+\cos^2x}\,\mathrm dx$$
I don't see how this is useful. Please help.

It follows from what you've done so far that
$$2 \int_0^\pi \frac{x \sin x}{1+\cos^2 x} dx = \int_0^\pi \frac{\pi\sin x}{1+\cos^2 x} dx$$
The integral on the left is twice the one you're after. The integral on the right can be evaluated using the 'obvious' substitution of $u = \cos x$ and then hopefully you recognize the integral.

Added (in response to comment below)
You have shown that
$$\int_0^\pi \frac{x \sin x}{1+\cos^2 x} dx  = \int_0^\pi \frac{(\pi - x) \sin x}{1+\cos^2 x} dx $$
In other words,
$$\int_0^\pi \frac{x \sin x}{1+\cos^2 x} dx  = \int_0^\pi \frac{\pi \sin x}{1+\cos^2 x} dx - \int_0^\pi \frac{x\sin x}{1+\cos^2 x} dx $$
and hence
$$2 \int_0^\pi \frac{x \sin x}{1+\cos^2 x} dx = \int_0^\pi \frac{\pi\sin x}{1+\cos^2 x} dx$$
So we can write the original integral as being equal to this integral:
$$ \int_0^\pi \frac{x \sin x}{1+\cos^2 x} dx =  \frac{\pi}{2} \int_0^\pi \frac{\sin x}{1+\cos^2 x} dx$$
Clear now?
