Integrating the following $\int \sqrt{\tan x+1}\,dx$ 
Question: Integrate the following, $$\int\sqrt{\tan x+1}\;dx.$$

Wolfram Alpha returns a non-elementary answer. Can someone please spot the mistake I have made here:
First consider this integral: 
$$\int \frac{1}{(x+1)\sqrt{x+3}} \, dx = -\sqrt{2}\tanh^{-1}\frac{\sqrt{x+3}}{\sqrt{2}} + c$$
Wolfram Alpha confirms that result. 
Then, we have
$$I=\int \sqrt{\tan x+1} \, dx, \quad \tan x=u+2,
\quad dx=\frac{du}{\sec^{2}x}=\frac{du}{(u+2)^{2}-1}=\frac{dx}{(u+3)(u+1)}$$
So this transforms the integral to the first integral on this post, which we can evaluate. Then after evaluation and resubstitution I get:
$$I=-\sqrt{2}\tanh^{-1}\frac{\sqrt{\tan x+1}}{\sqrt{2}}+c$$
However differentiating this with Wolfram Alpha gives me a messy trigonometric expression which doesn't seem to be equal (I tested some values in both expressions and get different answers). I also estimated the area under the integral between some values and also obtained different answers using the closed form. Any ideas why?
EDIT: I used the wrong identity. Nevertheless, we can still use this method to integrate sqrt(tanhx integrals). E.g:
$$I=\int \sqrt{\tanh x+1} \, dx, \tanh x=u+2,\quad 
-dx = \frac{du}{\operatorname{sech}^2 x} = \frac{du}{(u+2)^2-1} = \frac{dx}{(u+3)(u+1)}$$
To obtain:
 $\int \sqrt{\tanh x+1} \, dx = I=\sqrt{2}\tanh^{-1} \dfrac{\sqrt{\tanh x+1}}{\sqrt{2}}+c$

Let $I=\int \sqrt{\tan x+1} d x$ and $u=\sqrt{\tan x+1}$.
\begin{aligned}
I &=\int \frac{2 u^{2} d u}{\left(u^{2}-1\right)^{2}+1} \\
&=2 \int \frac{u^{2}}{u^{4}-2 u^{2}+2} d u \\
&=2 \int \frac{d u}{u^{2}+\frac{2}{u^{2}}-2} \\
&= 2 \int \frac{\left(1+\frac{\sqrt{2}}{u}\right)+\left(1-\frac{\sqrt{2}}{u}\right)}{u^{2}+\frac{2}{u^{2}}-2} d u\\
&=\int \underbrace{\frac{1+\frac{\sqrt{2}}{u}}{u^{2}+\frac{2}{u^{2}}-2} d u}_{I}+\underbrace{\int \frac{1-\frac{\sqrt{2}}{u}}{u^{2}+\frac{2}{u^{2}}-2} d u}_{J}\end{aligned}
$$I=\int \frac{d\left(u-\frac{\sqrt{2}}{u}\right)}{\left(u-\frac{\sqrt{2}}{u}\right)^{2}+2(\sqrt{2}-1)}=\frac{1}{\sqrt{2(\sqrt{2}-1)}} \tan ^{-1}\left(\frac{u-\frac{\sqrt{2}}{u}}{\sqrt{2 (\sqrt{2}-1)}}\right)$$
$$J=\int \frac{d\left(u+\frac{\sqrt{2}}{u}\right)}{\left(u+\frac{\sqrt{2}}{u}\right)^{2}-2(\sqrt{2}+1)}=\frac{1}{2 \sqrt{2(\sqrt{2}+1)}} \ln \left|\frac{u+\frac{\sqrt{2}}{u}-\sqrt{2 (\sqrt{2}+1)}}{\left.u+\frac{\sqrt{2}}{u}+\sqrt{2(\sqrt{2}+1}\right)}\right|$$
Now we can conclude that
$$I=\frac{1}{\sqrt{2(\sqrt{2}-1})} \tan ^{-1}\left(\frac{\tan x+1-\sqrt{2}}{\sqrt{2(\sqrt{2}-1)(\tan x+1})}\right)+ \frac{1}{2\sqrt{2(\sqrt{2}+1)}} \ln \left| \frac{\tan x+1-\sqrt{2(\sqrt{2}+1)(\tan x+1)}+\sqrt2}{\tan x+1+\sqrt{2(\sqrt{2}+1)(\tan x+1)}+\sqrt2}\right|+C$$
