Why does fundamental theorem of calculus not work for this integral $\int_0^{2\pi}\frac{dx}{(3+\cos x)(2+\cos x)}$? $$\int\frac{dx}{(3+\cos x)(2+\cos x)}=  \frac{2\arctan(\frac{\tan(\frac x2)}{\sqrt3})}{\sqrt3} - \frac{\arctan(\frac{\tan(\frac x2)}{\sqrt2})}{\sqrt2} + C $$
This is the antiderivative . By the FTC :
$$\int_a^b f(x) = F(b) - F(a)$$
where $F(x)$ is a primitve function.
$$\left. \int_0^{2\pi}\frac{dx}{(3+\cos x)(2+\cos x)}= \frac{2\arctan(\frac{\tan(\frac x2)}{\sqrt3})}{\sqrt3} - \frac{\arctan(\frac{\tan(\frac x2)}{\sqrt2})}{\sqrt2} \right|_0^{2\pi}=0$$
$\frac{dx}{(3+\cos x)(2+\cos x)}$ is positive on$[0,2\pi]$ hence the result above is wrong.
Correct result is:
$$\int_0^{2\pi}\frac{dx}{(3+\cos x)(2+\cos x)}=\Bigl(\frac2{\sqrt3}-\frac1{\sqrt2}\Bigr) \pi$$
Why am I not getting the correct result ?

Let $f(x)=\frac{1}{(3+\cos x)(2+\cos x)}$
and $F(x)$ be its anti-derivative. 
Pertaining to this very question,what if we tried to make a substitution $\cos x=u$.
Since we would have to change the limits accordingly we see that the limit comes out to be
$\displaystyle\int_1^1 g(u) \mathrm du=0$, where the function $g$ is obtained after the substitution.
Is the problem here that $f(x)$  is not invective or is it that the $f(x)$ anti-derivative 
is not differentiable $ \exists x \in [0,2\pi]$ 
