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?
 A: $$\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}$$
A: $\newcommand{\bbx}[1]{\,\bbox[15px,border:1px groove navy]{\displaystyle{#1}}\,}
 \newcommand{\braces}[1]{\left\lbrace\,{#1}\,\right\rbrace}
 \newcommand{\bracks}[1]{\left\lbrack\,{#1}\,\right\rbrack}
 \newcommand{\dd}{\mathrm{d}}
 \newcommand{\ds}[1]{\displaystyle{#1}}
 \newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,}
 \newcommand{\ic}{\mathrm{i}}
 \newcommand{\mc}[1]{\mathcal{#1}}
 \newcommand{\mrm}[1]{\mathrm{#1}}
 \newcommand{\pars}[1]{\left(\,{#1}\,\right)}
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\root}[2][]{\,\sqrt[#1]{\,{#2}\,}\,}
 \newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}}
 \newcommand{\verts}[1]{\left\vert\,{#1}\,\right\vert}$
\begin{align}
\int{\dd x \over \cos\pars{2x} + 3} & =
\int{\dd x \over \bracks{2\cos^{2}\pars{x} - 1} + 3} =
{1 \over 2}\int{\sec^{2}\pars{x}\,\dd x \over
1 + \sec^{2}\pars{x}}
\\[5mm] & =
{1 \over 2}\int{\sec^{2}\pars{x}\,\dd x \over
\tan^{2}\pars{x} + 2} =
{1 \over 2}\,{1 \over 2}\,\root{2}\int{\bracks{\sec^{2}\pars{x}/\root{2}}
\,\dd x \over
\bracks{\tan\pars{x}/\root{2}}^{2} + 1}
\\[5mm] & =
\bbx{{\root{2} \over 4}\arctan\pars{{\root{2} \over 2}\,\tan\pars{x}} +
\mbox{a constant}}
\end{align}
A: HINT:
Using Euler's formula, we have $\cos(2x)=\frac12(e^{i2x}+e^{-i2x})$.
Now make the substitution $z=e^{i2x}$ with $dx=\frac1{i2z}\,dz$
A: $$\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$
A: Long way but doable
$$I=\int \frac{dx}{\cos (2x)+3}$$
Let
$$\cos(2x)=t \implies x=\frac{1}{2} \cos ^{-1}(t)\implies dx=-\frac{1}{2 \sqrt{1-t^2}}$$
$$I=-\frac{1}{2}\int \frac{dx}{(t+3) \sqrt{1-t^2}}=-\frac{1}{2}\int \frac{\sqrt{1-t^2}}{(t+3) (1-t^2)}\,dt$$
$$\frac{1}{(t+3) (1-t^2)}=-\frac{1}{8 (t+1)}+\frac{1}{16 (t+3)}+\frac{1}{16 (t-1)}$$ and we face three integrals
$$J_a=\int \frac {\sqrt{1-t^2} }{t+a}$$
$$J_a=-\sqrt{1-a^2} \log \left(\sqrt{1-a^2} \sqrt{1-t^2}+a t+1\right)+\sqrt{1-a^2} \log (a+t)+a   \sin ^{-1}(t)+\sqrt{1-t^2}$$
This leads to
$$I=\frac{i \left(\log (t+3)-\log \left(2 i \sqrt{2-2 t^2}+3 t+1\right)\right)}{4 \sqrt{2}}=-\frac{i}{4 \sqrt{2}}\log \left(1+i\frac{2 \sqrt{2} \sqrt{1-t^2}}{t+3}\right)$$
