I am stuck on the integral.
$$\int_0^\pi \frac{x \sin x}{1+ \cos^2x} dx$$
The hint was to swap limits and add something to cancel the $x$ out? If the denominator was $1 - \cos^2x$ we'd be in business lol.
I am stuck on the integral.
$$\int_0^\pi \frac{x \sin x}{1+ \cos^2x} dx$$
The hint was to swap limits and add something to cancel the $x$ out? If the denominator was $1 - \cos^2x$ we'd be in business lol.
Denote by $$I := \int_0^\pi \frac{x \sin(x)}{1+\cos(x)^2}dx. $$
With the change of variables $x = \pi - t$, we get that $$I = \int_0^\pi \frac{(\pi - t) \sin(\pi - t)}{1 + \cos(\pi-t)^2}dt. $$
As $\sin(\pi-t) = \sin(t)$ and as $\cos(\pi - t) = -\cos(t)$, we have that $$I = \int_0^\pi \frac{(\pi - t) \sin(t)}{1 + \cos(t)^2}dt = \pi \int_0^\pi \frac{\sin(t)}{1 + \cos(t)^2}dt - I, $$ and so $$I = \frac{\pi}{2} \int_0^\pi \frac{\sin(t)}{1 + \cos(t)^2}dt. $$
The last integral can be computed using the change of variable $\cos(t) = y$, as mentioned in the comments.