Improper Integrals and Convergence
An ordinary definite integral asks for the area under a continuous function on a finite interval. An improper integral breaks one of those two conditions: either the interval is infinite, or the function blows up somewhere on it. The area may still be a finite number, or it may not, and deciding which is the whole subject of this article.
If you are new to integration, start with How to Solve Integrals Step by Step. To check any example below as you read, use the integral calculator, which gives step-by-step solutions for definite and indefinite integrals.
Two types of improper integrals
Type 1: infinite limits. One or both limits of integration are infinite:
\int_1^\infty \frac{1}{x^2}\,dx, \qquad \int_{-\infty}^{\infty} e^{-x^2}\,dx
Type 2: a discontinuity. The function is unbounded at some point of the interval, usually an endpoint:
\int_0^1 \frac{1}{\sqrt{x}}\,dx
Here \frac{1}{\sqrt{x}} is not defined at x = 0 and grows without bound as x \to 0^+.
Some integrals are both types at once, for example \int_0^\infty \frac{1}{\sqrt{x}}\,dx. You handle them by splitting the integral into pieces, each of a single type.
The definition through limits
We cannot plug \infty into an antiderivative, so we replace the troublesome point with a variable and take a limit.
For an infinite upper limit:
\int_a^\infty f(x)\,dx = \lim_{b\to\infty}\int_a^b f(x)\,dx
For an infinite lower limit:
\int_{-\infty}^b f(x)\,dx = \lim_{a\to-\infty}\int_a^b f(x)\,dx
For a function that is unbounded at the upper endpoint b:
\int_a^b f(x)\,dx = \lim_{t\to b^-}\int_a^t f(x)\,dx
and at the lower endpoint a:
\int_a^b f(x)\,dx = \lim_{t\to a^+}\int_t^b f(x)\,dx
If the limit exists and is a finite number, the integral converges to that number. If the limit is infinite or does not exist, the integral diverges.
Two cases need a split:
- If both limits are infinite, choose any point c and write \int_{-\infty}^{\infty} = \int_{-\infty}^{c} + \int_c^{\infty}. The whole integral converges only if both parts converge.
- If the function is unbounded at an interior point c, write \int_a^b = \int_a^c + \int_c^b and check both parts the same way.
A common mistake is to assume symmetry gives zero. For example, \int_{-\infty}^{\infty} x\,dx is not 0: neither half converges, so the integral diverges. In the same way \int_{-1}^{1}\frac{1}{x}\,dx is not 0, because the function is unbounded at x = 0 and each half diverges.
For the basics of evaluating integrals with finite limits, see How to Evaluate Definite Integrals.
The p-test
Two families of integrals come up so often that it is worth remembering their behavior.
| Integral | Converges when | Diverges when | Value if it converges |
|---|---|---|---|
| \displaystyle\int_1^\infty \frac{1}{x^p}\,dx | p > 1 | p \le 1 | \dfrac{1}{p-1} |
| \displaystyle\int_0^1 \frac{1}{x^p}\,dx | p < 1 | p \ge 1 | \dfrac{1}{1-p} |
Notice that the two conditions are opposite. Going to infinity, you need the function to decay fast enough, so p must be large. Near zero, you need it to blow up slowly enough, so p must be small. The borderline case p = 1 diverges in both situations.
To see where this comes from, take p \ne 1 and compute:
\int_1^b x^{-p}\,dx = \frac{b^{1-p} - 1}{1-p}
If p > 1, then b^{1-p} \to 0 as b \to \infty, and the limit is \frac{1}{p-1}. If p < 1, then b^{1-p} \to \infty, and the integral diverges. The case p = 1 is handled separately in Example 2 below.
Example 1: a convergent integral
Evaluate \displaystyle\int_1^\infty \frac{1}{x^2}\,dx.
Step 1. Replace the infinite limit with a variable:
\int_1^\infty \frac{1}{x^2}\,dx = \lim_{b\to\infty}\int_1^b x^{-2}\,dx
Step 2. Find the antiderivative. Since \int x^{-2}\,dx = -\frac{1}{x} + C, we get:
\int_1^b x^{-2}\,dx = \left[-\frac{1}{x}\right]_1^b = -\frac{1}{b} + 1
Step 3. Take the limit:
\lim_{b\to\infty}\left(1 - \frac{1}{b}\right) = 1
The integral converges, and its value is 1. This agrees with the p-test: p = 2 > 1 and \frac{1}{p-1} = 1.
Check. Differentiating -\frac{1}{x} gives \frac{1}{x^2}, as required.
Example 2: a divergent integral
Evaluate \displaystyle\int_1^\infty \frac{1}{x}\,dx.
Step 1. Write it as a limit:
\int_1^\infty \frac{1}{x}\,dx = \lim_{b\to\infty}\int_1^b \frac{1}{x}\,dx
Step 2. The antiderivative is \ln|x| + C, so:
\int_1^b \frac{1}{x}\,dx = \Big[\ln|x|\Big]_1^b = \ln b - \ln 1 = \ln b
Step 3. Take the limit:
\lim_{b\to\infty}\ln b = \infty
The integral diverges. The function \frac{1}{x} tends to zero, but not fast enough: the area under it keeps growing, just slowly. This is the p = 1 case from the table, and it is a good reminder that “the function goes to zero” is not enough for convergence.
Check. The derivative of \ln|x| is \frac{1}{x}, so the antiderivative is correct.
Checking Example 2 in the calculator
You can check this step by step in the integral calculator.
For this integral the calculator reports the antiderivative \ln(|x|) + C and then states that the definite integral diverges on this interval. It also notes that the Fundamental Theorem of Calculus in its usual form does not apply here, so the Newton–Leibniz formula cannot be used directly, and the value fields stay empty. The solution steps show the table integral \int \frac{1}{x}\,dx = \ln(|x|) + C.
Two details are worth knowing:
- The message mentions a “non-integrable singularity”. For an infinite limit this simply means the integral has no finite value, which matches the divergence we found by hand.
- The calculator tells you that the integral diverges, but the limit \lim_{b\to\infty}\ln b = \infty is the reasoning behind that verdict, and that part you should write out yourself, as in the steps above.
Example 3: an integrand that blows up
Evaluate \displaystyle\int_0^1 \frac{1}{\sqrt{x}}\,dx.
The function is unbounded at x = 0, so this is a Type 2 integral.
Step 1. Replace the bad endpoint with a variable approaching it from inside the interval:
\int_0^1 \frac{1}{\sqrt{x}}\,dx = \lim_{t\to 0^+}\int_t^1 x^{-1/2}\,dx
Step 2. The antiderivative of x^{-1/2} is 2\sqrt{x} + C, so:
\int_t^1 x^{-1/2}\,dx = \Big[2\sqrt{x}\Big]_t^1 = 2 - 2\sqrt{t}
Step 3. Take the limit:
\lim_{t\to 0^+}\left(2 - 2\sqrt{t}\right) = 2
The integral converges to 2. The p-test agrees: p = \frac{1}{2} < 1 and \frac{1}{1-p} = 2.
Check. The derivative of 2\sqrt{x} is \frac{1}{\sqrt{x}}, so the antiderivative is correct.
So an unbounded function can still enclose a finite area, as long as it blows up slowly enough.
The comparison test
Often you only need to know whether an integral converges, not its exact value, or the antiderivative is hard to find. In that case compare your function with a simpler one.
Suppose 0 \le f(x) \le g(x) for all x \ge a. Then:
- if \int_a^\infty g(x)\,dx converges, so does \int_a^\infty f(x)\,dx;
- if \int_a^\infty f(x)\,dx diverges, so does \int_a^\infty g(x)\,dx.
In words: a smaller function under a convergent integral must converge, and a larger function over a divergent integral must diverge. The same idea works for Type 2 integrals.
Convergence example. For x \ge 1 we have \frac{1}{x^2+1} \le \frac{1}{x^2}, and \int_1^\infty \frac{1}{x^2}\,dx converges by Example 1. Therefore \int_1^\infty \frac{1}{x^2+1}\,dx converges too.
Divergence example. For x \ge 1 we have \frac{2+\sin x}{x} \ge \frac{1}{x} because 2 + \sin x \ge 1. Since \int_1^\infty \frac{1}{x}\,dx diverges by Example 2, the larger integral \int_1^\infty \frac{2+\sin x}{x}\,dx diverges as well.
The test requires both functions to be nonnegative, so check that before using it. It also only tells you whether the integral converges. It does not give the value.
A short checklist
When you meet an improper integral:
- Find every problem point: infinite limits and places where the integrand is unbounded. Look inside the interval, not only at the endpoints.
- Split the integral so that each piece has only one problem point.
- Replace each problem point with a variable and write a limit.
- Find the antiderivative, substitute the limits, and evaluate the limit.
- If any piece diverges, the whole integral diverges.
- Check the antiderivative by differentiating it.
For a broader view of integration techniques you may need in step 4, see How to Solve Integrals Step by Step.