# 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(x)>=g(x)>=0 for x>=a .

1. If int_a^(oo)f(x)dx is convergent, then int_a^(oo)g(x)dx is also convergent.
2. If int_a^(oo)g(x)dx is divergent, then int_a^(oo)f(x)dx 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^(oo)f(x)dx converges) then the area under the smaller function must also be finite (int_a^(oo)g(x)dx converges). Similarly, if the area under the smaller function is infinite (int_a^(oo)g(x)dx diverges) then the area under the larger function must also be infinite (int_a^(oo)f(x)dx diverges).

You should correctly understand this test. Divergence of int_a^(oo)f(x)dx doesn't imply divergence of int_a^(oo) g(x)dx (it may or may not diverge). Convergence of int_a^(oo)g(x)dx doesn't imply convergence of int_a^(oo) f(x)dx (it may or may not converge).

Example 1. Determine whether int_0^(oo)e^(-x^2)dx 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>=x for x>=1 . This means that -x^2<=-x and e^(-x^2)<=e^(-x) for x>=1 .

However, we have integral from 0 to oo instead of 1 to oo .

So, we split integral as follows: int_0^(oo)e^(-x^2)dx=int_0^1e^(-x^2)dx+int_1^(oo)e^(-x^2)dx .

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)<=e^(-x) for x>=1 ).

int_1^(oo)e^(-x)dx=lim_(t->oo)int_1^t e^(-x)dx=lim_(t->oo)(-e^(-x)|_1^t)=lim_(t->oo)(-e^(-t)+e^(-1))=1/e .

Thus, taking f(x)=e^(-x) and g(x)=e^(-x^2) in the Comparison Test, we see that int_1^(oo)e^(-x^2)dx is convergent. It follows that is int_0^(oo)e^(-x^2)dx is convergent.

Example 2. Determine if the integral int_1^oo 1/(x+e^x)dx is convergent or divergent.

We can write that 1/(x+e^x)<1/x but we can't say nothing about integral because int_1^(oo)1/xdx is divergent (see Type 1 Integrals note, Example 1).

So, let's try to drop out x: 1/(x+e^x)<1/e^x=e^(-x) for x>=1 .

int_1^(oo)e^(-x)dx is convergent (see Example 1), so int_1^(oo)1/(x+e^x)dx is also convergent by Comparison Test.

Example 3. Determine if the integral int_1^(oo)(1+e^x)/xdx convergent or divergent.

Integral is divergent by Comparison Test because (1+e^x)/x>1/x and int_1^(oo)1/x dx is divergent.

Example 4. Determine if the integral int_1^(oo)(cos(sqrt(x)))/x^2dx convergent or divergent.

Since cos(sqrt(x))<=1 then integral is convergent by Comparison Test because (cos(sqrt(x)))/x^2<1/x^2 and int_1^(oo)1/x^2 dx is convergent.
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.9966064095497131, "perplexity": 1476.6654702771928}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.3, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2017-09/segments/1487501172404.62/warc/CC-MAIN-20170219104612-00598-ip-10-171-10-108.ec2.internal.warc.gz"}