How to integrate $$\int \sqrt{1+\tan(2x)}dx$$
I am trying this question using the formula of $\tan(2x)$. Now, $\tan(2x)=\frac{2\tan{x}}{1-\tan^{2}x}$.
So, if I put this formula of $\tan(2x)$ on the above integral, then the integral will be $$\int \sqrt{\frac{1-\tan^{2}x+2\tan(x)}{1-\tan^{2}x}}dx$$.
Now I am thinking of writing the numerator as $(1+\tan{x})^{2}-2\tan^{2}x$.
So, the above integral will become $$\int \sqrt{\frac{(1+\tan{x})^{2}-2\tan^{2}x}{1-\tan^{2}x}}dx$$.
Now after this step we can write the integral as $$\int \sqrt{\frac{1+\tan{x}}{1-\tan{x}}-\frac{2\tan^{2}x}{1-\tan^{2}x}}dx$$.
But after this step, I can't approach further. So, please help me out.
If you use $x=\tan^{-1}(t)$, the integral becomes $$\int \frac{\sqrt{1-\frac{2 t}{t^2-1}}}{t^2+1}\,dt$$ Now, for one of the roots, chose $$ \sqrt{1-\frac{2 t}{t^2-1}}=u\implies t= \frac{\sqrt{u^4-2 u^2+2}-1}{u^2-1}$$ Assume $u>0$ to make $$I=\int \frac{u^2}{u^4-2 u^2+2}\,du$$
Use now $$u^4-2 u^2+2=\big(u^2 -(1-i)\big)\big(u^2 -(1+i)\big)$$ Partial fraction decomposition $\cdots$
Edit
$2$ is a $\color{red}{\text{red herring}}$ !
Consider $$I=\int\sqrt{1+\tan(ax)}\,dx$$ $$\sqrt{1+\tan(ax)}=u \implies x=-\frac{1}{a}\tan ^{-1}\left(1-u^2\right)\implies$$ $$ dx=\frac{2 u}{a \left(\left(1-u^2\right)^2+1\right)}\,du$$ $$I=\frac 2a \int \frac {u^2}{u^4-2 u^2+2 } \,du$$
Make it more general $$J=\int (1+\tan (a x))^{\frac{1}{n}}\,dx$$ $$J=\frac n a \int \frac {u^n}{u^{2 n}-2 u^n+2 }\,du=\frac n a \int \frac {u^n}{\big(u^n -(1-i)\big)\big(u^n -(1+i)\big) }\,du$$
$$ J=\frac n {2a} \int \Bigg(\frac{1+i}{u^n-(1-i)}+\frac{1-i}{u^n-(1+i)} \Bigg)\,du$$
$$K=\int \frac {du}{u^n+\alpha}=\frac{u }{\alpha }\,\, _2F_1\left(1,\frac{1}{n};\frac{n+1}{n};-\frac{u^n}{\alpha }\right)$$