An approximate value can be found for the definite integral
using the values of f(x) at equally spaced values of x between a and b. Divide the interval [a, b] into n equal subintervals of length h by the partition
where xi + 1 − xi = h = (b − a)/n. Denote f(xi) by fi, and let Pi be the point (xi, fi). If the line segment PiPi+1 is used as an approximation to the curve y = f(x) between xi and xi + 1, the area under that part of the curve is approximately the area of the trapezium shown in the figure, which equals . By adding up the areas of all the trapezia, the trapezium rule gives
as an approximation to the value of the integral. The error between this approximation and the definite integral is bounded above by
Simpson’s rule is significantly more accurate.