A mistake on computing $\int \frac{dx}{\sqrt{x+1}+1}$ I have to find $\int \frac{dx}{\sqrt{x+1}+1}$. This was my attempt, which is wrong and I cannot find where exactly is the mistake.
First I write $\frac{1}{\sqrt{x+1}+1}=\frac{\sqrt{x+1}-1}{x}=\frac{\sqrt{x+1}}{x}-\frac{1}{x}$, therefore $\int \frac{dx}{\sqrt{x+1}+1}=\int \frac{\sqrt{x+1}}{x}dx-\log\left (x\right )$, so I only have to deal with $\int \frac{\sqrt{x+1}}{x}dx$.
Setting $u=\sqrt{x+1}$, we obtain $du=\frac{1}{2\sqrt{x+1}}dx$, therefore $dx=2udu$ and $x=u^2-1$, so
$\int\frac{\sqrt{x+1}}{x}dx=\int\frac{2u^2}{u^2-1}du=\int \left(2+\frac{2}{u^2-1}\right)du=2\sqrt{x+1}+\int \left(\frac{1}{u-1}-\frac{1}{u+1}\right)du=$
$=2\sqrt{x+1}+\log \left (\sqrt{x+1}-1\right )-\log \left (\sqrt{x+1}+1\right )=2\sqrt{x+1}+\log\left ( \frac{\sqrt{x+1}-1}{\sqrt{x+1}+1} \right )$
But then $\int \frac{dx}{\sqrt{x+1}+1}=2\sqrt{x+1}+\log\left ( \frac{\sqrt{x+1}-1}{\sqrt{x+1}+1} \right )-\log\left (x\right )=2\sqrt{x+1}+\log\left ( \frac{x+2-2\sqrt{x+1}}{x^2} \right )$, which is not what I am supposed to obtain. The actual answer is $2\sqrt{x+1}-2\log\left ( 1+\sqrt{x+1} \right )$.
Where is my mistake?
(I already know a correct way to solve it, I just want to know where I am committing a mistake).

You're fine.  
$$\log\left(\frac{\sqrt{x+1}-1}{\sqrt{x+1}+1}\right) -\log x $$
$$= \log\left(\frac{\sqrt{x+1}-1}{\sqrt{x+1}+1}\frac{\sqrt{x+1}+1}{\sqrt{x+1}+1}\right) -\log x $$
$$=\log\left( \frac{x}{ (\sqrt{x+1}+1)^2}\right) -\log x$$
$$=\log x -2\log(\sqrt{x+1}+1)- \log x$$
$$=-2\log(\sqrt{x+1}+1).$$
