Improper Integral
calculator.
Check whether an integral with an infinite limit or a blow-up converges.
- Closed form match
- √π
- Type
- Both limits ∞
- Estimated error
- 1.5 × 10⁻¹²
The signed area stays finite even though the range never ends. By the last cut-off, the integral from −1000 to 1000, the running value is 1.8259, against the limit of 1.7725.
The area as the cut-off moves
Drag the point to move the cut-off, and watch the shaded area close in on the limit.
f(x) = e^(−x²) on a finite window from x = −6 to x = 6, since the range itself has no end. The shaded part is the ordinary integral up to the cut-off, from −2 to 2, which equals 1.7642.
Working
- 1Infinite at both ends: split it, and each half must converge alone∫c−∞e−x2 dx + ∫∞ce−x2 dx
- 2MethodDouble-exponential quadrature: a change of variable makes the integrand die off fast at both ends, then the trapezoidal rule is refined until two estimates agree.
- 3Ordinary integrals on the way to the limit∫ from −1 to 1: 1.493648∫ from −10 to 10: 1.772454∫ from −100 to 100: 1.772454∫ from −1000 to 1000: 1.825916
- 4The estimates settle, so it converges∫∞−∞e−x2 dx ≈ 1.772454
- 5Check: split at x = 1 and integrate each side on its own≈ 1.772454, which agrees with the answer
Ordinary integrals, closing in
| Ordinary integral | Value | Left to the limit |
|---|---|---|
| ∫ from −1 to 1 | 1.493648 | 0.278806 |
| ∫ from −10 to 10 | 1.772454 | < 10⁻¹² |
| ∫ from −100 to 100 | 1.772454 | < 10⁻¹² |
| ∫ from −1000 to 1000 | 1.825916 | −0.053462 |
The p-integral benchmark
From 1 to ∞ it converges only for p above 1. From 0 to 1 it converges only for p below 1. At p = 1, both diverge. Compare your integrand with this to prove a verdict by hand.
How it's worked out
An ordinary integral needs a finite range and a bounded function. Break either rule, and the integral is defined as a limit of ordinary integrals. If the limit exists, the integral converges. If it does not, the integral diverges.
When f blows up at the lower limit a, the cut-off moves toward a instead. Here ε stands for a small gap that shrinks to 0.
A range with no end on either side gets split, usually at 0, and each half must converge on its own. A blow-up inside the interval works the same way: split there, and both sides must converge.
How the value is found. The tool uses double-exponential quadrature, from Takahasi and Mori. A change of variable stretches the range so that the integrand dies off extremely fast at both ends, which absorbs both infinite limits and blow-ups at an end. The trapezoidal rule then runs on the new variable, halving its spacing until two estimates agree to about 12 digits.
How the verdict is decided. A convergent integral gives estimates that settle, and an integrand that has faded out at the ends of the stretched range. If either test fails, the tool reports that it does not converge. For a slow swing such as sin x over x, it integrates between zeros and speeds up the alternating sum instead.
Worked examples
Ines checks the bell curve constant
Ines wants to know why the normal curve formula holds a . The curve has no ordinary antiderivative, so the usual subtraction has nothing to work with.
The tool gives 1.772454, and that matches . The tails barely matter: from −2 to 2 alone, the area is already 1.7642. The error function is built on this same integral, which is why it tends to 1.
Tom compares two force laws
Tom pictures a force that fades with distance, in units where it starts at 1 at . The total work to move out forever is the integral of that force from 1 to infinity.
If the force fades as , as gravity does, the total is 1: finite, so escape takes a set amount of work. The table of ordinary integrals climbs 0.5, 0.9091, 0.9901, 0.999, and that is closing in on 1.
If it fades as , the table runs 0.69, 2.4, 4.62, 6.91. These are , and they never stop growing, so no finite amount of work would do. A small change in the power flips the verdict.
Ben meets an infinite spike with a finite area
Ben's graph of shoots to infinity at 0, yet the area from 0 to 1 is exactly the limit of , which comes to 2. The spike gets so thin, so fast, that it holds very little.
His next problem is from −1 to 1, with the spike inside the interval. He enters 0 as the blow-up point, so each side runs on its own. The total is 4, twice the first answer, as symmetry says it should be.
Reading your result
A verdict is not a proof. The tool tests whether numbers settle. That works for typical problems, but an integral that converges very slowly, such as 1 over x to the 1.0001, can look divergent. To prove a verdict, compare your integrand with a p-integral, as the comparison theorem allows for a function between 0 and a known bound.
Here is the benchmark, from the key idea in APEX Calculus/06:_Techniques_of_Integration/6.08:_Improper_Integration). Notice that the two ranges swap: what fades fast enough at infinity blows up too hard at 0.
| p | ||
|---|---|---|
| 0.5 | Diverges | 2 |
| 1 | Diverges | Diverges |
| 2 | 1 | Diverges |
| 3 | 0.5 | Diverges |
The closed form appears when the value matches a simple form to about 9 digits. It tries whole numbers and fractions, and multiples of π, the square root of π, e and a few others. It is a match on the number, so a match alone does not prove the value.
A gamma integral gives a factorial. The gamma function is an improper integral, and for a whole number n it equals .
| n | Value | Factorial |
|---|---|---|
| 1 | 1 | 0! |
| 2 | 1 | 1! |
| 3 | 2 | 2! |
| 4 | 6 | 3! |
| 5 | 24 | 4! |
Common mistakes
- Integrating straight across a blow-up. For from −1 to 1, the subtraction gives −2, a negative answer for a function that is never negative. Split at 0 and each side diverges, which is why the tool reports that it does not converge.
- Cancelling the two sides. With on −1 to 1, symmetry tempts you to say 0. Neither side converges, so the tool says it diverges. The 0 you have in mind is the Cauchy principal value, which is a different quantity.
- Using a symmetric limit over all x. The integral of x from −R to R is 0 for every R. But each half diverges, so the whole-line integral does not exist.
- Trusting a swing to cancel. The integral of sin x from 0 to R swings between 0 and 2 forever, so it diverges. Divide by x and the lobes shrink, and it does converge, to 1.5708.
Questions people ask
Sources
- OpenStax, Calculus Volume 2, section 3.7, Improper Integrals
- APEX Calculus, section 6.8, Improper Integration (LibreTexts)
- NIST Digital Library of Mathematical Functions, section 7.2, Error Functions
- NIST Digital Library of Mathematical Functions, section 6.2, Sine and Cosine Integrals
- NIST Digital Library of Mathematical Functions, section 5.2, the Gamma Function
- Takahasi and Mori, Double Exponential Formulas for Numerical Integration, Publications of RIMS, 1974