Boole's rule

From testwiki
Revision as of 02:45, 9 January 2025 by imported>Avraham (Collapsing other LISP implementation and adding one in R)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Template:Short description Template:Hatnote

In mathematics, Boole's rule, named after George Boole, is a method of numerical integration.

Formula

Simple Boole's Rule

It approximates an integral: abf(x)dx by using the values of Template:Mvar at five equally spaced points:Template:Sfn x0=ax1=x0+hx2=x0+2hx3=x0+3hx4=x0+4h=b

It is expressed thus in Abramowitz and Stegun:Template:Sfn x0x4f(x)dx=2h45[7f(x0)+32f(x1)+12f(x2)+32f(x3)+7f(x4)]+error term where the error term is 8f(6)(ξ)h7945 for some number Template:Tmath between Template:Tmath and Template:Tmath where Template:Nowrap.

It is often known as Bode's rule, due to a typographical error that propagated from Abramowitz and Stegun.Template:Sfn

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:Template:Sfn

x0xNf(x)dx=2h45(7(f(x0)+f(xN))+32(i{1,3,5,,N1}f(xi))+12(i{2,6,10,,N2}f(xi))+14(i{4,8,12,,N4}f(xi)))+error term

where the error term is similar to above. The following Common Lisp code implements the aforementioned formula:


See also

Notes

Template:Reflist

References

Template:Sfn whitelist

Template:Numerical integration