Integrating $\frac{\sec^2\theta}{1+\tan^2\theta \cos^2(2\alpha)}$ with respect to $\theta$ 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$
 A: The "proper" way to deal with infinite bounds is to write down the integral as :
$$\lim_{\beta \to -\infty} \int_{\beta}^0 \frac{1}{1+u^2 \cos^2(2\alpha)} \, \mathrm{d}u + \lim_{\gamma \to \infty} \int_0^{\gamma} \frac{1}{1+u^2 \cos^2(2\alpha)} \, \mathrm{d}u$$
and then work with limits throughout. Most of the time, we circumvent the lengthy limit notation and write down the improper integral the way you have. This should lead you to $$\frac{\pi}{2\sqrt{\cos^2 2\alpha}} + \frac{\pi}{2\sqrt{\cos^2 2\alpha}} = \frac{\pi}{\sqrt{\cos^2 2\alpha}}$$
A: You were very close to the correct answer, but dropped the term $\frac{1}{\cos 2\alpha}$ in the last substitution.  As @zainpatel suggested, we need to be careful with the integration limits here.  
In fact, the last integral in the posted question, corrected for the omitted multiplicative term $\frac{1}{\cos 2\alpha}$, and taking care of the sign of $\cos 2\alpha$, can be evaluated as follows:
$$\begin{align}
\frac{1}{\cos 2\alpha}\int_{-\text{sgn}(\cos 2\alpha)\infty}^{\text{sgn}(\cos 2\alpha)\infty}\frac{1}{1+v^2}dv&=\left.\left(\frac{1}{\cos 2\alpha}\arctan(v)\right)\right|_{-\text{sgn}(\cos 2\alpha)\infty}^{\text{sgn}(\cos 2\alpha)\infty}\\\\
&=\pi\frac{\text{sgn}(\cos 2\alpha)}{\cos 2\alpha}\\\\
&=\frac{\pi}{|\cos 2\alpha|}
\end{align}$$
A: 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}}$$  
