<s>[INST] Calculate $\int\frac{1}{(x+1)\sqrt{1+x^2}} dx $ How can I calculate the following integral : 
$$\int\frac{1}{(x+1)\sqrt{1+x^2}} dx $$
I try to write the integral like :
$$\int\frac{1+x-x}{(x+1)\sqrt{1+x^2}}=\int\frac{1}{\sqrt{1+x^2}}-\int\frac{x}{(x+1)\sqrt{1+x^2}}=\int\frac{1}{\sqrt{1+x^2}}-\int\frac{(\sqrt{x^2+1})'}{(x+1)}$$
but still nothing .
thanks :) 
 [/INST] This is how I would go, term $\sqrt{1+x^2}$ makes me go for $x=\sinh(u)$, which will convert to $\cosh(u)$ and cancel with the one brought by $du$.
Then I convert to exponential form ($t=e^u$) to get a rational fraction.
$\begin{align}\require{cancel}\int\frac {dx}{(x+1)\sqrt{1+x^2}}
&=\int\frac {\cancel{\cosh(u)}du}{(\sinh(u)+1)\cancel{\sqrt{1+\sinh(u)^2}}}
=\int\frac {du}{\sinh(u)+1}\\\\
&=\int\frac {dt/t}{(t-1/t)/2+1}
=\int\frac {2\,dt}{t^2+2t-1}
=\int\frac {2\,dt}{(t+1)^2-2}\\\\
&=C-\sqrt{2}\tanh^{-1}\Big(\tfrac{t+1}{\sqrt{2}}\Big)\end{align}$
The substitutions proposed appear quite naturally, though the final result (especially after back substitution) is not as appealing as the one proposed by Quanto...
</s>