how I can integrate this
$\displaystyle \displaystyle \int_{0}^{\pi} \frac{x\sin x }{1 + \cos ^2 x } dx $
any clues hints
Using $\displaystyle \displaystyle \ \int_{a}^{b}f(x)\;{dx}=\int_{a}^{b}f(a+b-x)\;{dx}\ $, we have:
$\displaystyle \begin{aligned}\displaystyle I & = \int_{0}^{\pi}\frac{x\sin{x}}{1+\cos^2{x}}\;{dx} = \int_{0}^{\pi}\frac{(\pi-x)\sin(\pi-x)}{1+\cos^2(\pi-x)}}\;{dx} \\ & = \int_{0}^{\pi}\frac{\pi\sin(\pi-x)}{1+\cos^2(\pi-x)}}\;{dx}-\int_{0}^{\pi}\frac{x\sin(\pi-x)}{1+\cos^2(\pi-x)}}\;{dx} \\ & = \pi\int_{0}^{\pi}\frac{\sin{x}}{1+\cos^2{x}}}\;{dx }-\int_{0}^{\pi}\frac{x\sin{x}}{1+\cos^2{x}}}\;{dx} \\ & = \pi\int_{0}^{\pi}\frac{\sin{x}}{1+\cos^2{x}}}\;{dx }-I .\end{aligned}$
Rearranging this, we get:
$\displaystyle \displaystyle 2I = \pi\int_{0}^{\pi}\frac{\sin(x)}{1+\cos^2(x)}\;{dx} .$
Therefore, we have:
$\displaystyle \displaystyle \begin{aligned} I & = \frac{\pi}{2}\int_{0}^{\pi}\frac{\sin{x}}{1+\cos^2 {x}}\;{dx} = -\frac{\pi}{2}\int_{0}^{\pi}\frac{(\cos{x})'}{1+\co s^2{x}}\;{dx} \\ & = -\frac{\pi}{2}\tan^{-1}\left(\cos{x}\right)\bigg|_{0}^{\pi} = -\frac{\pi}{2}\left(-\frac{\pi}{2}\right) = \frac{\pi^2}{4}.\end{aligned} $
Using the substitution
$\displaystyle t=a+b-x$
you'll obtain
$\displaystyle \displaystyle \int_{a}^{b} f(a+b-x) dx =\ldots=\displaystyle \int_{a}^{b} f(t) dt=\displaystyle \int_{a}^{b} f(x) dx $
Fernando Revilla
integrate by parts and get $\displaystyle \displaystyle\frac{{{\pi }^{2}}}{4}+\int_{0}^{\pi }{\arctan (\cos x)\,dx},$ now the last integral is zero by putting $\displaystyle t=x-\dfrac\pi2$ so the latter one equals $\displaystyle \displaystyle-\int_{-\frac{\pi }{2}}^{\frac{\pi }{2}}{\arctan (\sin x)\,dx}=0,$ since the function is odd.
or even easier, put $\displaystyle t=\pi-x$ and see that the last integral equals to its negative, hence it must be zero.