<s>[INST] Find $\int\limits_{0}^{2\pi} \frac{1}{5-3\cos(x)} \,\,dx$ I have to find $$\int_0^{2\pi} \frac{1}{5-3\cos(x)} \,\,dx$$
I tried to do it by substitution $t = \tan(\frac{x}{2})$
Then we have that $$\cos(x) = \frac{1-t^2}{1+t^2} \quad dx = \frac{2\,dt}{1+t^2}$$ but then also limits of integration are changing so we have
$$\int\limits_{t(0)}^{t(2\pi)} \frac{1}{5 - \frac{1-t^2}{1+t^2}} \cdot \frac{2dt}{1+t^2} = \int\limits_0^0 \frac{1}{5 - \frac{1-t^2}{1+t^2}} \cdot \frac{2\,dt}{1+t^2} = 0$$
I figured out that it is not correct because $\tan(\frac{\pi}{2})$ is not defined and $t(\pi) = \tan(\frac{\pi}{2})$ and $\pi \in [0, 2\pi]$. How can I "repair" that and do it right?
 [/INST] This property will help you to simplify:
$$
\int_0^{2a}f(x)\,dx = \int_0^{a}f(x)\,dx+\int_0^{a}f(2a-x)\,dx
$$
Use it with $a=\pi$.
(This is the 14th property on this list)
</s>