# Trig integral simplification [closed]

Can someone explain to me how the integral was simplified to cos theta in the second line? It doesn't make any sense to me. Thanks

The key identity is that $$\sec^2-1=\tan^2$$; this is a variation on the Pythagorean identity $$\sin^2+\cos^2=1$$. Divide by $$\cos^2$$, and we get $$\frac{\sin^2\theta}{\cos^2\theta}+\frac{\cos^2\theta}{\cos^2\theta}=\frac{1}{\cos^2\theta}$$ $$\tan^2\theta+1=\sec^2\theta$$ $$\tan^2\theta=\sec^2\theta-1$$
So then $$\sqrt{4(\sec^2\theta-1)}=\sqrt{4\tan^2\theta}=2\tan\theta$$ (on a region where $$\tan$$ is positive) and $$\frac{2\sec\theta\tan\theta}{4\sec^2\theta\cdot 2\tan\theta}=\frac{2}{8\sec\theta}=\frac14\cos\theta$$.
The basic ingredient is$$\sec^2(\theta)-1=\tan^2(\theta).$$The rest follows easily.