Area Under a Curve
A definite integral measures the signed area between a curve and the x-axis over an interval. Signed matters: area below the axis counts as negative, so an integral can be zero even when the curve is far from flat.
∫ab f(x) dx
Three Numerical Methods
| Method | Approximates each strip as | Error falls with |
|---|---|---|
| Trapezoidal rule | A trapezoid | 1/n² |
| Midpoint rule | A rectangle at the midpoint | 1/n² |
| Simpson's rule | A parabola through three points | 1/n⁴ |
Simpson's rule is the default here because fitting parabolas rather than straight lines converges dramatically faster. Doubling the intervals cuts its error by a factor of sixteen, against four for the trapezoidal rule. It is also exact for any polynomial up to degree three.
The Fundamental Theorem
Differentiation and integration are inverse operations. If F′(x) = f(x), then the definite integral from a to b is simply F(b) − F(a). This is the result that connects the two halves of calculus, and it means an integral can be evaluated exactly whenever an antiderivative can be found.
Many functions have no elementary antiderivative — e−x², central to statistics, is the classic example. Numerical integration is how those are handled.
What Integrals Measure
- Distance from a velocity curve.
- Work from a force applied over a distance.
- Probability from a density function — the area under a normal curve is a probability.
- Total accumulation from any rate: rainfall from intensity, revenue from sales rate, charge from current.
- Volumes and surface areas of solids of revolution.
Improper Integrals
When a limit is infinite, or the function blows up inside the interval, the integral is improper. Some still converge — the area under 1/x² from 1 to infinity is exactly 1 — and some do not. Numerical methods handle these badly, since they sample a finite set of points; such cases need analytical treatment.
Frequently Asked Questions
Why is my integral negative?
Because more of the curve lies below the axis than above it over that interval. For the total unsigned area, integrate the absolute value of the function instead.
How many intervals should I use?
A thousand is ample for smooth functions. Increase it if the function oscillates rapidly; the convergence table shows when the answer has stabilised.
Can it handle infinite limits?
Not directly. Substitute a large finite limit and check whether the result stabilises as you push it further — if it does, the integral likely converges.