TITLE: Integrating $\frac{\sec^2\theta}{1+\tan^2\theta \cos^2(2\alpha)}$ with respect to $\theta$
QUESTION [6 upvotes]: I'm having some issues with the following integral
$$\int_{\frac{-\pi}{2}}^\frac{\pi}{2}\frac{\sec^2\theta}{1+\tan^2\theta \cos^2(2\alpha)}d\theta$$
My attempt is as follows, substitute $u=\tan\theta$(but this gives infinite bounds)
So $d\theta=\frac{1}{\sec^2\theta}du$, substituting both $\theta$ and $d\theta$ gives
$$\int_{\tan(\frac{-\pi}{2})}^{\tan(\frac{\pi}{2})}\frac{1}{1+u^2 \cos^2(2\alpha)}du$$
This time substituting $v=u\cos(2\alpha)$, $du=\frac{1}{\cos(2\alpha)}dv$, which gives
$$\int_{\tan(\frac{-\pi}{2})\cos(2\alpha)}^{\tan(\frac{\pi}{2})\cos(2\alpha)}\frac{1}{1+v^2}dv=\bigg{[} \arctan (v)\bigg{]}_{\tan(\frac{-\pi}{2})\cos(2\alpha)}^{\tan(\frac{\pi}{2})\cos(2\alpha)}$$
I don't think I've made any mistakes in my substitutions, but I'm still wondering how to get past the infinite bounds, since $\tan(\pi/2)=\infty$ and $\tan(-\pi/2)=-\infty$

REPLY [2 votes]: Notice, 
$\color{blue}{\int_{-a}^{a}f(x) dx=2\int_{0}^{a}f(x) dx\iff f(-x)=f(x)}$, Now we have 
$$\int_{\frac{-\pi}{2}}^{\frac{\pi}{2}}\frac{\sec^2\theta d\theta}{1+\tan^2\theta\cos^22\alpha}$$
$$=2\int_{0}^{\frac{\pi}{2}}\frac{\sec^2\theta d\theta}{1+\tan^2\theta\cos^22\alpha}$$ Now, let $\tan \theta=t \implies \sec^2\theta d\theta=dt$, & 
$t\to 0 \ as \ \theta\to 0$,  $t\to \infty \ as \ \displaystyle \theta\to \frac{\pi}{2}$ ($\alpha$ being constant)
$$=2\int_{0}^{\infty}\frac{dt}{1+t^2\cos^22\alpha}$$ 
$$=\frac{2}{\cos^22\alpha}\int_{0}^{\infty}\frac{dt}{\sec^22\alpha+t^2}$$ 
$$=\frac{2}{\cos^22\alpha}\int_{0}^{\infty}\frac{dt}{(\sec 2\alpha)^2+t^2}$$ 
$$=\frac{2}{\cos^22\alpha}\frac{1}{\sec2\alpha}\left[\tan^{-1}\left(\frac{t}{\sec2\alpha}\right)\right]_{0}^{\infty}$$ 
$$=\frac{2}{\cos 2\alpha}\left[\tan^{-1}\left(\infty \right)-\tan^{-1}(0)\right]$$ $$=\frac{2}{\cos 2\alpha}\left[\frac{\pi}{2}\right]$$ $$=\color{blue}{\frac{\pi}{\cos 2\alpha}}$$