Area Under Curve Calculator
Approximate the area under f(x) = x² using trapezoidal, Simpson's, or midpoint rule. Compare with the exact answer.
About this calculator
This calculator approximates the area under the fixed curve f(x) = x² between a Lower and Upper Bound, letting you compare three numerical integration techniques — the trapezoidal rule, Simpson's rule, and the midpoint rule — against the exact analytic answer, (b³ minus a³) divided by 3. Of the boundary and interval inputs, the Upper Bound carries far more weight over the reported area than Number of Intervals does: because x² is a smooth, well-behaved curve, moving from 100 subdivisions to 90 or 110 changes the trapezoidal answer by less than the fifth decimal place the page actually displays, so the visible result barely shifts. That near-zero sensitivity is a Trapezoidal-rule fact, not a universal one — the Midpoint Rule has its own, differently-sized O(h²) error term for this curve, and at these bounds it is just barely large enough that the same 90-vs-110 nudge can flip the last displayed digit of Number of Intervals, even though the Trapezoidal default does not. The reported Error Estimate is not measured from the approximation itself — it's a textbook formula with the known second or fourth derivative of x² already plugged in.
For Simpson's Rule specifically, that formula multiplies by the curve's fourth derivative, and since a quadratic's fourth derivative is exactly zero, the Simpson's error readout always shows exactly 0 by design, regardless of how few intervals are chosen. That's not just a display quirk here: Simpson's Rule is mathematically exact for any polynomial up to degree 3, so for this fixed x² curve the readout of 0 is the mathematically correct answer, not an approximation of one — at the default bounds and interval count, the computed area and the exact area agree to all five displayed decimal places (0.33333). That exactness is a property of this specific curve, though, not of Simpson's Rule in general: it would stop being exact for a higher-degree or non-polynomial curve, which this calculator doesn't support since f(x) = x² is fixed.
Inputs
Results
Approximate Area
0.33335
How to Use This Calculator
- Enter the lower bound (a) and upper bound (b) of integration — the calculator approximates the area under the fixed function f(x) = x² across this interval.
- Set the number of intervals to control how finely the range is subdivided; more intervals generally improve accuracy.
- Choose a numerical method: Trapezoidal rule (linear segments), Simpson's rule (parabolic segments), or Midpoint rule.
- Increase the number of intervals for greater accuracy — Simpson's rule converges fastest for the same interval count.
- The shaded area chart visualizes f(x) = x² across [a, b].
- Compare the Approximate Area against the Exact Area and Error Estimate to see how closely the chosen method matches the true integral.
How the result changes with Upper Bound (b)
| Upper Bound (b) | Approximate Area |
|---|---|
| 0.5 | 0.04167 |
| 0.75 | 0.14063 |
| 1.5 | 1.12506 |
| 2.5 | 5.20859 |
What each input means
- Lower Bound (a)
- Lower limit of integration
- Upper Bound (b)
- Upper limit of integration
- Number of Intervals
- More intervals = more accurate approximation
- Method
- Numerical integration method
How this is calculated
Worked example, using the default values
- Identify Input Parameters4 parametersLower Bound (a) = 0, Upper Bound (b) = 1, Number of Intervals = 100, Method = 1 = 4 input(s) provided
- Calculate Approximate AreaApproximate Area0.33335 = 0.33335
- Calculate Error EstimateError Estimate0.000017 = 0.000017
Engine last updated . Checked against 4 independently-derived tests — how we verify calculators. Built by Paul Gunder, a software engineer, not a licensed financial, medical, or legal professional.
Frequently Asked Questions
Why doesn't raising the number of intervals change the displayed area?
Under the default Trapezoidal Rule, the area under x² is a smooth curve, and the method's error shrinks with the square of the interval width, so it converges extremely fast. Moving from 90 to 110 subdivisions changes the true approximation by a tiny fraction of a percent — far below the five decimal places the result actually rounds to — so the number on screen doesn't visibly move. Switch to the Midpoint Rule, though, and that same nudge can be just large enough to tip the last displayed digit, since its error term for this curve happens to sit closer to the rounding boundary at these bounds.
Why does Simpson's Rule always report an Error Estimate of exactly 0?
The error-estimate formula for Simpson's Rule depends on the curve's fourth derivative, and for the fixed test function x², that fourth derivative is exactly zero everywhere. The calculator's formula is built assuming that zero value, so the reported error comes out to precisely 0 no matter how coarse the interval count is — it reflects a built-in assumption about x², not a live measurement of the approximation's actual closeness.
What happens if I make the Upper Bound smaller than the Lower Bound?
The interval width becomes negative, which flips the sign of every term the trapezoidal, Simpson's, or midpoint sums add together, so the reported area comes out negative instead of raising an error. That's a legitimate mathematical convention — integrating backward across an interval reverses the sign of the result — but it can look wrong if you weren't expecting a negative number for a shape sitting above the x-axis.
Which of the three methods is most accurate for this particular curve?
For the fixed function x², Simpson's Rule converges dramatically faster than either the trapezoidal or midpoint rule, because Simpson's Rule is built to integrate a quadratic exactly with no leftover error term at all — the same reason its error estimate always reports 0. In practice all three land very close to the exact answer once the interval count reaches the hundreds, but Simpson's gets there with far fewer intervals needed.
Related Calculators
The questions that sit next to this one — chosen by subject, including calculators filed under a different category.
Integral Calculator
Calculate definite integrals of polynomial, trigonometric, and exponential functions over any interval.
Calculus ToolsArc Length Calculator
Calculate the arc length of linear, quadratic, and circular curves between two points using numerical integration.
Calculus ToolsDerivative Calculator
Calculate the derivative of polynomial, trigonometric, exponential, and logarithmic functions at any point.
More in Math & Statistics.