Error in solving $\int \sqrt{1 + e^x} dx$ . I want to solve this integral for $1 + e^x \ge 0$
$$\int \sqrt{1 + e^x} dx$$ 
I start by parts $$\int \sqrt{1 + e^x} dx = x\sqrt{1 + e^x} - \int x \frac{e^x}{2\sqrt{1 + e^x}} dx $$
Substitute $\sqrt{1 + e^x} = t \implies dt = \frac{e^x}{2\sqrt{1 + e^x}} dx$
So I remain with $$x\sqrt{1 + e^x} - \int \ln((t-1)(t+1)) dt =  x\sqrt{1 + e^x}  + 2t +(-t+1)\ln(t-1)+ (-t+1)\ln(t+1) $$
that is
$$(x+2)\sqrt{1 + e^x} + (-\sqrt{1 + e^x} + 1) \ln(+\sqrt{1 + e^x} - 1) + (-\sqrt{1 + e^x} + 1) \ln(+\sqrt{1 + e^x} + 1) + C  $$
But the solution should be $$2\sqrt{1 + e^x} + \ln(+\sqrt{1 + e^x} - 1) - \ln(+\sqrt{1 + e^x} + 1) $$
Where is the mistake hidden?
 A: with $$t=\sqrt{1+e^x}$$ we get $$x=\ln(t^2-1)$$ and from here $$dx=\frac{2t}{t^2-1}dt$$ and our integral will be $$\int\frac{2t^2}{t^2-1}dt$$
A: 
Where is the mistake hidden?

In the following part : 

So I remain with $$x\sqrt{1 + e^x} - \int \ln((t-1)(t+1)) dt =  x\sqrt{1 + e^x}  + 2t +(-t+1)\ln(t-1)+ (-t+1)\ln(t+1) $$

It should be the following (a sign mistake) : 
 $$x\sqrt{1 + e^x} - \int \ln((t-1)(t+1)) dt =  x\sqrt{1 + e^x}  + 2t +(-t+1)\ln(t-1)+ (-t\color{red}{-}1)\ln(t+1)\color{red}{+C} $$
that is
$$x\sqrt{1 + e^x}  + 2\sqrt{1 + e^x} +(-\sqrt{1 + e^x}+1)\ln(\sqrt{1 + e^x}-1)$$$$+ (-\sqrt{1 + e^x}-1)\ln(\sqrt{1 + e^x}+1)+C$$
$$=(x+2)\sqrt{1+e^x}-\sqrt{1+e^x}\ (\ln (\sqrt{1+e^x}-1)+\ln(\sqrt{1+e^x}+1))+\ln(\sqrt{1+e^x}-1)$$$$-\ln(\sqrt{1+e^x}+1)+C$$
$$=2\sqrt{1+e^x}+\ln(\sqrt{1+e^x}-1)-\ln(\sqrt{1+e^x}+1)+C$$
A: Let $x = \ln t$.  Then $dx = dt/t$ and we have
$$\int \sqrt{1 + e^x} \, dx = \int \frac{\sqrt{1 + t}}t \, dt.$$
Now let $u = t + 1$.  Then $du = dt$ and we have
$$\int \frac{\sqrt{1+t}}t \, dt = \int\frac{\sqrt{u}}{u-1} \, du.$$
Now let $v = \sqrt{u}$.  Then $u = v^2$ and so $du = 2v \, dv$, and we have
$$\int\frac{\sqrt{u}}{u-1} \, du = 2\int\frac{v^2}{v^2 - 1} \, dv.$$
Consider then:
\begin{align*}
  2\int\frac{v^2}{v^2 - 1} \, dv
    &= 2\int\frac{v^2 \color{red}{-1+1}}{v^2 - 1} \, dv \\[0.3cm]
    &= 2\int\frac{v^2-1}{v^2-1} \, dv + 2\int\frac{dv}{v^2-1}\\[0.3cm]
    &= 2v + \ln(v-1) - \ln(v+1) + C
\end{align*}
Back substitute:
$$
  2v + \ln(v-1) - \ln(v+1) + C = 
  2\sqrt{u} + \ln(\sqrt{u}-1) - \ln(\sqrt{u}+1) + C
$$
Back substitute:
$$
  2\sqrt{u} + \ln(\sqrt{u}-1) - \ln(\sqrt{u}+1) + C =
  2\sqrt{t+1} + \ln(\sqrt{t+1}-1) - \ln(\sqrt{t+1}+1) + C
$$
Back substitute $t = e^x$ to finally get:
$$
  \int \sqrt{1+e^x} \, dx =
  2\sqrt{e^x+1} + \ln(\sqrt{e^x+1}-1) - \ln(\sqrt{e^x+1}+1) + C
$$
A: HINT:
Let $\sqrt{1+e^x}=y\implies e^x=y^2-1\implies e^x\ dx=2y\ dy$
$$\int\sqrt{1+e^x}\ dx=\int\dfrac{2y^2}{y^2-1}dy$$
Now $y^2=y^2-1+1$
$$\dfrac{2y^2}{y^2-1}=2+\dfrac{y+1-(y-1)}{y^2-1}=2+\dfrac1{y-1}-\dfrac1{y+1}$$
