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?

Here's a easier way 
Please look my link why it's possible.
$I=2 \int ^{\pi}_0 \frac{1}{5-3\cos x}.dx$
After substitution, 
$I=2 \int ^{b\to \infty}_0 \frac{1}{4t^2+1}.dt$
Which gives, 
$I= \left|\tan^{-1}(4t)\right|^{b\to \infty}_0 $
From here it's pretty easy. :)
