Definite Integral Calculator
This definite integral calculator integrates numerically, so it works with or without an antiderivative. Here it gives the area under the bell curve e^(-x²) over the whole real line.
Definite integral
- Read as
- e^(-x²)
- Antiderivative None of the rules this calculator uses fits that integrand. It may have no elementary antiderivative at all: e^(x²), sin(x²) and sin(x)/x are examples that have none. The definite integral is computed numerically, which needs no antiderivative.
- Not found by rule
- Numeric value (adaptive Gauss-Kronrod) Estimated error 1.7 × 10^-10, from 12 subintervals and 330 function evaluations.
- 1.772453851
How the Integral Calculator works
A definite integral is a number: the signed area between a curve and the x-axis from x = a to x = b. The definite integral calculator computes it numerically, so it needs only the function's values, not a formula for its antiderivative.
The example. e^(-x²) is the bell curve behind the normal distribution, and it has no antiderivative made of the usual functions. Its integral over the whole real line still has a value, √π, about 1.772453851. The calculator gets that by mapping the infinite interval onto a finite one and integrating there.
How it integrates. Adaptive Gauss-Kronrod quadrature evaluates the function at 15 carefully placed points on the interval. Seven of those points also make a 7-point Gauss rule, and the gap between the 15-point and 7-point answers is the error estimate. The piece with the largest error is cut in half, and the halving repeats until the total estimated error is below about one part in ten billion.
With an antiderivative as well. When the calculator can find an antiderivative F and both bounds are finite, it also works out F(b) - F(a) and shows it if it matches the numeric value. For x² from 0 to 3, that is 9 - 0 = 9. For sin(x) from 0 to π, it is -cos(π) + cos(0) = 2.
Singularities. The points the rule evaluates are always inside each piece, never on its ends, so a function undefined at a bound is fine when the area there is finite: ∫ from 0 to π of sin(x)/x dx is 1.851937052, and ∫ from 0 to 1 of 1/√x dx is 2. A function undefined at one point inside the interval but real on both sides of it is split at that point. Where the area is infinite, as for 1/x from 0 to 1, the estimate never settles, and the integral is reported as diverging rather than as a number.
Infinite bounds. An interval [a, ∞) becomes [0, 1) through x = a + t/(1 - t), and (-∞, ∞) is split at 0. ∫ from 0 to ∞ of e^(-x) dx comes out as 1. An integral that does not converge at infinity, such as 1/x from 1 to ∞ or sin(x) from 0 to ∞, is reported as not converging.
Integral Calculator FAQ
How do you evaluate a definite integral?
Find an antiderivative F, then subtract: F(b) - F(a). For x² from 0 to 3, F(x) = x³/3, so the integral is 27/3 - 0 = 9. Where no antiderivative can be written down, the integral is computed numerically instead, as this calculator does for every definite integral.
Can a definite integral be negative?
Yes. Area below the x-axis counts as negative. ∫ from 0 to 2π of sin(x) dx is 0, because the positive half cancels the negative half. To get the total area regardless of sign, integrate the absolute value, abs(sin(x)).
What does the error estimate mean?
It is the calculator's own bound on how far the figure might be from the true integral, from comparing two quadrature rules of different accuracy on each piece of the interval. It is usually much larger than the real error. A figure shown to ten significant figures has an error estimate below one part in ten billion.
Why does it say an integral does not converge?
Because the area is infinite, or the estimate keeps moving as the pieces get smaller. 1/x from 0 to 1 grows like ln(1/ε) as the lower end approaches 0, so it has no finite value. The calculator reports that instead of whatever large number it reached when it stopped.