*i.e.*you are probably on a mobile phone). Due to the nature of the mathematics on this site it is best views in landscape mode. If your device is not in landscape mode many of the equations will run off the side of your device (should be able to scroll to see them) and some of the menu items will be cut off due to the narrow screen width.

### Section 1-9 : Comparison Test for Improper Integrals

Now that we’ve seen how to actually compute improper integrals we need to address one more topic about them. Often we aren’t concerned with the actual value of these integrals. Instead we might only be interested in whether the integral is convergent or divergent. Also, there will be some integrals that we simply won’t be able to integrate and yet we would still like to know if they converge or diverge.

To deal with this we’ve got a test for convergence or divergence that we can use to help us answer the question of convergence for an improper integral.

We will give this test only for a sub-case of the infinite interval integral, however versions of the test exist for the other sub-cases of the infinite interval integrals as well as integrals with discontinuous integrands.

#### Comparison Test

If \(f\left( x \right) \ge g\left( x \right) \ge 0\) on the interval \(\left[ {a,\infty } \right)\) then,

- If \(\displaystyle \int_{{\,a}}^{{\,\infty }}{{f\left( x \right)\,dx}}\) converges then so does \(\displaystyle \int_{{\,a}}^{{\,\infty }}{{g\left( x \right)\,dx}}\).
- If \(\displaystyle \int_{{\,a}}^{{\,\infty }}{{g\left( x \right)\,dx}}\) diverges then so does \(\displaystyle \int_{{\,a}}^{{\,\infty }}{{f\left( x \right)\,dx}}\).

Note that if you think in terms of area the Comparison Test makes a lot of sense. If \(f\left( x \right)\) is larger than \(g\left( x \right)\) then the area under \(f\left( x \right)\) must also be larger than the area under \(g\left( x \right)\).

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

Be careful not to misuse this test. If the smaller function converges there is no reason to believe that the larger will also converge (after all infinity is larger than a finite number…) and if the larger function diverges there is no reason to believe that the smaller function will also diverge.

Let’s work a couple of examples using the comparison test. Note that all we’ll be able to do is determine the convergence of the integral. We won’t be able to determine the value of the integrals and so won’t even bother with that.

Let’s take a second and think about how the Comparison Test works. If this integral is convergent then we’ll need to find a larger function that also converges on the same interval. Likewise, if this integral is divergent then we’ll need to find a smaller function that also diverges.

So, it seems like it would be nice to have some idea as to whether the integral converges or diverges ahead of time so we will know whether we will need to look for a larger (and convergent) function or a smaller (and divergent) function.

To get the guess for this function let’s notice that the numerator is nice and bounded because we know that,

\[0 \le {\cos ^2}x \le 1\]

Therefore, the numerator simply won’t get too large.

So, it seems likely that the denominator will determine the convergence/divergence of this integral and we know that

\[\int_{{\,2}}^{{\,\infty }}{{\frac{1}{{{x^2}}}\,dx}}\]converges since \(p = 2 > 1\) by the fact in the previous section. So, let’s guess that this integral will converge.

So we now know that we need to find a function that is larger than

\[\frac{{{{\cos }^2}x}}{{{x^2}}}\]and also converges. Making a fraction larger is actually a fairly simple process. We can either make the numerator larger or we can make the denominator smaller. In this case we can’t do a lot about the denominator in a way that will help. However, we can use the fact that \(0 \le {\cos ^2}x \le 1\) to make the numerator larger (*i.e.* we’ll replace the cosine with something we know to be larger, namely 1). So,

Now, as we’ve already noted

\[\int_{{\,2}}^{{\,\infty }}{{\frac{1}{{{x^2}}}\,dx}}\]converges and so by the Comparison Test we know that

\[\int_{{\,2}}^{{\,\infty }}{{\frac{{{{\cos }^2}x}}{{{x^2}}}\,dx}}\]must also converge.

Let’s first take a guess about the convergence of this integral. As noted after the fact in the last section about

\[\int_{{\,a}}^{{\,\infty }}{{\frac{1}{{{x^p}}}\,dx}}\]if the integrand goes to zero faster than \(\frac{1}{x}\) then the integral will probably converge. Now, we’ve got an exponential in the denominator which is approaching infinity much faster than the \(x\) and so it looks like this integral should probably converge.

So, we need a larger function that will also converge. In this case we can’t really make the numerator larger and so we’ll need to make the denominator smaller in order to make the function larger as a whole. We will need to be careful however. There are two ways to do this and only one, in this case only one, of them will work for us.

First, notice that since the lower limit of integration is 3 we can say that \(x \ge 3 > 0\) and we know that exponentials are always positive. So, the denominator is the sum of two positive terms and if we were to drop one of them the denominator would get smaller. This would in turn make the function larger.

The question then is which one to drop? Let’s first drop the exponential. Doing this gives,

\[\frac{1}{{x + {{\bf{e}}^x}}} < \frac{1}{x}\]This is a problem however, since

\[\int_{{\,3}}^{{\,\infty }}{{\frac{1}{x}\,dx}}\]diverges by the fact. We’ve got a larger function that is divergent. This doesn’t say anything about the smaller function. Therefore, we chose the wrong one to drop.

Let’s try it again and this time let’s drop the \(x\).

\[\frac{1}{{x + {{\bf{e}}^x}}} < \frac{1}{{{{\bf{e}}^x}}} = {{\bf{e}}^{ - x}}\]Also,

\[\begin{align*}\int_{{\,3}}^{{\,\infty }}{{{{\bf{e}}^{ - x}}\,dx}} & = \mathop {\lim }\limits_{t \to \infty } \int_{{\,3}}^{{\,t}}{{{{\bf{e}}^{ - x}}\,dx}}\\ & = \mathop {\lim }\limits_{t \to \infty } \left( { - {{\bf{e}}^{ - t}} + {{\bf{e}}^{ - 3}}} \right)\\ & = {{\bf{e}}^{ - 3}}\end{align*}\]So, \(\int_{{\,3}}^{{\,\infty }}{{{{\bf{e}}^{ - x}}\,dx}}\) is convergent. Therefore, by the Comparison test

\[\int_{{\,3}}^{{\,\infty }}{{\frac{1}{{x + {{\bf{e}}^x}}}\,dx}}\]is also convergent.

This is very similar to the previous example with a couple of very important differences. First, notice that the exponential now goes to zero as \(x\) increases instead of growing larger as it did in the previous example (because of the negative in the exponent). Also note that the exponential is now subtracted off the \(x\) instead of added onto it.

The fact that the exponential goes to zero means that this time the \(x\) in the denominator will probably dominate the term and that means that the integral probably diverges. We will therefore need to find a smaller function that also diverges.

Making fractions smaller is pretty much the same as making fractions larger. In this case we’ll need to either make the numerator smaller or the denominator larger.

This is where the second change will come into play. As before we know that both \(x\) and the exponential are positive. However, this time since we are subtracting the exponential from the \(x\) if we were to drop the exponential the denominator will become larger (we will no longer be subtracting a positive number off the \(x\)) and so the fraction will become smaller. In other words,

\[\frac{1}{{x - {{\bf{e}}^{ - x}}}} > \frac{1}{x}\]and we know that

\[\int_{{\,3}}^{{\,\infty }}{{\frac{1}{x}\,dx}}\]diverges and so by the Comparison Test we know that

\[\int_{{\,3}}^{{\,\infty }}{{\frac{1}{{x - {{\bf{e}}^{ - x}}}}\,dx}}\]must also diverge.

First notice that as with the first example, the numerator in this function is going to be bounded since the sine is never larger than 1. Therefore, since the exponent on the denominator is less than 1 we can guess that the integral will probably diverge. We will need a smaller function that also diverges.

We know that \(0 \le 3{\sin ^4}\left( {2x} \right) \le 3\). In particular, this term is positive and so if we drop it from the numerator the numerator will get smaller. This gives,

\[\frac{{1 + 3{{\sin }^4}\left( {2x} \right)}}{{\sqrt x }} > \frac{1}{{\sqrt x }}\]and

\[\int_{{\,1}}^{{\,\infty }}{{\frac{1}{{\sqrt x }}\,dx}}\]diverges so by the Comparison Test

\[\int_{{\,1}}^{{\,\infty }}{{\frac{{1 + 3{{\sin }^4}\left( {2x} \right)}}{{\sqrt x }}\,dx}}\]also diverges.

Up to this point all the examples used on manipulation of either the numerator or the denominator in order to use the Comparison Test. Don’t get so locked into that idea that you decide that is all you will ever have to do. Sometimes you will need to manipulate both the numerator and the denominator.

Let’s do an example like that.

In this case we can notice that because the cosine in the numerator is bounded the numerator will never get too large. Likewise, the sine in the denominator is bounded and so again that term will not get too large or too small.

That leaves only the square root in the denominator and because the exponent is less than one we can guess that the integral will probably diverge. Therefore, we will need a smaller function that also diverges.

We know that \(0 \le {\cos ^2}\left( x \right) \le 1\). In particular, this term is positive and so if we drop it from the numerator the numerator will get smaller. This gives,

\[\frac{{1 + {{\cos }^2}\left( x \right)}}{{\sqrt x \left[ {2 - {{\sin }^4}\left( x \right)} \right]}} > \frac{1}{{\sqrt x \left[ {2 - {{\sin }^4}\left( x \right)} \right]}}\]Next, we also know that \(0 \le {\sin ^4}\left( x \right) \le 1\). Again, this is a positive term and so if we no longer subtract this off from the 2 the term in the brackets will get larger and so the rational expression will get smaller. This gives,

\[\frac{{1 + {{\cos }^2}\left( x \right)}}{{\sqrt x \left[ {2 - {{\sin }^4}\left( x \right)} \right]}} > \frac{1}{{\sqrt x \left[ {2 - {{\sin }^4}\left( x \right)} \right]}} > \frac{1}{{2\sqrt x }}\]

Finally, we know that

\[\int_{{\,2}}^{{\,\infty }}{{\frac{1}{{2\sqrt x }}\,dx}}\]Diverges (the 2 in the denominator will not affect this) so by the Comparison Test

\[\int_{{\,2}}^{{\,\infty }}{{\frac{{1 + {{\cos }^2}\left( x \right)}}{{\sqrt x \left[ {2 - {{\sin }^4}\left( x \right)} \right]}}\,dx}}\]also diverges.

Okay, we’ve seen a few examples of the Comparison Test now. However, most of them worked pretty much the same way. All the functions were rational and all we did for most of them was add or subtract something from the numerator and/or the denominator to get what we want.

Let’s take a look at an example that works a little differently so we don’t get too locked into these ideas.

Normally, the presence of just an \(x\) in the denominator would lead us to guess divergent for this integral. However, the exponential in the numerator will approach zero so fast that instead we’ll need to guess that this integral converges.

To get a larger function we’ll use the fact that we know from the limits of integration that \(x > 1\). This means that if we just replace the \(x\) in the denominator with 1 (which is always smaller than \(x\)) we will make the denominator smaller and so the function will get larger.

\[\frac{{{{\bf{e}}^{ - x}}}}{x} < \frac{{{{\bf{e}}^{ - x}}}}{1} = {{\bf{e}}^{ - x}}\]and we can show that

\[\int_{{\,1}}^{{\,\infty }}{{{{\bf{e}}^{ - x}}\,dx}}\]converges. In fact, we’ve already done this for a lower limit of 3 and changing that to a 1 won’t change the convergence of the integral. Therefore, by the Comparison Test

\[\int_{{\,1}}^{{\,\infty }}{{\frac{{{{\bf{e}}^{ - x}}}}{x}\,dx}}\]also converges.

We should also really work an example that doesn’t involve a rational function since there is no reason to assume that we’ll always be working with rational functions.

We know that exponentials with negative exponents die down to zero very fast so it makes sense to guess that this integral will be convergent. We need a larger function, but this time we don’t have a fraction to work with so we’ll need to do something different.

We’ll take advantage of the fact that \({{\bf{e}}^{ - x}}\) is a decreasing function. This means that

\[{x_1} > {x_2}\hspace{0.25in}\hspace{0.25in} \Rightarrow \hspace{0.25in}\hspace{0.25in}{{\bf{e}}^{ - {x_1}}} < {{\bf{e}}^{ - {x_2}}}\]In other words, plug in a larger number and the function gets smaller.

From the limits of integration we know that \(x > 1\) and this means that if we square \(x\) it will get larger. Or,

\[{x^2} > x\hspace{0.25in}\hspace{0.25in}{\mbox{provided }}x > 1\]Note that we can only say this since \(x > 1\). This won’t be true if \(x \le 1\)! We can now use the fact that \({{\bf{e}}^{ - x}}\) is a decreasing function to get,

\[{{\bf{e}}^{ - {x^2}}} < {{\bf{e}}^{ - x}}\]So, \({{\bf{e}}^{ - x}}\) is a larger function than \({{\bf{e}}^{ - {x^2}}}\) and we know that

\[\int_{{\,1}}^{{\,\infty }}{{{{\bf{e}}^{ - x}}\,dx}}\]converges so by the Comparison Test we also know that

\[\int_{{\,1}}^{{\,\infty }}{{{{\bf{e}}^{ - {x^2}}}\,dx}}\]is convergent.

The last two examples made use of the fact that \(x > 1\). Let’s take a look at an example to see how we would have to go about these if the lower limit had been smaller than 1.

First, we need to note that \({{\bf{e}}^{ - {x^2}}} \le {{\bf{e}}^{ - x}}\) is only true on the interval \(\left[ {1,\infty } \right)\) as is illustrated in the graph below.

So, we can’t just proceed as we did in the previous example with the Comparison Test on the interval \(\left[ {\frac{1}{2},\infty } \right)\). However, this isn’t the problem it might at first appear to be. We can always write the integral as follows,

\[\begin{align*}\int_{{\,\frac{1}{2}}}^{{\,\infty }}{{{{\bf{e}}^{ - {x^2}}}\,dx}} & = \int_{{\,\frac{1}{2}}}^{{\,1}}{{{{\bf{e}}^{ - {x^2}}}\,dx}} + \int_{{\,1}}^{{\,\infty }}{{{{\bf{e}}^{ - {x^2}}}\,dx}}\\ & = 0.28554 + \int_{{\,1}}^{{\,\infty }}{{{{\bf{e}}^{ - {x^2}}}\,dx}}\end{align*}\]We used Mathematica to get the value of the first integral. Now, if the second integral converges it will have a finite value and so the sum of two finite values will also be finite and so the original integral will converge. Likewise, if the second integral diverges it will either be infinite or not have a value at all and adding a finite number onto this will not all of a sudden make it finite or exist and so the original integral will diverge. Therefore, this integral will converge or diverge depending only on the convergence of the second integral.

As we saw in Example 7 the second integral does converge and so the whole integral must also converge.

As we saw in this example, if we need to, we can split the integral up into one that doesn’t involve any problems and can be computed and one that may contain a problem that we can use the Comparison Test on to determine its convergence.