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

edit

Simple Boole's rule

edit

It approximates an integral by using the values of f at five equally spaced points:[1]

It is expressed thus in Abramowitz and Stegun's Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables:[2] for some number between and , 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.[3]

The following constitutes a very simple implementation of the method in Common Lisp which ignores the error term:

Example implementation in Common Lisp
(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 , 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:

Example implementation in Common Lisp
(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))))))))
Example implementation in R
booleQuad <- function(fx, dx) {
  # Calculates the composite Boole's rule numerical 
  # integral for a function with a vector of precomputed
  # values fx evaluated at the points in vector dx.
  n <- length(dx)
  h <- diff(dx)
  stopifnot(exprs = {
    length(fx) == n
    n > 8L
    h[1L] >= 0
    n >= 2L
    n %% 4L == 1L
    isTRUE(all.equal(h, rep(h[1L], length(h))))
  })
  nm2 <- n - 2L
  cf <- double(nm2)
  cf[seq.int(1, nm2, 2L)] <- 32
  cf[seq.int(2, nm2, 4L)] <- 12
  cf[seq.int(4, nm2, 4L)] <- 14
  cf <- c(7, cf, 7)
  sum(cf * fx) * 2 * h[1L] / 45
}

See also

edit

Notes

edit

References

edit
  • Boole, 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.
  • 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 (4): 843–862. doi:10.1007/s10543-010-0278-0.
  • Weisstein, Eric W. "Boole's Rule". MathWorld.

📚 Artikel Terkait di Wikipedia

Newton–Cotes formulas

Graphs, and Mathematical Tables. Dover. p. 886. ISBN 978-0-486-61272-0. Booles Rule at Wolfram Mathworld, with typo in year "1960" (instead of "1860") M

George Boole

1855, Boole married Mary Everest (niece of George Everest), who later wrote several educational works on her husband's principles. The Booles had five

Rule of inference

argument with true premises follows a rule of inference then the conclusion cannot be false. Modus ponens, an influential rule of inference, connects two premises

Romberg's method

Romberg extrapolations expand on Boole's rule in very slight ways, modifying weights into ratios similar as in Boole's rule. In contrast, further Newton-Cotes

Dord

dord was not completely removed until 1947. Boole's rule, a mathematical rule sometimes known as "Bode's rule" due to a typographical error Esquivalience

Abramowitz and Stegun

integrals and Jacobi elliptic functions Boole's rule, a mathematical rule of integration sometimes known as Bode's rule, due to a typo in Abramowitz and Stegun

The Laws of Thought

coherences of the whole enterprise is justified by Boole in what Stanley Burris has later called the "rule of 0s and 1s", which justifies the claim that uninterpretable

Adaptive Simpson's method

error estimates to the fifth order (Modification 3), in a way related to Boole's rule and Romberg's method. Modification 4, not implemented here, contains