How Definite Integrals Are Computed
A definite integral ∫ab f(x) dx measures the signed area under the curve between x = a and x = b. The Fundamental Theorem of Calculus says: find an antiderivative F, then compute F(b) − F(a). When no elementary antiderivative exists, Simpson's rule approximates the area by fitting parabolas through sample points — with 1000 subintervals, the result is accurate far beyond what homework requires. Enter the integrand and the two limits above, press Evaluate Integral, and the tool returns the Simpson's rule value, an exact value when the antiderivative is a standard form, and the sample points it used, so you can watch the approximation being built.
The Symbols, One by One
f(x) is the integrand — the function being accumulated. a and b are the lower and upper limits, the x-values where the accumulation starts and stops. F(x) is an antiderivative of f, meaning F′(x) = f(x); the Fundamental Theorem then turns the whole problem into F(b) − F(a). In the numeric method, n is the number of subintervals — this tool uses n = 1000, which must be even for Simpson's rule — h = (b − a)/n is the width of each slice, and x₀, x₁, …, xₙ are the sample points spread across the interval. The dx in the notation is the reminder that, in the exact theory, those slice widths shrink toward zero.
Simpson's Rule in One Line
Split [a, b] into an even number n of slices of width h. Then ∫f ≈ (h/3)·[f(x₀) + 4f(x₁) + 2f(x₂) + 4f(x₃) + … + f(xₙ)]. The alternating 4-2-4 weights are what make it far more accurate than simple rectangles or trapezoids.
How to Use This Calculator
- Type the integrand into the Integrand f(x) box, using x as the variable and ^ for powers — for example x^2, or x^2 + sin(x).
- Enter the Lower limit a and the Upper limit b.
- Press Evaluate Integral.
- Read the result panel: the numeric value from Simpson's rule, the exact value if your integrand matches a standard antiderivative form (a power of x, sin(x), cos(x), or e^x), and the “How it was computed” box, which reports n = 1000, the slice width h, and nine sample values f(x) spread across your interval.
Worked Example 1: ∫₀³ x² dx, Two Ways
Exactly, by the Fundamental Theorem: the antiderivative of x² is F(x) = x³/3. Evaluate at the limits: F(3) = 27/3 = 9 and F(0) = 0, so the integral is 9 − 0 = 9 — the value the tool reports on its exact-value line, via F(x) = x³/3. Numerically, Simpson's rule is unusually tidy here. Even with just n = 2 slices, h = (3 − 0)/2 = 1.5, it gives (1.5/3) × [f(0) + 4f(1.5) + f(3)] = 0.5 × [0 + 4(2.25) + 9] = 0.5 × 18 = 9, exactly right, because Simpson's parabolas match a quadratic curve perfectly. With the tool's n = 1000 slices, the agreement extends to many decimal places.
Worked Example 2: ∫₁² (3x² + 2x) dx
Integrate term by term: the antiderivative of 3x² is x³, and the antiderivative of 2x is x², so F(x) = x³ + x². (The +C familiar from indefinite integration cancels in F(b) − F(a), which is why definite integrals never carry a constant.) Evaluate at the top limit: F(2) = 8 + 4 = 12. Evaluate at the bottom limit: F(1) = 1 + 1 = 2. Subtract: 12 − 2 = 10. Sanity-check the size before trusting it: on [1, 2] the function rises from f(1) = 5 to f(2) = 16, so over an interval of width 1 its accumulated area should land somewhere near the average height, about 10 — and Simpson's rule in the tool agrees with 10.
Where Definite Integrals Earn Their Keep
In physics, integrating a velocity function over a time interval gives the distance travelled, and integrating a force over a distance gives work done. In probability, the area under a density curve between two values is the probability of landing between them — that is why density curves must enclose a total area of exactly 1. Engineers integrate flow rates to get total volume delivered, and students use this calculator to check a hand-worked answer numerically before submitting it: if the symbolic result and Simpson's rule disagree, one of them needs a second look.
Three Errors That Corrupt Integral Answers
- Forgetting to subtract F(a). Evaluating only at the upper limit is the most common slip in the whole topic. An antiderivative value is meaningless until the lower-limit value is taken away from it.
- Working in degrees. Trigonometric integrands here — and in calculus generally — use radians. Integrate sin(x) from 0 to π and you get the clean answer 2; feed the same function degree-based limits and the number is meaningless.
- Panicking at a negative or zero answer. A definite integral measures signed area, so regions below the x-axis subtract. A result of 0 can be a correct cancellation, not a broken calculation — check the graph before redoing the arithmetic.
Exact vs. Numeric
Where the antiderivative is a standard form (powers, sin, cos, e^x), this tool also shows the exact value for comparison. For symbolic antiderivatives in general, try our indefinite integral calculator.