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.

Formula

Simple Boole's rule

It approximates an integral ∫ a b f ( x ) d x {\displaystyle \int _{a}^{b}f(x)\,dx} by using the values of f at five equally spaced points: x 0 = a , x 1 = x 0 + h , x 2 = x 0 + 2 h , x 3 = x 0 + 3 h , x 4 = x 0 + 4 h = b . {\displaystyle {\begin{aligned}x_{0}&=a,\\x_{1}&=x_{0}+h,\\x_{2}&=x_{0}+2h,\\x_{3}&=x_{0}+3h,\\x_{4}&=x_{0}+4h=b.\end{aligned}}}

It is expressed thus in Abramowitz and Stegun's Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables: ∫ x 0 x 4 f ( x ) d x = 2 h 45 [ 7 f ( x 0 ) + 32 f ( x 1 ) + 12 f ( x 2 ) + 32 f ( x 3 ) + 7 f ( x 4 ) ] − 8 f ( 6 ) ( ξ ) h 7 945 {\displaystyle \int _{x_{0}}^{x_{4}}f(x)\,dx={\frac {2h}{45}}{\bigl [}7f(x_{0})+32f(x_{1})+12f(x_{2})+32f(x_{3})+7f(x_{4}){\bigr ]}-{\frac {8f^{(6)}(\xi )h^{7}}{945}}} for some number ⁠ξ {\displaystyle \xi }⁠ between ⁠x 0 {\displaystyle x_{0}}⁠ and ⁠x 4 {\displaystyle x_{4}}⁠, 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 ] {\displaystyle [a,b]}, the composite Boole's rule might be applied. Given N {\displaystyle N} divisions, where N {\displaystyle N} mod 4 = 0 {\displaystyle 4=0}, the integrated value amounts to ∫ x 0 x N f ( x ) d x = 2 h 45 [ 7 ( f ( x 0 ) + f ( x N ) ) + 32 ∑ i ∈ { 1 , 3 , 5 , … , N − 1 } f ( x i ) + 12 ∑ i ∈ { 2 , 6 , 10 , … , N − 2 } f ( x i ) + 14 ∑ i ∈ { 4 , 8 , 12 , … , N − 4 } f ( x i ) ] + error term , {\displaystyle \int _{x_{0}}^{x_{N}}f(x)\,dx={\frac {2h}{45}}\left[7{\big (}f(x_{0})+f(x_{N}){\big )}+32\sum _{i\in \{1,3,5,\ldots ,N-1\}}f(x_{i})+12\sum _{i\in \{2,6,10,\ldots ,N-2\}}f(x_{i})+14\sum _{i\in \{4,8,12,\ldots ,N-4\}}f(x_{i})\right]+{\text{error term}},} where the error term is similar to above. The following Common Lisp code implements the aforementioned formula:

See also

Notes