<s>[INST] Find $\int_0^{2\pi} \frac{x \cos x}{2 - \cos^2 x} dx$. I have to find the integral:
$$\int_0^{2\pi} \frac{x \cos x}{2 - \cos^ 2 x} dx$$
I rewrote it as:
$$\int_0^{2\pi} \frac{x \cos x}{1 + \sin^ 2 x} dx$$
But nothing further. I plugged it in a calculator and the result was $0$. I can see that the following relation holds:
$$f(-x) = -f(x)$$
For
$$ f: [0, 2\pi] \rightarrow \mathbb{R} \hspace{2cm} f(x) = \frac{x \cos x}{1 + \sin^2 x}$$
so that means that the function is an odd function. So if the interval $[0, 2\pi]$ is a symmetric interval for $f(x)$ then the result would be $0$.
I can see that the interval $[0, 2\pi]$ is symmetric for $\sin x$ and for $\cos x$, so it is not far fetched to believe it is symmetric for $\dfrac{\cos x}{1 + \sin^2 x}$, but wouldn't multiplying it with $x$ interfere with that symmetry? I don't see why $[0, 2\pi]$ is symmetric for the function
$$f(x) = \frac{x\cos x}{1 + \sin^2 x}$$
How come that $x$ doesn't ruin the symmetry?
 [/INST] $$I=\int_0^{2\pi} \frac{x \cos x}{2 - \cos^ 2 x} dx\tag 1$$
$$I=\int_0^{2\pi} \frac{(2\pi-x) \cos x}{2 - \cos^ 2 x} dx\tag 2$$
Adding (1) & (2) $$2I=\int_0^{2\pi} \frac{2\pi \cos x}{2 - \cos^ 2 x} dx$$
$$I=2\pi \int_0^{\pi} \frac{\cos x}{2-\cos^ 2 x} dx\tag 3$$
$$I=2\pi \int_0^{\pi} \frac{\cos (\pi-x)}{2-\cos^ 2(\pi- x)} dx$$
$$I=-2\pi \int_0^{\pi} \frac{\cos x}{2-\cos^ 2x} dx\tag 4$$
Adding (3) & (4), we get $$I=0$$
</s>