Math Solver Free

Definite Integral Calculator

Numeric integration with Simpson's rule — subinterval working shown.

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

  1. 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).
  2. Enter the Lower limit a and the Upper limit b.
  3. Press Evaluate Integral.
  4. 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

  1. 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.
  2. 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.
  3. 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.

Frequently Asked Questions

What is a definite integral?

A definite integral measures the accumulated total of a function between two limits — geometrically, the signed area between the curve, the x-axis, and the lines x = a and x = b. It is computed with the Fundamental Theorem of Calculus: if F is an antiderivative of f, the integral equals F(b) − F(a). Unlike an indefinite integral, the answer is a single number, with no +C.

What is Simpson's rule?

Simpson's rule approximates the area under a curve by fitting short parabolic arcs through triples of sample points, instead of the straight lines the trapezoidal rule uses. With slice width h = (b − a)/n and an even number n of slices, it computes (h/3)[f(x₀) + 4f(x₁) + 2f(x₂) + 4f(x₃) + … + f(xₙ)]. The alternating 4, 2, 4 pattern of weights is the signature of the method.

How accurate is the numeric result?

For smooth functions, extremely accurate: this calculator uses n = 1000 subintervals, and Simpson's error shrinks with the fourth power of the slice width, so results typically match the exact value to many decimal places. It is still a numerical approximation rather than a symbolic proof, and functions with sharp spikes or jumps inside the interval can mislead it — which is why the tool also shows an exact value for standard forms.

Why can a definite integral be negative?

Because it measures signed area. Where the curve runs below the x-axis, its contribution counts as negative, so an integral can be small, zero, or negative even though the region has positive geometric area. Integrating sin(x) from 0 to 2π, for example, gives exactly 0: the positive hump above the axis cancels the equal negative hump below it. For total geometric area, integrate the absolute value instead.

What happens if I swap the lower and upper limits?

The sign flips. By definition, integrating from b down to a is the negative of integrating from a up to b, because F(a) − F(b) = −(F(b) − F(a)). So the integral of x² from 0 to 3 is 9, while the same integral entered from 3 to 0 is −9. This calculator accepts the limits in either order, so if an answer carries an unexpected minus sign, check the boxes.

Is this definite integral calculator free?

Yes. Every calculator on Math Solver Free is completely free, with no sign-up, no account, and no usage limits. All calculations run locally in your browser, so your functions are never uploaded or stored, and you can use the tool as many times as you like, on any device.

Related Tools & Guides

About the MathSolverFree Team

The MathSolverFree Team builds and maintains the calculators and step-by-step solvers on this site. Every tool is checked against worked textbook examples before it is published, and the method behind each solver is written out in full — in the worked examples on the page and in our guides — so you can see exactly how an answer is reached, not just the answer itself.

How we build and test our tools·More about the team