Comparison Test for Improper Integrals

Sometimes it is impossible to find the exact value of an improper integral and yet it is important to know whether it is convergent or divergent. In such cases the following test is useful. Although we state it for Type 1 integrals, a similar theorem is true for Type 2 integrals.

Comparison Test. Suppose that f and g are continuous functions with $$${f{{\left({x}\right)}}}\ge{g{{\left({x}\right)}}}\ge{0}$$$ for $$${x}\ge{a}$$$.

  1. If $$${\int_{{a}}^{{\infty}}}{f{{\left({x}\right)}}}{d}{x}$$$ is convergent, then $$${\int_{{a}}^{{\infty}}}{g{{\left({x}\right)}}}{d}{x}$$$ is also convergent.
  2. If $$${\int_{{a}}^{{\infty}}}{g{{\left({x}\right)}}}{d}{x}$$$ is divergent, then $$${\int_{{a}}^{{\infty}}}{f{{\left({x}\right)}}}{d}{x}$$$ is also divergent.

In terms of area the Comparison Test makes a lot of sense. If f(x) is larger than g(x) then the area under f(x) must also be larger than the area under g(x).

So, if the area under the larger function is finite ($$${\int_{{a}}^{{\infty}}}{f{{\left({x}\right)}}}{d}{x}$$$ converges) then the area under the smaller function must also be finite ($$${\int_{{a}}^{{\infty}}}{g{{\left({x}\right)}}}{d}{x}$$$ converges). Similarly, if the area under the smaller function is infinite ($$${\int_{{a}}^{{\infty}}}{g{{\left({x}\right)}}}{d}{x}$$$ diverges) then the area under the larger function must also be infinite ($$${\int_{{a}}^{{\infty}}}{f{{\left({x}\right)}}}{d}{x}$$$ diverges).

You should correctly understand this test. Divergence of $$${\int_{{a}}^{{\infty}}}{f{{\left({x}\right)}}}{d}{x}$$$ doesn't imply divergence of $$${\int_{{a}}^{{\infty}}}{g{{\left({x}\right)}}}{d}{x}$$$ (it may or may not diverge). Convergence of $$${\int_{{a}}^{{\infty}}}{g{{\left({x}\right)}}}{d}{x}$$$ doesn't imply convergence of $$${\int_{{a}}^{{\infty}}}{f{{\left({x}\right)}}}{d}{x}$$$ (it may or may not converge).

Example 1. Determine whether $$${\int_{{0}}^{{\infty}}}{{e}}^{{-{{x}}^{{2}}}}{d}{x}$$$ is convergent.

We can't evaluate the integral directly because the antiderivative of $$${{e}}^{{-{{x}}^{{2}}}}$$$ is not an elementary function. However, note that $$${{x}}^{{2}}\ge{x}$$$ for $$${x}\ge{1}$$$. This means that $$$-{{x}}^{{2}}\le-{x}$$$ and $$${{e}}^{{-{{x}}^{{2}}}}\le{{e}}^{{-{x}}}$$$ for $$${x}\ge{1}$$$.

However, we have integral from 0 to $$$\infty$$$ instead of 1 to $$$\infty$$$.

So, we split integral as follows: $$${\int_{{0}}^{{\infty}}}{{e}}^{{-{{x}}^{{2}}}}{d}{x}={\int_{{0}}^{{1}}}{{e}}^{{-{{x}}^{{2}}}}{d}{x}+{\int_{{1}}^{{\infty}}}{{e}}^{{-{{x}}^{{2}}}}{d}{x}$$$.

First integral on the right-hand side is just an ordinary definite integral and, thus, has finite value.

For the second integral with use comparison test ($$${{e}}^{{-{{x}}^{{2}}}}\le{{e}}^{{-{x}}}$$$ for $$${x}\ge{1}$$$ ).

$$${\int_{{1}}^{{\infty}}}{{e}}^{{-{x}}}{d}{x}=\lim_{{{t}\to\infty}}{\int_{{1}}^{{t}}}{{e}}^{{-{x}}}{d}{x}=\lim_{{{t}\to\infty}}{\left(-{{e}}^{{-{x}}}{{\mid}_{{1}}^{{t}}}\right)}=\lim_{{{t}\to\infty}}{\left(-{{e}}^{{-{t}}}+{{e}}^{{-{1}}}\right)}=\frac{{1}}{{e}}$$$.

Thus, taking $$${f{{\left({x}\right)}}}={{e}}^{{-{x}}}$$$ and $$${g{{\left({x}\right)}}}={{e}}^{{-{{x}}^{{2}}}}$$$ in the Comparison Test, we see that $$${\int_{{1}}^{{\infty}}}{{e}}^{{-{{x}}^{{2}}}}{d}{x}$$$ is convergent. It follows that is $$${\int_{{0}}^{{\infty}}}{{e}}^{{-{{x}}^{{2}}}}{d}{x}$$$ is convergent.

Example 2. Determine if the integral $$${\int_{{1}}^{\infty}}\frac{{1}}{{{x}+{{e}}^{{x}}}}{d}{x}$$$ is convergent or divergent.

We can write that $$$\frac{{1}}{{{x}+{{e}}^{{x}}}}<\frac{{1}}{{x}}$$$ but we can't say nothing about integral because $$${\int_{{1}}^{{\infty}}}\frac{{1}}{{x}}{d}{x}$$$ is divergent (see Type 1 Integrals note, Example 1).

So, let's try to drop out x: $$$\frac{{1}}{{{x}+{{e}}^{{x}}}}<\frac{{1}}{{{e}}^{{x}}}={{e}}^{{-{x}}}$$$ for $$${x}\ge{1}$$$.

$$${\int_{{1}}^{{\infty}}}{{e}}^{{-{x}}}{d}{x}$$$ is convergent (see Example 1), so $$${\int_{{1}}^{{\infty}}}\frac{{1}}{{{x}+{{e}}^{{x}}}}{d}{x}$$$ is also convergent by Comparison Test.

Example 3. Determine if the integral $$${\int_{{1}}^{{\infty}}}\frac{{{1}+{{e}}^{{x}}}}{{x}}{d}{x}$$$ convergent or divergent.

Integral is divergent by Comparison Test because $$$\frac{{{1}+{{e}}^{{x}}}}{{x}}>\frac{{1}}{{x}}$$$ and $$${\int_{{1}}^{{\infty}}}\frac{{1}}{{x}}{d}{x}$$$ is divergent.

Example 4. Determine if the integral $$${\int_{{1}}^{{\infty}}}\frac{{{\cos{{\left(\sqrt{{{x}}}\right)}}}}}{{{x}}^{{2}}}{d}{x}$$$ convergent or divergent.

Since $$${\cos{{\left(\sqrt{{{x}}}\right)}}}\le{1}$$$ then integral is convergent by Comparison Test because $$$\frac{{{\cos{{\left(\sqrt{{{x}}}\right)}}}}}{{{x}}^{{2}}}<\frac{{1}}{{{x}}^{{2}}}$$$ and $$${\int_{{1}}^{{\infty}}}\frac{{1}}{{{x}}^{{2}}}{d}{x}$$$ is convergent.