<s>[INST] Integrate $f(x)=\frac{1+\sqrt{x+1}}{1-\sqrt{x+1}}$, for $x>-1$ Substituting $t^2=x+1$ I get $2t \ dt=dx.$ So therefore $$\int\frac{2t(1+t)}{1-t}dt=-2\int\frac{t^2+t}{t-1}dt.$$
Dividing the polynomials I get $$-2\int t+2+\frac{2}{t-1}dt=-2\int t \ dt-4\int1 \ dt-4\int\frac{1}{t-1}dt.$$
First integral equals $-t^2+C_1,$ second is $4t+C_2$ and the third is $4\ln{|t-1|+C_3},$ thus $$F(x)=-(x+1)-4\sqrt{x+1}-4\ln{|\sqrt{x+1}-1|+C}.$$
The answer is correct, except for the $-1$ in the beginning, it should not be there but I can't see why it is.
 [/INST] Note that
$$
\frac{1+\sqrt{x+1}}{1-\sqrt{x+1}}
=
\frac{1+\sqrt{x+1}}{1-\sqrt{x+1}}\cdot \frac{1+\sqrt{x+1}}{1+\sqrt{x+1}}
=
\frac{1+2\sqrt{x+1}+(x+1)}{1-(x+1)}
\\
=
-\frac{2+2\sqrt{x+1}+ x}{x}
=
-\frac{2}{x}
-\frac{2\sqrt{x+1}}{x}
-1
$$
</s>