Evaluating integral using result The problem is this. Given that $\int_0^a f(x) dx = \int_0^a f(a-x)dx$, evaluate $$\int_0^\pi \frac{x\sin x}{1+\cos^2x} dx$$
I write the integral as $$\int_0^\pi \frac{(\pi-x)\sin(\pi-x)}{1+\cos^2(\pi-x)} dx$$
but I don't see how that helps to do it.
 A: If you set
$$
I=\int_0^\pi \frac{x\sin x}{1+\cos^2x} dx
$$then
$$\begin{align}
I&=\int_0^\pi \frac{(\pi-x)\sin(\pi-x)}{1+\cos^2(\pi-x)} dx\\\\
&=\int_0^\pi \frac{(\pi-x)\sin x}{1+\cos^2x} dx\\\\
&=\pi\int_0^\pi \frac{\sin x}{1+\cos^2x} dx-\int_0^\pi \frac{x\sin x}{1+\cos^2x} dx\\\\
&=\pi\int_0^\pi \frac{\sin x}{1+\cos^2x} dx-I
\end{align}$$ giving
$$\begin{align}
I=\frac{\pi}2\int_0^\pi \frac{\sin x}{1+\cos^2x} dx
\end{align}=-\frac{\pi}2\left[ \arctan(\cos x)\right]_0^\pi=\color{red}{\frac{\pi^2}4}.$$
A: Using the property
$$
\int_0^af(x)\,dx=\int_0^af(a-x)\,dx,
$$
with 
$$
f(x)=\frac{x\sin x}{1+\cos^2x},\quad a=\pi
$$
we have
\begin{eqnarray}
\int_0^\pi f(x)\,dx&=&\int_0^\pi=\int_0^\pi f(\pi-x)\,dx=\int_0^\pi\frac{(\pi-x)\sin(\pi-x)}{1+\cos^2(\pi-x)}\,dx\\
&=&\int_0^\pi\frac{(\pi-x)\sin x}{1+\cos^2x}\,dx=\pi\int_0^\pi\frac{\sin x}{1+\cos^2x}\,dx-\int_0^\pi f(x)\,dx,
\end{eqnarray}
and so
$$
\int_0^\pi f(x)\,dx=\frac\pi2\int_0^\pi\frac{\sin x}{1+\cos^2x}\,dx=-\frac\pi2\arctan(\cos x)\Big|_0^\pi=-\frac\pi2(\arctan(-1)-\arctan(1))=\frac{\pi^2}{4}.
$$
