Boole's rule is a method of numerical quadrature arising in calculus, and named after George Boole. Boole's rule and the composite Boole rule approximate the area under a curve over a fixed interval using 5 equally spaced points, and is designed to exactly integrate 5th-order polynomials over that interval. It is a member of the Newton--Cotes family of rules.
It approximates an integral
by using the values of at five equally spaced points:
It is expressed thus in Abramowitz and Stegun's Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables:
for some number between and , and . It is sometimes erroneously referred to as Bode's rule, due to a typographical error that propagated from Abramowitz and Stegun.
The following constitutes a very simple implementation of the method in Common Lisp which ignores the error term:
In cases where the integration is permitted to extend over equidistant sections of the interval , the composite Boole's rule might be applied. Given divisions, where the integrated value amounts to
where the error term is similar to above. The following Common Lisp code implements the aforementioned formula: