Integrate $f(x)=\sqrt{x^2+2x+3}.$ Completing the square and letting $t=x+1$, I obtain $$\int\sqrt{(x+1)^2+2} \ dx=\int\sqrt{t^2+2}\ dt.$$
Letting $u=t+\sqrt{t^2+2},$ I get 
\begin{array}{lcl}
u-t & = & \sqrt{t^2+2} \\
u^2-2ut+t^2 & = & t^2+2 \\
t & = & \frac{u^2-2}{2u} \\
dt &=&  \frac{u^2+2}{2u^2}du 
\end{array}
Thus the integral becomes 
$$F(x)=\int \left(u-\frac{u^2-2}{2u}\right)\left(\frac{u^2+2}{2u^2}\right) \ du = \int \left(\frac{u^2+2}{2u}\right)\left(\frac{u^2+2}{2u^2}\right) \ du =\int\frac{u^4+4u^2+4}{4u^3} \ du.$$
This integrand is nicely divided into
\begin{array}{lcl}
F(x) & = & \frac{1}{4}\int u \ du+\int \frac{1}{u} \ du+\int \frac{1}{u^3}=\frac{u^2}{8}+\ln{|u|}-\frac{1}{2u^2}+C \\
& = &  \frac{(t+\sqrt{t^2+2})^2}{8}+\ln{|t+\sqrt{t^2+2}|}-\frac{1}{2(t+\sqrt{t^2+2})^2}+C \\
\end{array}
And finally in terms of $x$:
$$F(x)=\frac{(x+1+\sqrt{x^2+2x+3})^2}{8}+\ln{|x+1+\sqrt{x^2+2x+3}|}-\frac{1}{2(x+1+\sqrt{x^2+2x+3})^2}+C.$$
The answer in the book is:
$$F(x)=\frac{1}{2}\left((x+1)\sqrt{x^2+2x+3}+2\ln{|x+1+\sqrt{x^2+2x+3}}|\right)+C.$$
Can anyone help me identify where I missed what?

Here is how I would work it.
$t = \sqrt 2 \tan \theta\\
dt = \sqrt 2 \sec^2 \theta$
$\int 2\sec^3 \theta\\
\sec\theta\tan\theta + \ln [\sec\theta+\tan\theta]+C\\
\frac {1}{2} t\sqrt {t^2 + 2} + \ln \frac 12 (t+\sqrt{t^2 + 2}+ C\\
\frac {1}{2} (x+1)\sqrt {x^2 + 2x + 3} + \ln [x+1 + \sqrt {x^2 + 2x + 1}]+ C$
