Definite Integral Calculator

Evaluate a definite integral between two limits and see the shaded area under the curve.

Definite Integral Calculator

What Is a Definite Integral?

A definite integral, written ∫ₐᵇ f(x) dx, computes the net signed area between the curve y = f(x) and the x-axis, from x = a to x = b. "Signed" matters: area where f(x) is above the x-axis counts as positive, and area where f(x) dips below counts as negative, so the two can partially cancel. Definite integrals show up constantly in applications — total distance from a velocity function, total accumulated cost, probability from a density function, and more.

The Fundamental Theorem of Calculus connects definite integrals back to antiderivatives: if F(x) is any antiderivative of f(x), then ∫ₐᵇ f(x) dx = F(b) − F(a). That's what makes definite integrals computable symbolically whenever a closed-form antiderivative exists — no need to sum infinitely many rectangles by hand.

How to Use This Calculator

Enter your function and the two bounds a and b. The calculator tries two independent methods and shows both: it looks for a symbolic antiderivative F(x) and evaluates F(b) − F(a) directly, and it also computes a high-precision numerical approximation using Simpson's rule (a method that fits parabolas through sample points rather than straight lines, converging extremely quickly even for tricky functions). When a closed form exists, the two methods should match to several decimal places — the graph shades the region being measured so you can see exactly what area the number represents.

Why Two Methods?

Many functions that show up in real applications — like e−x², central to probability and statistics — have no elementary closed-form antiderivative at all, even though the definite integral over any interval is a perfectly well-defined, computable number. Simpson's rule handles those cases gracefully, giving you an accurate numeric answer regardless of whether a tidy symbolic formula exists.

Worked Example

Evaluate ∫₀² x² dx. An antiderivative of x² is x³/3, so by the Fundamental Theorem of Calculus:

∫₀² x² dx = [x³/3]₀² = (2³/3) − (0³/3) = 8/3 ≈ 2.667

Try entering x^2 with bounds 0 and 2 above — the calculator's symbolic and numeric methods should both land on 8/3 ≈ 2.6667.

Common Mistakes to Avoid

  • Forgetting definite integrals can be negative. If f(x) is below the x-axis on all or part of [a, b], the signed area — and the integral — can be negative or partially cancel.
  • Reversing the bounds without a sign flip. ∫ᵦᵃ f(x)dx = −∫ₐᵇ f(x)dx; swapping the limits of integration flips the sign of the result.
  • Assuming area always means "positive area." The definite integral gives signed (net) area. To find total unsigned area when a function crosses the x-axis, you need to split the interval and take absolute values piece by piece.

Real-World Applications of Definite Integrals

Definite integrals compute totals from rates, over a specific window — which is why they show up everywhere quantities accumulate. Total distance traveled is the definite integral of a velocity function over a time interval; total work done by a variable force is the definite integral of that force over a displacement; total revenue over a launch period is the definite integral of a revenue-rate function over that time span. In each case, the definite integral converts "how fast is it happening right now" into "how much happened in total," which is often the number that actually matters for a decision.

In probability and statistics, definite integrals compute the probability that a continuous random variable falls within a range: if f(x) is a probability density function, ∫ₐᵇ f(x) dx gives the probability of an outcome between a and b — this is exactly how probabilities are read off a normal distribution curve or any other continuous distribution. In physics and engineering, definite integrals compute quantities like the total charge that has flowed through a circuit (integrating current over time), the center of mass of an irregularly shaped object (integrating a density-weighted position), and fluid pressure on a submerged surface (integrating pressure, which varies with depth, over the surface's area). Each of these is a direct application of "area under a curve" generalized to whatever physical quantity the curve represents.

Frequently Asked Questions

What's the difference between this and the Indefinite Integral Calculator?

The Integral Calculator finds a general antiderivative formula with a "+ C". This tool evaluates that antiderivative (or a numerical equivalent) between two specific bounds, producing one concrete number.

How accurate is the numerical (Simpson's rule) result?

Very accurate for smooth, continuous functions — Simpson's rule error shrinks with the fourth power of the step size, so with thousands of subintervals (which this calculator uses by default) the result is typically correct to at least 6–8 significant figures, matching or exceeding textbook precision.

Can a definite integral be negative?

Yes. A definite integral measures signed area — regions where the function is below the x-axis contribute negative area. For example, ∫₀^{2π} sin(x) dx = 0, because the positive and negative halves of the sine wave exactly cancel.

What happens if the function is undefined somewhere in [a, b]?

If f(x) has a vertical asymptote or other discontinuity inside the interval, the integral may be improper and could diverge to infinity. This calculator's numerical method treats non-finite sample values as zero to avoid crashing, but the reported answer may not be mathematically meaningful in that case — inspect the graph to check for discontinuities before trusting the result.

Why do the symbolic and numeric methods sometimes show slightly different values?

When they differ, it's almost always tiny floating-point rounding in the last decimal place or two, since Simpson's rule is an approximation (an extremely close one with thousands of subintervals) while the symbolic method is exact. A meaningful mismatch — differing by more than a small fraction of a percent — usually signals a discontinuity or asymptote somewhere in the interval that's affecting the numerical estimate.

Can I use this for improper integrals with infinite bounds?

Not directly — this calculator expects two finite numeric bounds. Improper integrals with an infinite bound or an asymptote at an endpoint require a limiting process (evaluating the integral up to a large finite bound and taking a limit), which is a planned addition to a future, dedicated improper integral tool.