Solve the integral $$\int_0^{2\pi}\frac{dx}{5-2\operatorname{cos}x}$$
My work:
Let $\operatorname{tan}\frac{x}{2}=t$ $\implies$ our integral becomes $$\int_0^0\frac{2\:\:dt}{(1+t^2)\left(5-2\frac{1-t^2}{1+t^2}\right)}$$ which is obviously $=0$
But how can this happen since the integrand is positive and consequently the integral of this function cannot be equal to $0?$