Definite Integral Calculator for Quadratics (Exact, Trapezoidal & Simpson’s Rule)

Evaluate area under a quadratic curve f(x) = ax² + bx + c on [x₁, x₂].

Exact Definite Integral Value 126
Trapezoidal Rule (n = 10) 126.36
Simpson’s Rule (n = 10) 126
Mean Value of Function on [x₁, x₂] 21
Inputs
Try:
Quadratic coefficient a in f(x) = ax² + bx + c.
Linear coefficient b.
Constant term c.
Lower integration limit x₁.
Upper integration limit x₂.
Results & Graph
Exact Definite Integral Value
126
Trapezoidal Rule (n = 10)
126.36
Simpson’s Rule (n = 10)
126
Mean Value of Function on [x₁, x₂]
21
Antiderivative at Upper Bound F(x₂)
126
Antiderivative at Lower Bound F(x₁)
0

Exact Definite Integral Value

Graph 1 • How the inputs feed Definite Integral
Definite Integral (Simpson’s Rule & Calculus Power Rule) Calculator • Custom Domain Schematic (Calculus & Numerical Analysis) coeffAcoeffBDefinite Integral Coeff A: 1 • Coeff B: 2 EXACT DEFINITE INTEGRAL VA 126 • Trapezoidal Rule (n = : 126.36 • Simpson’s Rule (n = 10: 126 Eq: ∫_{x₁}^{x₂} (ax² + bx + c) dx =
Graph 2 • Exact Definite Integral Value as Coeff A changes (40% to 160% of current)
0 93.06 186.1 82.80 0.400 97.20 0.600 111.6 0.800 126 1 140.4 1.20 154.8 1.40 169.2 1.60
Graph 3 • Coeff A and Coeff B together Compares Exact Definite Integral Value when Coeff B is shifted +25% (solid) vs. −25% (dashed).
0 86.13 172.3 --- Coeff B @ 75% 113.4 -30% 124.2 -15% 135 +0% 145.8 +15% 156.6 +30%
Summary: The definite integral of (1x² + 2x + 3) from x = 0 to 6 is 126 (average value = 21).
Summary: The definite integral of (1x² + 2x + 3) from x = 0 to 6 is 126 (average value = 21).
Interactive chart & math engine powered by CalculatorGraph

Formula: Definite Integral Mathematical Identity

∫x₁^{x₂} (ax² + bx + c) dx = [ (a/3)x³ + (b/2)x² + cx ]x₁^{x₂}
∫_{x₁}^{x₂} (ax² + bx + c) dx = [ (a/3)x³ + (b/2)x² + cx ]_{x₁}^{x₂}
  • coeffA: Coeff A (numeric parameter)
  • coeffB: Coeff B (numeric parameter)
  • coeffC: Coeff C (numeric parameter)
  • lowerX1: Lower X1 (numeric parameter)
  • upperX2: Upper X2 (numeric parameter)

Frequently Asked Questions

What mathematical formula does the Definite Integral (Simpson’s Rule & Calculus Power Rule) Calculator use?

It directly evaluates ∫_{x₁}^{x₂} (ax² + bx + c) dx = [ (a/3)x³ + (b/2)x² + cx ]_{x₁}^{x₂} in double-precision floating-point arithmetic and updates all supporting invariants and graphs live.

Why does my trapezoid estimate always come out higher than the calculator?

If the leading coefficient a is positive, the parabola bends upward and every straight chord sits above the curve. The trapezoids therefore include a sliver of extra area in each strip. On the default curve that extra is exactly h squared, which is why the ten-strip line reads 126.36. With a negative a the chords sit below the curve and the trapezoid comes out lower instead.

Can I use Simpson's rule with an odd number of strips?

Not the standard one-third rule. It pairs strips, so n must be even. With an odd count you can apply Simpson's three-eighths rule to the last three strips and the one-third rule to the rest. For any quadratic on this page the result is still exact, so the calculator's value is the target either way.

What does the mean value of 21 mean on the default?

It is the constant height a flat line would need over 0 to 6 to enclose the same signed area, 126 divided by the width 6. The mean value theorem for integrals guarantees the curve actually passes through that height somewhere inside the interval. For x² + 2x + 3 that happens a little past x = 3.

Does the calculator handle negative or decimal limits?

Yes. The antiderivative is evaluated at whatever numbers you enter, including negatives and decimals. The example with a = -1, c = 4 on -3 to 3 returns 6. Just remember the output is signed area, so parts of the curve below the axis subtract from the total.

How many trapezoid strips would I need to get within 0.01 of the exact answer?

On the default curve the error is h squared, so you need h no larger than 0.1. Over an interval of width 6 that is 60 strips. For a different quadratic the error is (b minus a) times h squared times |a| divided by 6, so you can solve the same inequality for your own coefficients.

Why does the page list F(x₂) and F(x₁) separately?

The page is showing the two halves of the fundamental theorem: F at the upper bound minus F at the lower bound. Seeing both lets you spot an arithmetic slip in your own work. On the default F(0) is 0, so the upper value alone equals the answer, which will not be true once the lower limit moves away from zero.

Is the antiderivative's constant of integration ignored?

It cancels. Any constant you add to F appears in both F(x₂) and F(x₁) and disappears when you subtract. The engine uses the version with no constant, which is why the lower-bound line reads exactly 0 on the default. Your own antiderivative might differ by a constant and still give the same definite integral.

Can I check a midpoint-rule estimate with this page?

Yes. The midpoint rule underestimates an upward-bending curve by half as much as the trapezoid overestimates it. On the default that error is h squared over two. With one strip, the midpoint value is 6 times f(3), or 6 times 18, which lands eighteen below the exact answer. Running the page gives you the exact figure to compare against.

Why does changing c by 1 change the answer by exactly 6?

The constant term c contributes c times the interval width to the integral. On the default interval the width is 6, so each unit of c adds 6. The same reasoning gives b a contribution of b times (x₂ squared minus x₁ squared) over 2, which is 18 per unit of b on the default.

What happens if I set a, b and c all to zero?

The function is zero everywhere, so the integral and the mean value are both zero for any limits. That is a quick sanity check that the boxes are reading your entries. Setting only a and b to zero leaves a constant function, and the answer becomes c times the width, a rectangle you can verify in your head.

Is this the same as finding the area between two curves?

Only if you subtract the curves first. For two quadratics, compute the difference of their coefficients term by term, enter that as a, b and c, and integrate between the points where they cross. The result is the area between them, provided the same curve stays on top across the whole interval.

Working the default parabola by hand

Out of the box the page integrates f(x) = x² + 2x + 3 from x = 0 to x = 6 and returns 126 as the exact value. You can check that in under a minute, and doing so once is the best way to trust the tool for your own numbers.

The antiderivative is F(x) = x³/3 + x² + 3x. At the upper bound that is 6³/3 + 6² + 3 × 6, which is 72 + 36 + 18, or 126 in total. At the lower bound every term has a factor of x, so F(0) = 0. Subtract and you get 126, exactly the figure shown, with the two supporting lines reporting F(x₂) = 126 and F(x₁) = 0.

The mean value line, 21, is the integral divided by the width of the interval: 126 over 6. It is the height of a rectangle on [0, 6] that has the same area as the region under the curve. The function itself starts at 3 and climbs to 51, so 21 sits well below the midpoint of those two heights. That is what you expect from a curve that bends upward: most of its height is gained near the right-hand end.

Nothing here is approximated. The engine evaluates the closed-form antiderivative, so the answer is exact to the display precision for any quadratic you type in.

The n = 10 trapezoid and Simpson lines

Under the exact value the page prints two numerical estimates, each using ten equal strips. On the default the trapezoidal rule gives 126.36 and Simpson's rule gives 126 exactly. The strip count is fixed at ten, so to see how the trapezoid improves as strips are added you work a few by hand, using the exact answer as the yardstick.

The composite trapezoidal rule with n equal strips of width h is (h/2)[f₀ + 2(f₁ + ... + fₙ₋₁) + fₙ]. Composite Simpson's rule needs an even n and weights the points 1, 4, 2, 4, ..., 4, 1: (h/3)[f₀ + 4(sum of odd-indexed values) + 2(sum of even-indexed interior values) + fₙ].

Try both on the default curve. With one strip, h = 6, the trapezoid gives 3 × (3 + 51), which is 162 for the single chord. That overshoots the exact 126 by 36. With two strips, h = 3, the middle value is f(3) = 18 and the trapezoid lands nine above the exact answer. With six strips of width 1 it lands just one above.

Simpson's rule with only two strips gives (3/3)(3 + 4 × 18 + 51), which is 126 on the nose, the same as the page's ten-strip Simpson line. That is not luck, and the next section explains why.

Why Simpson's rule is exact for any quadratic

Simpson's rule works by fitting a parabola through each pair of strips and integrating that parabola exactly. If the function you feed it already is a parabola, the fitted curve is the function itself and there is nothing left to approximate. So for every input this calculator accepts, Simpson's rule with any even number of strips returns the same number as the exact integral.

In fact it does better than that. The error term for Simpson's rule depends on the fourth derivative of f, so it is also exact for cubics. That surprises people the first time they see it, but it follows from the symmetry of the 1, 4, 1 weights.

For a student this gives a clean self-test. Type your quadratic into the page, note the exact value, then compute Simpson by hand with two strips. If the two disagree, the mistake is in your arithmetic, usually a misplaced weight of 2 where a 4 belongs, or an odd number of strips. The rule is not wrong; the bookkeeping is.

The trapezoid error on this curve is exactly h squared

The trapezoidal rule's error for a smooth function is (b − a)h²f''/12, with a sign that makes the trapezoid overestimate when the curve bends upward. For a quadratic the second derivative is the constant 2a, so the formula is exact rather than an estimate.

On the default, a = 1 and b − a = 6, so the error is 6 × h² × 2 / 12, which simplifies to h². That matches the hand results above: 36 for h = 6, 9 for h = 3, 1 for h = 1. Halving the strip width cuts the error to a quarter, which is what second-order convergence means in practice.

Change the leading coefficient and the error scales with it. At a = 1.5 the exact integral is 162, as the Higher scenario on the page shows, and the trapezoid error becomes 1.5h². With ten strips h is 0.6, so the page's trapezoid line reads 162.54, which is 1.5 × 0.36 above the exact value, just as the default's 126.36 is 0.36 above. At a = 0.6 the exact value is 97.2 and the error is 0.6h². If a is negative the curve bends downward and the trapezoid underestimates instead. If a is zero the function is a straight line and the trapezoidal rule is exact with a single strip.

Signed area versus the area you shade

A definite integral counts area below the x-axis as negative. The calculator reports that signed total, not the geometric area you might shade on a sketch, and the difference catches people every term.

Try a = -1, b = 0, c = 4 on [-3, 3]. The parabola is above the axis between -2 and 2 and below it outside that range. The page returns 6, with a mean value of 1. The positive hump contributes 32/3 and the two dips beyond ±2 contribute 7/3 each with a minus sign, and 32/3 − 14/3 is 6.

If your question asks for total area, find the roots of ax² + bx + c inside your interval, split the interval at them, run each piece separately, and add the absolute values. For that example the three pieces are [-3, -2], [-2, 2] and [2, 3], and the total area comes to 46/3, a bit over 15, far more than the 6 the single run shows.

Physics problems usually want the signed version. Displacement from a velocity curve, for instance, should cancel when motion reverses.

Entering limits in the wrong order

Swap the bounds on the default, lower 6 and upper 0, and the answer becomes -126 instead. That is correct mathematics: reversing the limits flips the sign of a definite integral. But if you meant the area from 0 to 6 and typed the boxes the other way round, a negative result is the clue.

The mean value line stays at 21 in that case, because the engine divides a negative integral by a negative width. So the average looks right while the main answer has the wrong sign. Check the sign of the headline figure first.

Setting both limits to the same value gives an integral of 0, which is right. The mean value line then switches to the function's value at that point, since the average over a single point is just f there. With both limits at 2 on the default curve it reads 11, which is 4 + 4 + 3.

So when a negative answer surprises you, look at the two limit boxes before you look at the coefficients.

Reading the coefficient boxes correctly

The three coefficient boxes are a, b and c in ax² + bx + c, in that order. A common slip is entering a polynomial written as 3 + 2x + x², reading left to right, and putting 3 in the first box. That integrates 3x² + 2x + 1 instead, which over [0, 6] is a different curve entirely.

If a term is missing, enter 0 for it rather than leaving the box blank, so you know what the engine is using. For a straight line set a = 0. For a pure parabola through the origin set b and c to 0.

Because the result is linear in each coefficient, you can predict changes before running them. Each unit of a adds (x₂³ − x₁³)/3 to the answer, which is 72 on the default interval. That is why moving a from 1 to 1.5 adds 36, taking 126 to 162, and moving it down to 0.6 takes away 28.8, leaving 97.2.

When this page is the right tool

Use it when your integrand really is a quadratic: projectile height over time, a parabolic arch profile, a quadratic cost curve, a velocity that changes at a steady rate. It is quick, exact and easy to cross-check.

It will not integrate sin x, eˣ or a cubic. For those you need either a symbolic antiderivative or a numerical rule with enough strips, and the error behaviour above becomes an estimate rather than an exact statement. The h² pattern is still a good guide for the trapezoidal rule on smooth curves, and Simpson's rule still converges much faster, roughly sixteen times less error each time you halve h.

For homework that asks you to compare methods on a quadratic, the page gives you the exact value and both ten-strip estimates side by side. Compute estimates with other strip counts by hand, subtract the exact answer, and you have the errors to discuss.