How to solve this question using the comparison test

The problem is this $$\int_0^\infty \frac{x}{x^2+1}\,dx$$

You're supposed to find if this converges or diverges. Now you could figure that by solving the integral but if we were supposed to use the comparison test, how would this be solved?

My teacher taught me to use the comparison test like so: First change the original equation into something simple that can be solved by inspection. And so I turned the original equation into$$\int_0^\infty \frac{1}{x}\,dx$$which shows that it's divergent due to the P-Test.

Then, based on that information, find an equation bigger or smaller than the original one, and do the test.

So since it's divergent, we'd need a bigger equation and I thought of letting that equation be $\int_0^\infty \frac{x}{x^2+x}\,dx$ (basically just replaced the 1 with an x) and then turn it into the equation above. However there's one problem. The above equation is only smaller than the original equation after $x=1$ and the integral starts at 0. So this is incorrect right?

How would I go about solving this? And is my idea of using the comparison test correct? Thanks!

• @JohnLou : For a reason that is explained in the subject line and then again in the question. The question is how to do it by comparison. Jun 23 '17 at 0:28
• If your choice of comparison is larger it's ok if it's finite and only on a finite interval. You can add a finite amount terms to a convergent sum and it will still converge (value may be different). Informally, we only care about the behavior at infinity. Jun 23 '17 at 0:33
• It seems to me that you are using the word "equation" to mean "expression", "formula". That is not what that word means. Jun 27 '17 at 8:39

$$\frac x {x^2+1} > \frac x {x^2+x^2} = \frac 1 {2x}.$$
PS in response to comments: $$\int_0^\infty \frac x {x^2+1} \, dx = \int_0^1 \frac x {x^2+1} \, dx + \int_1^\infty \frac x {x^2+1} \, dx \ge \int_0^1 \frac x {x^2+1} \, dx + \int_1^\infty \frac{dx}{2x} = +\infty.$$
If the integral from $0$ to $1$ were $-\infty$ or if it diverged in some odd way, then we'd have more work to do, but otherwise this does it.
• @WildWombat : Yes, but that's enough. If $\int_1^\infty f(x)\,dx= +\infty$ and $\int_0^1 f(x)\,dx$ is finite, then $\int_0^\infty f(x)\,dx = +\infty. \qquad$ Jun 23 '17 at 0:30