for some number between and where 945 = 1 × 3 × 5 × 7 × 9.
It is often known as Bode's rule, due to a typographical error that propagated from Abramowitz and Stegun.[3]
The following constitutes a very simple implementation of the method in Common Lisp which ignores the error term:
(defunintegrate-booles-rule(fx1x5)"Calculates the Boole's rule numerical integral of the function F in the closed interval extending from inclusive X1 to inclusive X5 without error term inclusion."(declare(type(function(real)real)f))(declare(typerealx1x5))(let((h(/(-x5x1)4)))(declare(typerealh))(let*((x2(+x1h))(x3(+x2h))(x4(+x3h)))(declare(typerealx2x3x4))(*(/(*2h)45)(+(*7(funcallfx1))(*32(funcallfx2))(*12(funcallfx3))(*32(funcallfx4))(*7(funcallfx5)))))))
Composite Boole's Ruleedit
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 mod, the integrated value amounts to:[4]
where the error term is similar to above. The following Common Lisp code implements the aforementioned formula:
(defunintegrate-composite-booles-rule(fabn)"Calculates the composite Boole's rule numerical integral of the function F in the closed interval extending from inclusive A to inclusive B across N subintervals."(declare(type(function(real)real)f))(declare(typerealab))(declare(type(integer1*)n))(let((h(/(-ba)n)))(declare(typerealh))(flet((f[i](i)(declare(type(integer0*)i))(let((xi(+a(*ih))))(declare(typerealxi))(thereal(funcallfxi)))))(*(/(*2h)45)(+(*7(+(f[i]0)(f[i]n)))(*32(loopforifrom1to(-n1)by2sum(f[i]i)))(*12(loopforifrom2to(-n2)by4sum(f[i]i)))(*14(loopforifrom4to(-n4)by4sum(f[i]i))))))))
Sablonnière, P.; Sbibih, D.; Tahrichi, M. (2010). "Error estimate and extrapolation of a quadrature formula derived from a quartic spline quasi-interpolant". BIT Numerical Mathematics. 50: 843–862. doi:10.1007/s10543-010-0278-0.
boole, rule, widely, propagated, typographical, error, bode, rule, redirects, here, bode, titius, bode, mathematics, named, after, george, boole, method, numerical, integration, contents, formula, simple, boole, rule, composite, boole, rule, also, notes, refer. The widely propagated typographical error Bode s rule redirects here For Bode s Law see Titius Bode law In mathematics Boole s rule named after George Boole is a method of numerical integration Contents 1 Formula 1 1 Simple Boole s Rule 1 2 Composite Boole s Rule 2 See also 3 Notes 4 ReferencesFormula editSimple Boole s Rule edit It approximates an integral abf x dx displaystyle int a b f x dx nbsp by using the values of f at five equally spaced points 1 x0 ax1 x0 hx2 x0 2hx3 x0 3hx4 x0 4h b displaystyle begin aligned amp x 0 a amp x 1 x 0 h amp x 2 x 0 2h amp x 3 x 0 3h amp x 4 x 0 4h b end aligned nbsp It is expressed thus in Abramowitz and Stegun 2 x0x4f x dx 2h45 7f x0 32f x1 12f x2 32f x3 7f x4 error term 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 text error term nbsp where the error term is 8f 6 3 h7945 displaystyle frac 8f 6 xi h 7 945 nbsp for some number 3 displaystyle xi nbsp between x0 displaystyle x 0 nbsp and x4 displaystyle x 4 nbsp where 945 1 3 5 7 9 It is often known as Bode s rule due to a typographical error that propagated from Abramowitz and Stegun 3 The following constitutes a very simple implementation of the method in Common Lisp which ignores the error term defun integrate booles rule f x1 x5 Calculates the Boole s rule numerical integral of the function F in the closed interval extending from inclusive X1 to inclusive X5 without error term inclusion declare type function real real f declare type real x1 x5 let h x5 x1 4 declare type real h let x2 x1 h x3 x2 h x4 x3 h declare type real x2 x3 x4 2 h 45 7 funcall f x1 32 funcall f x2 12 funcall f x3 32 funcall f x4 7 funcall f x5 Composite Boole s Rule edit In cases where the integration is permitted to extend over equidistant sections of the interval a b displaystyle a b nbsp the composite Boole s rule might be applied Given N displaystyle N nbsp divisions where N displaystyle N nbsp mod 4 1 displaystyle 4 1 nbsp the integrated value amounts to 4 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 displaystyle int x 0 x N f x dx frac 2h 45 left 7 f x 0 f x N 32 left sum i in 1 3 5 ldots N 1 f x i right 12 left sum i in 2 6 10 ldots N 2 f x i right 14 left sum i in 4 8 12 ldots N 4 f x i right right text error term nbsp where the error term is similar to above The following Common Lisp code implements the aforementioned formula defun integrate composite booles rule f a b n Calculates the composite Boole s rule numerical integral of the function F in the closed interval extending from inclusive A to inclusive B across N subintervals declare type function real real f declare type real a b declare type integer 1 n let h b a n declare type real h flet f i i declare type integer 0 i let xi a i h declare type real xi the real funcall f xi 2 h 45 7 f i 0 f i n 32 loop for i from 1 to n 1 by 2 sum f i i 12 loop for i from 2 to n 2 by 4 sum f i i 14 loop for i from 4 to n 4 by 4 sum f i i See also editNewton Cotes formulas Simpson s rule Romberg s methodNotes edit Boole 1880 p 47 Eq 21 Davis amp Polonsky 1983 Weisstein Sablonniere Sbibih amp Tahrichi 2010 p 852 References editBoole George 1880 1860 A Treatise on the Calculus of Finite Differences 3rd ed Macmillan and Company Davis Philip J Polonsky Ivan 1983 June 1964 Chapter 25 eqn 25 4 14 In Abramowitz Milton Stegun Irene Ann eds Handbook of Mathematical Functions with Formulas Graphs and Mathematical Tables Applied Mathematics Series Vol 55 Ninth reprint with additional corrections of tenth original printing with corrections December 1972 first ed Washington D C New York United States Department of Commerce National Bureau of Standards Dover Publications p 886 ISBN 978 0 486 61272 0 LCCN 64 60036 MR 0167642 LCCN 65 12253 Sablonniere P Sbibih D Tahrichi M 2010 Error estimate and extrapolation of a quadrature formula derived from a quartic spline quasi interpolant BIT Numerical Mathematics 50 843 862 doi 10 1007 s10543 010 0278 0 Weisstein Eric W Boole s Rule MathWorld Retrieved from https en wikipedia org w index php title Boole 27s rule amp oldid 1209110673, wikipedia, wiki, book, books, library,