EDIT:
This question is wrong. You don't need to waste your time trying to answer it. :D
I need help showing that:
$$ \int_a^b x f(x) dx = \frac {a+b} 2\int_a^bf(x)dx$$
My attempt. $$ I = \int_a^bxf(x)dx = \int_a^b(b+a -x)f(b+a-x)dx $$ $$ = \int_a^b (b+a)f(b+a-x)dx - \int_a^bxf(b+a-x)dx $$
I doubt that probably the 2nd term is $I$ itself (though not sure). Hints?
Btw, the reason I am asking this is, if the above stated theorem is true, then how come there be a contradiction between it and this question? You see, the question is of the same form. But in that case, the integral of $f(x) = \cfrac {\cos x} {1 + \sin^2x}$ from 0 to $\pi$ is 0.
Interestingly, the above stated theorem works for $$ \int \limits_0^\pi \cfrac {x \sin x} {1 + \cos^2x} dx $$