Let's say we want to evaluate $$ \int_0^{2\pi} \frac{1}{a^2\cos^2x+b^2\sin^2x}dx$$
With substitution, one obtains $$ \frac{1}{ab} \arctan\left(\frac ba \tan x\right) $$
as antiderivate. For more details on how to do this, see this question.
Now my question is, why do I receive $0$ if I insert $0$ and $2\pi$ as integration bounds ? This obviously can't be true since the integrand is always positive.
What do I oversee ?