Simpson's rule: finding the area under a parabola
The area under a parabola between two x-values can be found using a weighted average of the y-values at these points with y-value at the midpoint:
This splits the area into two strips of width h.
The total area is:
In the diagram below the coefficients of the quadratic can be varied with the sliders and the points P and Q can be moved along the x-axis.