Three heights, one parabola

Simpson's Rule Calculator

Simpson’s rule replaces the curve with a parabola through three equally spaced heights. With one panel, h is half the distance from the left edge to the right edge, and the estimate is (h/3) × (y0 + 4×y1 + y2). For y = x² from 0 to 2, the heights are 0, 1, and 4, h is 1, and the estimate is 8/3, which matches the exact integral. This form is one panel only. It is not a sum over many strips.

The sample halfway between the edges. It is weighted by 4.

Estimate

2.6667

Panel width h
1.0000

Simpson’s 1/3 rule, one panel

  1. h = (right − left) / 2.
  2. Estimate = (h/3) × (y0 + 4×y1 + y2).
  3. The middle sample is the one at left + h.

Worked examples

Three dots, one fitted arch
Three samples on one parabola2.667

The estimate uses h/3 times the weighted heights. The picture follows the three samples you typed.

Integral of x² from 0 to 2

Heights 0, 1, and 4.

2.6667 · ≈ 1.0000

A flat line at height 1

From 0 to 2, every sample is 1. The area is 2.

2.0000 · ≈ 1.0000

Good for practice

  • A calculus check of one application of Simpson’s rule
  • The x² example that should return exactly 8/3
  • Seeing the middle sample counted four times

Do not treat as an official score

  • Averaging the three heights with equal weight
  • Using this when the middle reading is not halfway
  • Expecting a running sum of many panels. There is only one h

Frequently asked questions

Why is the middle multiplied by 4?

That is the weight in Simpson’s 1/3 rule. An equal average would be a different method (the trapezoid, roughly).

Can I paste ten strips?

Not in this form. Add the panels yourself, or use one panel as a check of the pattern.

Does it get polynomials of degree 3 exactly?

A single panel of Simpson’s rule is exact for quadratics, and the cubic error term is a separate story. The x² example is the check built into the tests.

What if the right edge is smaller?

The form rejects it. Swap the edges and the heights if you measured from the other side.

Sources and updates

Last reviewed .

  • Simpson’s 1/3 rule – One panel: (h/3)(y0 + 4y1 + y2), h = (b−a)/2.

Related calculators