Hunter Liu's Website

9. Improper Integrals

≪ 8. Integration Review | Table of Contents | 10. Convergence of Series ≫

We’ve learned about indefinite integrals and about definite integrals, and somewhere in an orthogonal direction lies the improper integral.

Recall that definite integrals are limits of Riemann sums, finer and finer rectangular approximations to the area under a curve. Supposedly, it shouldn’t matter if you do a left-hand or a right-hand Riemann sum, of equal length or of unequal length, or if you choose to do something much more exotic like a midpoint Riemann sum. But consider the integral \[\int _{0}^{1} \frac{1}{\sqrt x} dx. \] If you just do the integral “normally”, you get \[\left. 2\sqrt x\right\rvert_{0} ^{1} = 2,\] no sweat. But if you think about the integral as a Riemann sum, all of a sudden the left-hand Riemann sums all contain an infinitely tall rectangle. Is this a problem?

Likewise, consider the integral \[\int _{1}^{\infty} \frac{1}{x^2} dx.\] If you close your eyes blindly and take the integral, you get \[\left. -\frac{1}{x}\right\rvert_{1} ^{\infty} = 1,\] since \(\frac{1}{\infty} = 0\) (sort of blasphemous). But how would a Riemann sum even work in this context? Clearly one would need infinitely many rectangles for every Riemann sum, and that can’t be right.

Finally, consider the integral \[\int _{0}^{\pi }\tan(x) dx.\] On one hand, staring at the picture indicates that this should just be \(0\), as the positive and negative areas are symmetric; one can even get this answer by just blindly taking the integral and plugging points in. But thinking about this with Riemann sums, the answer is far less clear. Sometimes there’s an infinitely tall rectangle, sometimes there isn’t, and it just depends on how you cut up the Riemann sum.

These are all examples of improper integrals, which are just definite integrals that involve a horizontally or vertically infinite area. It turns out that the first two integrals really do come out to \(2\) and \(1\), respectively, but the third integral does not exist.

Never ever take improper integrals “the normal way”. Instead of doing black magic like “plugging in \(\infty\)”, we need to replace the \(\infty\)’s with limits. For instance, \[\int _{1}^{\infty} \frac{1}{x^2} dx = \lim _{R\to\infty} \int _{1}^{R} \frac{1}{x^2} dx.\] This is a formalisation of how we “plug in \(\infty\)”; every time you see the \(\infty\) in a limit of integration, replace it with a limit. Now we can take the definite integral normally, yields \[\int _{1}^{\infty} \frac{1}{x^2}dx = \lim _{R\to\infty} \left( 1 - \frac{1}{R} \right) = 1.\]

Again, to take integrals with “horizontal infinites”, replace these infinites with limits.

Example 1.

Compute \[\int _{-\infty}^{\infty} \frac{1}{1+x^2} dx.\]

Solution
We don’t have any vertical asymptotes here, and we have \[\int _{-\infty}^{\infty} \frac{1}{1+x^2}dx = \lim _{R\to\infty} \int _{-R}^{R} \frac{1}{1+x^2} dx = \lim _{R\to\infty} \left( \arctan(R) - \arctan(-R) \right). \] If you know your trig well enough, you’ll end up with \(\pi \).

Whenever there’s a vertical asymptote, i.e. a vertical infinity, we again need to break up the integral into limits in such a way that we never cross the vertical asymptote. For instance, \[\int _{0}^{1}\frac{1}{\sqrt x} dx = \lim _{r\to 0^+} \int _{r}^{1} \frac{1}{\sqrt x} dx = \lim _{r\to 0^+} \left( 2\sqrt 1 - 2\sqrt r \right) = 2. \] Likewise, for tangent, we need to break up the integral as follows: \[\int _{0}^{\pi }\tan(x) dx = \int _{0}^{\frac{\pi }{2}} \tan(x) dx + \int _{\frac{\pi }{2}}^{\pi }\tan(x) dx = \lim _{r\to \frac{\pi }{2}^-} \int _{0}^{r} \tan(x) + \lim _{r\to \frac{\pi }{2}^+}\int _{r}^{\pi } \tan(x) dx.\] Note that I broke the integral into two halves — one on either side of the vertical asymptote. Now I can take these definite integrals: \[\int _{0}^{\pi } \tan(x) dx = \lim _{r\to \frac{\pi }{2}^-} \ln \left\lvert \cos(r) \right\rvert - \lim _{r\to \frac{\pi }{2}^+} \ln \left\lvert \cos(r) \right\rvert.\] While it appears that these two limits will cancel each other out, neither of these limits actually exist — \(\infty - \infty\neq 0\)! Thus, this improper integral does not exist either.

Example 2.

Compute \[\int _{0}^{3} \frac{1}{x-2} dx.\]

Note that although the indefinite integral is \(\ln \left\lvert x-2 \right\rvert\), this improper integral is not \(\ln \left\lvert 3-2 \right\rvert - \ln \left\lvert 0-2 \right\rvert = -\ln 2\).

Solution
There is a vertical asymptote at \(x=2\), so we should break up the integral around there: \[\int _{0}^{3}\frac{1}{x-2} dx = \lim _{r\to 2^-} \int _{0}^{r} \frac{1}{x-2} dx + \lim _{r\to 2^+} \int _{r}^{3} \frac{1}{x-2} dx.\] Now we can compute the definite integrals, getting \[\lim _{r\to 2^-} \left( \ln \left\lvert r-2 \right\rvert - \ln 2 \right) + \lim _{r\to 2^+ } \left( \ln 1 - \ln \left\lvert r-2 \right\rvert \right).\] Neither of these two integrals exist, as \(\ln \left\lvert r-2 \right\rvert\to -\infty \) as \(r\to 2\) from either side! Thus, the improper integral does not exist.