The improper integral $\int_0^1\sqrt{\frac1x+1}\,dx$ I want to evaluate the integral 
$$\int_0^1\sqrt{\frac1x+1}\,dx.$$
Letting $u=\sqrt{\frac1x+1}$, the integral becomes
$$\int_{\sqrt 2}^\infty\frac{2u^2}{(u^2-1)^2}\,du,$$
which according to mathematica, equals $\sqrt2+\frac12\log(3+2\sqrt2)$. But using partial fractions, the antiderivative of $\frac{2u^2}{(u^2-1)^2}$ is
$$\int\frac{2u^2}{(u^2-1)^2}\,du=\frac{u}{1-u^2}+\frac12\log\Big(\frac2{1+u}-1\Big),$$
which I can't really make sense of as $u\to\infty$ to apply FTC (or when $u=\sqrt2$ for that matter). Is there an easier way to go about this integral? Or do we necessarily need to involve complex analysis because of log branches?
 A: As $x \ge 0$ an alternative substitution is let $x=u^2$.
Then
$$
2u\,du=dx
$$
and the integral becomes 
$$
2\int_0^1 \sqrt{1+u^2}\,du
$$
which probably looks much more familiar.
Interestingly this leads to a different form for the result
$$
\sqrt2+\log(\sqrt2+1)
$$
This is ok, this tells us, comparing the $\log$ terms
$$
\sqrt{3+2\sqrt{2}}=\sqrt2+1
$$
which of course it is (square both sides).
A: Real methods are sufficient here and you're on the right track. However, the argument of log should have $|\cdot|$, not $(\cdot)$. This gives
$$
\int\frac{2u^2}{(u^2-1)^2}\,du = \frac{u}{1-u^2}+\frac{1}{2}\log\left|\frac{2}{1+u}-1\right|
$$As $u\to \infty$, the first term goes to $0$ by L'Hopital and the second term goes to $\log|-1|=\log|1|=0$. At $u=\sqrt{2}$, we have
$$
\frac{\sqrt{2}}{1-2}+\frac{1}{2}\log\left|\frac{2}{1+\sqrt{2}}-1\right|=-\sqrt{2} + \frac{1}{2} \log|3-2\sqrt{2}|=-\sqrt{2} - \frac{1}{2} \log|3+2\sqrt{2}|
$$Negating this (subtracting this value of the antiderivative) gives the correct result.
A: A by parts integration gives
$$\int u\frac{2u}{(u^2-1)^2}du=$$
$$\Bigl[-u\frac{1}{u^2-1}\Bigr]+\int \frac{1}{u^2-1}=$$
$$\frac{u}{1-u^2}+\frac 12\ln(1-\frac{2}{u+1})$$
the limit when $u \to +\infty$ is zero and at $ \sqrt{2} $ is
$\ln(\sqrt{2}-1)-\sqrt{2}$
A: Alternatively, substitute $x=\sinh^2 t$ to integrate 
$$\int_0^1\sqrt{\frac1x+1}\,dx
=\int_0^{\sinh^{-1}(1)} 2\cosh^2tdt \\
= \int_0^{\sinh^{-1}(1)} (1+\cosh 2t)dt= \sinh^{-1}(1)+\sqrt2$$
Note $ \sinh^{-1}(1)=\ln(1+\sqrt2)$.
