<s>[INST] Other way to evaluate $\int \frac{1}{\cos 2x+3}\ dx$? I am evaluating
$$\int \frac{1}{\cos 2x+3} dx \quad (1)$$

Using Weierstrass substitution:
$$ (1)=\int \frac{1}{\frac{1-v^2}{1+v^2}+3}\cdot \frac{2}{1+v^2}dv  =\int \frac{1}{v^2+2}dv \quad (2) $$
And then $\:v=\sqrt{2}w$
$$ (2) = \int \frac{1}{\left(\sqrt{2}w\right)^2+2}\sqrt{2} dw$$$$= \frac{1}{2} \int \frac{1}{\sqrt{2}\left(w^2+1\right)}dw$$$$ =  \frac{1}{2\sqrt{2}}\arctan \left(w\right) + C$$$$=  \frac{1}{2\sqrt{2}}\arctan \left(\frac{\tan \left(x\right)}{\sqrt{2}}\right)+C$$
Therefore,
$$\int \frac{1}{\cos 2x+3} dx = \frac{1}{2\sqrt{2}}\arctan \left(\frac{\tan \left(x\right)}{\sqrt{2}}\right)+C $$

That's a decent solution but I am wondering if there are any other simpler ways to solve this (besides Weierstass). Can you come up with one?
 [/INST] $$\cos(2x)=\cos (x+x) =\cos x \cos x-\sin x \sin x=\cos^2x-\sin^2x$$
$$I =\int \frac{1}{\cos 2x+3}dx=  \int \frac{\sec^2x}{\sec^2x(\cos^2x-\sin^2x+3)}dx = \int \frac{\sec^2x}{1-\tan^2x+3\sec^2x}dx $$  Substitute $t=\tan x$
so that $dt=\sec^2x dx$ 
$$I=\int \frac{1}{1-t^2+3(1+t^2)}dt=\int \frac{1}{4+2t^2} dt=\frac{1} {2\sqrt 2} \tan^{-1}\frac{\sqrt 2 t} {2}+c$$ Now substitute back $t=\tan x$
</s>