Integration Tool

Calculate the area under any polynomial curve between two points.

Calculate the area under a curve between two points. Enter polynomial coefficients and integration limits — see the numerical integral value using the trapezoidal rule. Assumes polynomial functions of the form ax³ + bx² + cx + d.

Updated June 2026 · How this works

Worth knowing
How It Works
The formula, explained simply

Integration measures the area between a curve and the x-axis, but unlike finding the area of a rectangle, curved boundaries make exact calculation impossible without calculus. The trapezoidal rule solves this by slicing the area into thin vertical strips, treating each strip as a trapezoid instead of trying to follow the curve exactly. More strips mean better accuracy, just like using finer sandpaper gives a smoother finish.

This calculator uses polynomial functions of the form ax³ + bx² + cx + d, which covers most practical applications from physics to economics. Leave any coefficient blank or zero if your function doesn't need that term — for example, enter only the 'c' coefficient for a simple linear function like y = 5x. The trapezoidal rule works by calculating the function value at each strip boundary, then averaging adjacent heights to form trapezoids.

The integration limits define where to start and stop measuring area. Unlike indefinite integrals that give general formulas, definite integrals give specific numerical answers representing actual area. Negative results occur when the function spends more area below the x-axis than above it — think of it as debt canceling out profit in a business context.

When To Use This
Right tool, right situation

Use numerical integration when you need the actual area value rather than a symbolic formula. In physics, this calculates work done by a variable force, displacement from velocity curves, or energy stored in non-linear systems. In economics, it finds total cost from marginal cost functions, consumer surplus from demand curves, or cumulative production over time with varying rates.

Numerical integration excels for functions where analytical integration becomes messy or impossible. While x² integrates easily to x³/3, real-world functions often combine exponentials, trigonometric terms, and polynomials in ways that resist symbolic integration. The trapezoidal rule handles any continuous function you can evaluate point by point.

Choose this tool over analytical methods when you want a specific numerical answer quickly, especially for engineering estimates, financial projections, or scientific measurements. Reserve analytical integration for deriving general formulas, proving mathematical relationships, or when you need exact symbolic expressions rather than decimal approximations.

Common Mistakes
Why results sometimes look wrong

The biggest mistake is confusing negative integrals with calculation errors. Integration gives signed area — regions below the x-axis contribute negative values, regions above contribute positive values. If your polynomial dips negative anywhere in the integration interval, the final result may be negative even if the function endpoints are positive. Graph your function mentally or check a few intermediate values to understand where it crosses the x-axis.

Another common error is setting integration limits backwards (upper limit smaller than lower limit). This calculator checks for this condition and returns no result rather than a confusing negative area. Always verify that your upper limit is actually greater than your lower limit, and that both limits make physical sense for your problem context.

Using too few intervals undermines accuracy, especially for rapidly changing functions. While 100 intervals might work for a simple linear function, cubic polynomials with steep curves need 1000+ intervals for reliable results. Don't assume more intervals always help — beyond 10,000 intervals, computational rounding errors can accumulate and actually worsen the result for most polynomial functions.

The Math
Worked examples and deeper derivation

The trapezoidal rule approximates the definite integral ∫[a to b] f(x)dx by dividing the interval [a,b] into n equal subintervals of width h = (b-a)/n. At each boundary point x₀, x₁, x₂, ..., xₙ, the function value f(xᵢ) becomes the height of a trapezoid. The area formula for each trapezoid is h/2 × (f(xᵢ) + f(xᵢ₊₁)), and the total integral approximation is h/2 × [f(x₀) + 2f(x₁) + 2f(x₂) + ... + 2f(xₙ₋₁) + f(xₙ)].

For a cubic polynomial f(x) = ax³ + bx² + cx + d integrated from 0 to 2 with 4 intervals (h = 0.5), the calculation evaluates f(0), f(0.5), f(1.0), f(1.5), and f(2.0), then applies the trapezoidal weights. The exact analytical integral would be [ax⁴/4 + bx³/3 + cx²/2 + dx] evaluated from 0 to 2, but numerical methods work when analytical solutions become complex or impossible.

Error in the trapezoidal rule is proportional to h², meaning doubling the number of intervals (halving h) reduces error by a factor of 4. For smooth polynomials, 1000 intervals typically gives error less than 0.01%. The method fails for functions with discontinuities or infinite derivatives within the integration interval, where specialized techniques are needed.

Area under a parabola
Function: x², limits: 0 to 3, intervals: 1000
The integral equals 9.0000, representing the area under the parabola y = x² from x = 0 to x = 3.
Linear function integration
Function: 2x + 1, limits: 0 to 2, intervals: 1000
The integral equals 6.0000, which is the area under the line y = 2x + 1 between x = 0 and x = 2.
Cubic polynomial
Function: x³ - 2x² + x, limits: 0 to 2, intervals: 1000
The integral equals -0.6667, indicating the function has more area below the x-axis than above in this interval.
Expert Unlock
The thing most explanations skip

The trapezoidal rule systematically underestimates integrals for concave-up functions and overestimates for concave-down functions. For alternating concavity, errors partially cancel, which is why it performs better on polynomials of degree 3+ than simple quadratics. Simpson's rule uses parabolic approximations instead of linear trapezoids and achieves O(h⁴) error compared to trapezoidal's O(h²), but requires an even number of intervals.

Why does my integral come out negative?

How accurate is numerical integration compared to analytical methods?
Numerical integration using the trapezoidal rule gives excellent accuracy for smooth functions. With 1000 intervals, the error is typically less than 0.01% for polynomial functions. Analytical integration gives exact answers but requires knowing calculus techniques.
Why does my integral come out negative when the function looks positive?
Integration calculates signed area. If your function dips below the x-axis anywhere in your interval, that area counts as negative. The final integral is the sum of positive areas above the x-axis minus negative areas below it.
How many intervals should I use for accurate results?
For most polynomial functions, 1000 intervals provides good accuracy. Use more intervals (up to 10,000) for functions that change rapidly or have sharp curves. Fewer intervals (100-500) work for simple linear or quadratic functions.

Need something this doesn't cover?

Suggest a tool — we'll build it →