Improper Integrals: Convergence, p-Integrals and Examples
Learn how to evaluate improper integrals with infinite limits or infinite discontinuities, the p-integral rule, the comparison test and worked examples.
By the PracticeCalculus team Published 7 min read
On this page
Can a region that stretches forever have a finite area? Surprisingly, often yes. The region under y = \frac{1}{x^2} to the right of x = 1 never ends, yet its area is exactly 1. Improper integrals are how calculus measures areas like this, and they show up everywhere from probability to the integral test for series.
What is an improper integral?
An ordinary definite integral \int_a^b f(x)\,dx needs a finite interval and a function that stays finite on it. An improper integral breaks one of those rules:
- Type 1: an infinite limit of integration, such as \int_1^\infty \frac{1}{x^2}\,dx.
- Type 2: an infinite discontinuity, where the integrand blows up somewhere in [a, b], such as \int_0^1 \frac{1}{\sqrt x}\,dx.
In both cases the fix is the same: replace the problem spot with a variable, compute an ordinary integral, and take a limit.
If the limit is a finite number, the integral converges to that number. If the limit is infinite or does not exist, the integral diverges.
Type 1: infinite limits of integration
Worked example 1: 1/x² from 1 to infinity
Evaluate \int_1^\infty \frac{1}{x^2}\,dx.
Step 1. Write it as a limit.
Step 2. Integrate on [1, b].
Step 3. Take the limit. As b\to\infty, \frac1b\to 0:
The integral converges to 1.
Worked example 2: 1/x from 1 to infinity
Evaluate \int_1^\infty \frac{1}{x}\,dx.
The integral diverges. The area under \frac1x grows without bound, just very slowly.
The picture shows how close these two cases are. Both curves pass through (1, 1) and both head toward zero. The difference is speed: \frac{1}{x^2} shrinks fast enough for the total area to settle, and \frac1x does not.
Worked example 3: an exponential tail
Evaluate \int_0^\infty e^{-x}\,dx.
The integral converges to 1. Exponential decay is so fast that its tails almost always converge.
Worked example 4: both limits infinite
Evaluate \int_{-\infty}^\infty \frac{1}{1+x^2}\,dx.
When both ends are infinite, split the integral at any convenient point (0 is easiest) and evaluate each half separately:
Both halves converge, so the whole integral converges to \pi. If either half diverged, the whole integral would diverge.
Divergence without blowing up
An integral can diverge even when the area never becomes infinite. Consider \int_0^\infty \cos x\,dx:
The value of \sin b keeps swinging between -1 and 1 forever, so the limit does not exist and the integral diverges. Convergence requires the limit to settle on a single finite number.
Type 2: infinite discontinuities
When the integrand blows up at an endpoint, approach that endpoint with a limit from inside the interval.
Worked example 5: 1/√x from 0 to 1
Evaluate \int_0^1 \frac{1}{\sqrt x}\,dx. The integrand is infinite at x = 0.
The integral converges to 2, even though the graph shoots up to infinity at the left edge.
Worked example 6: ln x from 0 to 1
Evaluate \int_0^1 \ln x\,dx. Here \ln x \to -\infty as x \to 0^+.
Step 1. Write the limit. \displaystyle\lim_{t\to0^+}\int_t^1 \ln x\,dx.
Step 2. Find the antiderivative. Integration by parts gives \int \ln x\,dx = x\ln x - x.
Step 3. Evaluate on [t, 1].
Step 4. Take the limit. As t\to0^+, t \to 0, and t\ln t \to 0 as well (rewrite it as \frac{\ln t}{1/t} and use L'Hôpital's rule). So
The answer is negative because \ln x < 0 on (0, 1): the region lies below the x-axis.
Worked example 7: the hidden discontinuity trap
Evaluate \int_{-1}^1 \frac{1}{x^2}\,dx.
If you ignore the problem at x = 0 and plug in blindly, you get \left[-\frac1x\right]_{-1}^1 = -1 - 1 = -2. That cannot be right: the integrand is positive everywhere, so the area cannot be negative.
The correct approach is to split at the discontinuity:
The right half is \lim_{t\to0^+}\left[-\frac1x\right]_t^1 = \lim_{t\to0^+}\left(-1 + \frac1t\right) = \infty. Since one half diverges, the whole integral diverges.
Tip: before evaluating any definite integral, scan the interval for points where the denominator is zero, a log hits zero or a tangent hits \frac{\pi}{2}. The Fundamental Theorem of Calculus only applies when the function is continuous on the whole interval.
The p-integral rule
The examples above are special cases of one rule worth memorizing. For p > 0:
| Integral | Converges when | Value | Diverges when |
|---|---|---|---|
| \int_1^\infty \frac{dx}{x^p} | p > 1 | \frac{1}{p-1} | p \le 1 |
| \int_0^1 \frac{dx}{x^p} | p < 1 | \frac{1}{1-p} | p \ge 1 |
Notice p = 1 (the function \frac1x) diverges on both intervals. It sits exactly on the boundary.
The comparison test for improper integrals
Many integrands have no simple antiderivative. You can still decide convergence by comparing them with something you know, usually a p-integral or an exponential. Suppose 0 \le g(x) \le f(x) for x \ge a:
- If \int_a^\infty f(x)\,dx converges, then the smaller \int_a^\infty g(x)\,dx also converges.
- If \int_a^\infty g(x)\,dx diverges, then the larger \int_a^\infty f(x)\,dx also diverges.
Think of it as "smaller than finite is finite, bigger than infinite is infinite."
Worked example 8: comparison to show convergence
Does \int_1^\infty \frac{2 + \cos x}{x^2}\,dx converge?
Since \cos x \le 1, the numerator is at most 3, so 0 < \frac{2+\cos x}{x^2} \le \frac{3}{x^2}. And \int_1^\infty \frac{3}{x^2}\,dx = 3 converges (a p-integral with p = 2). By comparison, the original integral converges.
Worked example 9: comparison to show divergence
Does \int_2^\infty \frac{1}{\ln x}\,dx diverge?
For x \ge 2, \ln x < x, so \frac{1}{\ln x} > \frac{1}{x}. Since \int_2^\infty \frac1x\,dx diverges, the larger integral diverges too.
The same idea, applied to sums instead of areas, gives the comparison tests for series. See convergence tests for how they connect.
Why improper integrals matter
Improper integrals are not just a textbook curiosity. They appear wherever a quantity accumulates over an unlimited range:
- Probability. A probability density must have total area 1 over the whole real line. The famous bell curve relies on \int_{-\infty}^\infty e^{-x^2}\,dx = \sqrt{\pi}.
- Physics. The work needed to move a rocket infinitely far from Earth is an integral of \frac{1}{r^2} out to infinity, and it converges. That finite value is what makes escape velocity possible.
- Series. The integral test decides whether a sum like \sum \frac{1}{n^2} converges by checking the matching improper integral.
Common improper integral mistakes
- Missing an interior discontinuity. As example 7 shows, this gives a finite answer to a divergent integral.
- Treating \infty as a number. Write the limit. Expressions like -\frac{1}{\infty} are shorthand at best, and they hide mistakes.
- Splitting \int_{-\infty}^\infty with one limit. \lim_{b\to\infty}\int_{-b}^b f(x)\,dx is not the definition. Odd functions like x give 0 that way, but \int_{-\infty}^\infty x\,dx diverges.
- Comparing in the wrong direction. Being smaller than a divergent integral proves nothing, and neither does being bigger than a convergent one.
- Forgetting that the p-rule flips on [0, 1]. \int_0^1 \frac{dx}{x^2} diverges even though \int_1^\infty \frac{dx}{x^2} converges.
Practice spotting convergence
Improper integrals become intuitive once you have seen enough of them: you start to sense that \frac{1}{x^2} settles and \frac1x does not before you write a single limit. The interactive lesson below walks you through each type with instant feedback, so you build that instinct along with the technique.
Practice it now
Integrating to infinity
Solve real problems on this topic with instant feedback, hints and a step-by-step walkthrough for every answer. Free, no sign-up needed to start.
Practice this lesson