How to calculate a definite integral
- Type the function of x, such as x^2 + 3x, sin(x), e^(-x^2) or 1/sqrt(x).
- Enter the limits. Numbers, expressions like pi/2 and inf or -inf for infinite limits all work.
- Read the value, its error estimate and the graph with the area shaded. When the function has a simple antiderivative, it is shown too.
What a definite integral measures
∫ from a to b of f(x) dx is the signed area between the curve and the x-axis from x = a to x = b. If f is a speed, the integral is the distance travelled; if f is a rate of flow, it is the total volume. When you know an antiderivative F, the fundamental theorem of calculus gives the value exactly: F(b) − F(a). For x² + 3x from 0 to 2 that is (8/3 + 6) − 0 = 26/3 ≈ 8.667.
When there is no formula
Many everyday integrals, such as e^(−x²) (the bell curve) or sin(x)/x, have no antiderivative made of ordinary functions. Numerical integration still gets their values to many digits: ∫ from −∞ to ∞ of e^(−x²) is √π ≈ 1.772453851.
Gauss-Kronrod quadrature evaluates the function at 15 carefully chosen points in each piece of the interval and compares a 7-point and a 15-point answer. The difference is the error estimate, and pieces with large errors are split in half until the whole integral agrees.