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?
$$\int \frac{1}{\cos2x+3}dx=\int \frac{1}{\frac{1-\tan^2x}{1+\tan^2x}+3}dx$$ $$=\int \frac{1+\tan^2x}{2\tan^2x+4}dx$$ $$=\frac12\int \frac{\sec^2x\ dx}{\tan^2x+2}$$ $$=\frac12\int \frac{d(\tan x)}{(\tan x)^2+(\sqrt2)^2}$$ $$=\frac12\frac{1}{\sqrt2}\tan^{-1}\left(\frac{\tan x}{\sqrt2}\right)+C$$ $$=\bbox[15px,#ffd,border:1px solid green]{\frac{1}{2\sqrt2}\tan^{-1}\left(\frac{\tan x}{\sqrt2}\right)+C}$$