Integral Calculator
The definite integral, measured: composite Simpson with 10,000 subintervals (the rule demands an even count), the trapezoid estimate printed beside it, and exact values named where they are known.
Integral Calculator
Results recalculate instantly on every keystroke. Nothing you type is transmitted.
What this result does not account for
- Definite only — no antiderivative, no bounds as symbols
- Continuous integrands — poles abort the walk
In short: ∫₀¹ x² dx: Simpson with n = 10,000 gives 0.333333 — and the exact value is 1/3, which the page names. The trapezoid estimate beside it lands within 0.0000004 of the same truth: the gap between the two methods is the error story told in numbers. Simpson fits parabolas through the curve in pairs of intervals and carries an O(h⁴) error; the trapezoid fits flat lines and pays O(h²).
Formula
S = (h/3)·(f₀ + 4f₁ + 2f₂ + 4f₃ + … + fₙ)
h = (b − a)/n · n even, always
weights 1, 4, 2, 4, …, 4, 1 — every pair of intervals carries a parabola instead of a straight line.
Worked Example
- Parse and bracket. the expression rides the site grammar (radians); a must be strictly below b.
- Walk the interval. 10,000 subintervals, weights 1-4-2-4-…-4-1, step h = (b − a)/n. Any sample that refuses (a pole) stops the walk with the point named.
- Compare. the trapezoid estimate is printed beside Simpson — the gap between the two is the page’s honest error display.
The known values make the honesty checkable: x² on [0, 1] is exactly 1/3 (the page names it), sin on [0, pi] is exactly 2, and sqrt on [0, 1] is 2/3. Simpson hits each to six printed places at n = 10,000 — and where no exact value exists, the trapezoid gap is the only honesty available, so it is printed.
Strengths & Limits Of This Model
Where this engine is strong
- Trapezoid beside Simpson — the gap is a visible error bar
- Exact values named when known, so the method is checkable
Where it stops
- No improper integrals
- No double integrals
Practical Use Cases
Areas under curves
the classic — including ones with no antiderivative
Physics totals
distance from speed, work from force
Probability sketches
areas under bell-ish curves without a table
Methodology & Editorial Standards
Expression parsed with the site grammar (radians, variable x). Composite Simpson with n = 10,000 (even): h = (b − a)/n, weights 1, 4, 2, 4, …, 4, 1. The composite trapezoid at the same n is printed beside it. a < b enforced; any non-finite sample (pole) aborts with the sample point named. Known exact values are named on the card when the default chips produce them.
Computation runs in IEEE-754 double precision at full internal precision; rounding to two decimal places occurs strictly at the display layer, so no cumulative drift enters the result. All monetary outputs use accounting presentation — grouped thousands, two decimals, negatives in parentheses — so figures can be transcribed directly into a model or working paper. Division-by-zero and out-of-domain inputs return an em-dash rather than a misleading number.
This engine was reconciled against an independent reference implementation and hand-verified for the worked example above before release. Our full five-stage review process is published on the About Us page.
Disclaimer. This calculator is provided for informational and modelling purposes only and does not constitute financial, tax, legal, medical, or engineering advice. Verify all figures with a qualified professional before acting on them.
Integral Calculator — 9 Expert FAQs
9 analyst-written answers to the questions practitioners actually ask — optimised for voice and answer-engine retrieval.
What is a definite integral measuring?
Signed area between the curve and the axis, from a to b. Above the axis counts positive, below counts negative — which is why the walk refuses nothing for dipping but refuses a POLE for exploding. Distance from speed, charge from current, probability from density: any “rate accumulated” question is an integral.
Why must n be even for Simpson?
Because the rule works in PAIRS: every two subintervals get one parabola fitted through their three points, and a leftover single interval would need a different rule. n = 10,000 is comfortably even; the weights 1, 4, 2, 4, …, 4, 1 only make sense in that paired rhythm.
Why show the trapezoid estimate too?
Because the gap between the two is an honest error display. The trapezoid fits straight lines (error order h²); Simpson fits parabolas (error order h⁴). When both agree to six places the answer is settled; when they disagree, the disagreement is the error bar no single number could confess.
How accurate is 10,000 subintervals?
For smooth functions, to the printed six places and beyond — the h⁴ law at h = (b−a)/10,000 is brutally small. The known values prove it: 1/3, 2/3 and 2 all print exact to six decimals. Curves with sharp features or unbounded derivatives (sqrt near zero) converge more slowly, which is why the page still names the method instead of claiming magic.
What happens at a pole inside the interval?
The walk stops and names the point. A pole is not a dip — the function explodes there, the signed area is not defined, and averaging across it would fabricate a number. The refusal is the same honesty the Equation Solver applies to poles that fake sign changes.
Why radians again?
Same reason as the derivative page: the integral of sin from 0 to π is exactly 2 only in radians. Degrees would smuggle a π/180 into every sample. The chip [0, pi] is written with the pi constant so the double never drifts.
Does the page find antiderivatives?
No — and the scope is the point. This page measures the area numerically; it does not do symbolic algebra. When the antiderivative is known (1/3 for x², 2 for sin) the page names the exact value beside the measurement so the two can be compared; when it is not, the numeric answer is the answer, trapezoid gap attached.
Can a and b be negative or decimals?
Any finite numbers with a strictly below b. Negative spans measure honestly (negative function values subtract from the signed area), decimals ride through in double precision, and the bracket refusal names the fix when a and b arrive reversed or equal.
What does the h in the formula actually represent?
The width of one subinterval: (b − a)/n. On the default that is 0.0001 — ten thousand skinny slices. The error laws are written in h: trapezoid pays h², Simpson pays h⁴, which is why halving h improves the trapezoid 4× but Simpson 16×. The formula card prints h with the weights.