<s>[INST] How to calculate $\int\frac{1}{x + 1 + \sqrt{x^2 + 4x + 5}}\ dx$? How to calculate $$\int\frac{1}{x + 1 + \sqrt{x^2 + 4x + 5}}dx?$$ I really don't know how to attack this integral. I tried $u=x^2 + 4x + 5$ but failed miserably. Help please.
 [/INST] \begin{align}
\int\frac1{x+1+\sqrt{x^2+4x+5}}\ dx&=\int\frac1{x+1+\sqrt{(x+2)^2+1}}\ dx\\
&\stackrel{\color{red}{[1]}}=\int\frac{\sec^2y}{\sec y+\tan y-1}\ dy\\
&\stackrel{\color{red}{[2]}}=\int\frac{\sec y}{\sin y-\cos y+1}\ dy\\
&\stackrel{\color{red}{[3]}}=\int\frac{1+t^2}{t(1+t)(1-t^2)}\ dt\\
&\stackrel{\color{red}{[4]}}=\int\left[\frac1{t}-\frac1{2(t+1)}-\frac1{2(t-1)}-\frac{1}{(t+1)^2}\right]\ dt.
\end{align}
The rest is yours.

Notes :
$\color{red}{[1]}\;\;\;$Put $x+2=\tan y\;\Rightarrow\;dx=\sec^2y\ dy$.
$\color{red}{[2]}\;\;\;$Multiply by $\dfrac{\cos y}{\cos y}$.
$\color{red}{[3]}\;\;\;$Use Weierstrass substitution, $\tan\frac{y}{2}=t$.
$\color{red}{[4]}\;\;\;$Use partial fractions decomposition.
</s>