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.
Contents
Formula
Simple Boole's rule
It approximates an integral
∫abf(x)dx
by using the values of f at five equally spaced points:
x0=a,x1=x0+h,x2=x0+2h,x3=x0+3h,x4=x0+4h=b.
It is expressed thus in Abramowitz and Stegun's Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables:
∫x0x4f(x)dx=2h45[7f(x0)+32f(x1)+12f(x2)+32f(x3)+7f(x4)]−8f(6)(ξ)h7945
for some number ξ between x0 and x4, and 945 = 1 × 3 × 5 × 7 × 9. 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:
Composite Boole's rule
In cases where the integration is permitted to extend over equidistant sections of the interval [a,b], the composite Boole's rule might be applied. Given N divisions, where N mod 4=0, the integrated value amounts to
∫x0xNf(x)dx=2h45[7(f(x0)+f(xN))+32∑i∈{1,3,5,…,N−1}f(xi)+12∑i∈{2,6,10,…,N−2}f(xi)+14∑i∈{4,8,12,…,N−4}f(xi)]+error term,
where the error term is similar to above. The following Common Lisp code implements the aforementioned formula:



