Split an integral I know that $\int \frac{x}{\sqrt{x^2+1}}dx = \sqrt{x^2+1} + C$ and $\int \frac{1}{\sqrt{x^2+4x+5}}dx = \ln(x+2+\sqrt{x^2+4x+5})+C$
Now I'm trying to calc $\int \frac{x+1}{\sqrt{x^2+4x+5}}dx$ my first step is to divide it to $\int \frac{x}{\sqrt{(x+2)^2+1}}dx + \int\frac{1}{\sqrt{(x+2)^2+1}}dx  = \sqrt{x^2+4x+5} + \ln(x+2+\sqrt{x^2+4x+5}$ However the correct answer should be $\sqrt{x^2+4x+5} - \ln(x+2+\sqrt{x^2+4x+5}$ (note the $-$). Wher does it comes from?

$$
\begin{align}
\int\frac{x+1}{\sqrt{(x+2)^2+1}}\,dx & = \int\frac{x+2}{\sqrt{(x+2)^2+1}}\,dx + \int\frac{-1}{\sqrt{(x+2)^2+1}}\,dx \\[12pt]
& = \int \frac{1}{\sqrt{u}}\,\left( \frac 1 2 \,du \right) + \int\frac{-1}{\sqrt{(x+2)^2+1}}\,dx.
\end{align}
$$
