# Contradictory results in testing convergence of improper integral

I was testing the convergence of the integral $$\int_0^{+\infty}\frac{\sqrt{x+1}}{1+2\sqrt x+x^2}dx$$ by calculating the limit $$\lim_{x\to+\infty}\frac{\frac{\sqrt{x+1}}{1+2\sqrt{x}+x^2}}{\frac{1}{x^{3/2}}}=1>0$$ and by noting that $$\int_0^{+\infty}\frac{1}{x^{3/2}}=+\infty$$ therefore the original integral has to be divergent as well. However Mathematica seems to evaluate the original integral to 2.04517. What is wrong here?

The limit you have found $$\lim_{x\to+\infty}\frac{\frac{\sqrt{x+1}}{1+2\sqrt{x}+x^2}}{\frac{1}{x^{3/2}}}=1$$ implies that, as $x \to \infty$, $$\frac{\sqrt{x+1}}{1+2\sqrt{x}+x^2}\sim{\frac{1}{x^{3/2}}}$$
you can't deduce it holds as $x \to 0$. Therefore, we have that, for any large fixed $B>0$, $$\int_B^\infty\frac{\sqrt{x+1}}{1+2\sqrt{x}+x^2}\:dx, \quad\int_B^\infty {\frac{1}{x^{3/2}}}\:dx,$$ are both convergent. Observe that the integrand $\dfrac{\sqrt{x+1}}{1+2\sqrt{x}+x^2}$ is a continuous function as $x \to 0^+$, giving the convergence of the initial integral over $(0,\infty)$.
• Doesn't $B$ have to be $\ge 1$ to deduce convergence for both of them, since the integral we're comparing to converges only for $B\ge 1$ ? – ahra Jul 8 '17 at 10:01
• @ahra Not really, the integral $\int_B^\infty {\frac{1}{x^{3/2}}}\:dx$ converges for any $B>0$. Thus $B\ge1$ is fine, but necessary. – Olivier Oloa Jul 8 '17 at 10:03