I have the definite integral $\displaystyle\int_{0}^{\pi }\frac{x^2 \cos(x)}{(1+ \sin(x))^2}\,dx.$
Since there are both algebraic and trigonometric functions in the numerator, I don't know what substitution to make. Can someone tell the method of solving the above integral (and not the complete solution). I don't want the antiderivative, only the definite integral.
Note: The answer is $\pi(2-\pi).$