While solving the integral $$\int_0^{\pi} \frac{1}{a^2\cos^2x + b^2\sin^2x} dx $$ I found out that it can be solved if we divide the Numerator and Denominator by " $\cos^2 x$ " , which will result in $$\int_0^{\pi} \frac{\sec^2x }{a^2+ b^2\tan^2x } dx $$ after which I can substitute $t=\tan x$ , therefore $dt = \sec^2x*dx$ .
My doubt is regarding the limits of the integral that needs to be changed after the substitution. If I substitute , $ x=0$ , we get $t=0$ and for $x=\pi$ we get $t=0$.
I am stuck with this step.
Split the integral as in the point $\frac{\pi}{2}$