<s>[INST] Progression from indefinite integral to definite integral - $\int_{0}^{2\pi}\frac{1}{5-3\cos x} dx$ I'm trying to evaluate the following integral:
$$\int_{0}^{2\pi}\frac{1}{5-3\cos x} dx$$
We can evaluate indefinite one first - $\int\frac{1}{5-3\cos x}dx = \frac{1}{2}\tan^{-1}(2\tan(\frac{x}{2})) + C$. The problem is that $\frac{1}{2}\tan^{-1}(2\tan(\frac{2\pi}{2}))-\frac{1}{2}\tan^{-1}(2\tan(\frac{0}{2}))=0$ but there's a hint on this excercise that the value of this definite integral is greater than $0$. So, what went wrong? What's the trap I've fallen into during evaluation of this integral? 
 [/INST] the graph of $\cos x$ is symmetric about $x = \pi,$  therefore $$\int_0^{2\pi}\frac{dx}{5-3\cos x} = 2 \int_0^{\pi}\frac{dx}{5-3\cos x}  = \tan^{-1}\left(2\tan(x/2)\right)\Big|_0^{\pi} =\frac{\pi}2.$$
</s>