Boole's Rule - Maple Programming Help

Home : Support : Online Help : Education : Student Package : Calculus 1 : Visualization : Integration : Student/Calculus1/Boole

Boole's Rule

 Calling Sequence ApproximateInt(f(x), x = a..b, method = boole, opts) ApproximateInt(f(x), a..b, method = boole, opts) ApproximateInt(Int(f(x), x = a..b), method = boole, opts)

Parameters

 f(x) - algebraic expression in variable 'x' x - name; specify the independent variable a, b - algebraic expressions; specify the interval opts - equation(s) of the form option=value where option is one of boxoptions, functionoptions, iterations, method, outline, output, partition, pointoptions, refinement, showarea, showfunction, showpoints, subpartition, view, or Student plot options; specify output options

Description

 • The ApproximateInt(f(x), x = a..b, method = boole, opts) command approximates the integral of f(x) from a to b by using Boole's rule. The first two arguments (function expression and range) can be replaced by a definite integral.
 • If the independent variable can be uniquely determined from the expression, the parameter x need not be included in the calling sequence.
 • Given a partition $P=\left(a={x}_{0},{x}_{1},...,{x}_{N}=b\right)$ of the interval $\left(a,b\right)$, Boole's rule approximates the integral on each subinterval $\left({x}_{i-1},{x}_{i}\right)$ by integrating the quartic function that interpolates five equally spaced points in that subinterval.
 • In the case that the widths of the subintervals are equal, the approximation can be written as

$\frac{1}{8}\frac{\left(b-a\right)\left(f\left(x\right)+3f\left(\frac{2}{3}{x}_{0}+\frac{1}{3}{x}_{1}\right)+3f\left(\frac{1}{3}{x}_{0}+\frac{2}{3}{x}_{1}\right)+2f\left({x}_{1}\right)+3f\left(\frac{2}{3}{x}_{1}+\frac{1}{3}{x}_{2}\right)+3f\left(\frac{1}{3}{x}_{1}+\frac{2}{3}{x}_{w}\right)+2f\left({x}_{2}\right)+\mathrm{...}+3f\left(\frac{1}{3}{x}_{N-1}+\frac{2}{3}{x}_{N}\right)+f\left({x}_{N}\right)\right)}{N}$

 Traditionally, Boole's rule is written as: given N, where N is a positive multiple of 3, and given equally spaced points $a={x}_{0},{x}_{1},{x}_{2},...,{x}_{N}=b$, an approximation to the integral ${∫}_{a}^{b}f\left(x\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}ⅆx$ is

$\frac{3}{8}\frac{\left(b-a\right)\left(f\left({x}_{0}\right)+3f\left({x}_{1}\right)+3f\left({x}_{2}\right)+2f\left({x}_{3}\right)+3f\left({x}_{4}\right)+3f\left({x}_{5}\right)+2f\left({x}_{6}\right)+3f\left({x}_{7}\right)+\mathrm{...}+3f\left({x}_{N-1}\right)+f\left({x}_{N}\right)\right)}{N}$

 • By default, the interval is divided into $10$ equal-sized subintervals.
 • For the options opts, see the ApproximateInt help page.
 • This rule can be applied interactively, through the ApproximateInt Tutor.
 • This rule is also sometimes known as Bode's Rule due to a misattribution in the literature.  The ApproximateInt command will accept either method=boole or method=bode.

Examples

 > $\mathrm{polynomial}≔\mathrm{CurveFitting}[\mathrm{PolynomialInterpolation}]\left(\left[{x}_{0},\frac{3{x}_{0}+{x}_{1}}{4},\frac{{x}_{0}+{x}_{2}}{2},\frac{{x}_{0}+3{x}_{1}}{4},{x}_{1}\right],\left[f\left(0\right),f\left(\frac{1}{4}\right),f\left(\frac{1}{2}\right),f\left(\frac{3}{4}\right),f\left(1\right)\right],z\right):$
 > $\mathrm{integrated}≔{∫}_{{x}_{0}}^{{x}_{1}}\mathrm{polynomial}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}ⅆz:$
 > $\mathrm{factor}\left(\mathrm{integrated}\right)$
 ${-}\frac{{1}}{{90}}{}\frac{\left({{x}}_{{0}}{-}{{x}}_{{1}}\right){}\left({-}{88}{}{f}{}\left({1}\right){}{{x}}_{{1}}{}{{x}}_{{2}}^{{3}}{-}{624}{}{f}{}\left(\frac{{3}}{{4}}\right){}{{x}}_{{1}}{}{{x}}_{{2}}^{{3}}{+}{72}{}{f}{}\left(\frac{{1}}{{2}}\right){}{{x}}_{{0}}^{{2}}{}{{x}}_{{1}}^{{2}}{-}{656}{}{f}{}\left(\frac{{1}}{{4}}\right){}{{x}}_{{1}}{}{{x}}_{{2}}^{{3}}{-}{72}{}{f}{}\left({0}\right){}{{x}}_{{1}}{}{{x}}_{{2}}^{{3}}{+}{72}{}{f}{}\left({1}\right){}{{x}}_{{0}}^{{2}}{}{{x}}_{{1}}{}{{x}}_{{2}}{-}{114}{}{f}{}\left({1}\right){}{{x}}_{{0}}{}{{x}}_{{1}}^{{2}}{}{{x}}_{{2}}{+}{42}{}{f}{}\left({1}\right){}{{x}}_{{0}}{}{{x}}_{{1}}{}{{x}}_{{2}}^{{2}}{+}{336}{}{f}{}\left(\frac{{3}}{{4}}\right){}{{x}}_{{0}}^{{2}}{}{{x}}_{{1}}{}{{x}}_{{2}}{-}{768}{}{f}{}\left(\frac{{3}}{{4}}\right){}{{x}}_{{0}}{}{{x}}_{{1}}^{{2}}{}{{x}}_{{2}}{+}{432}{}{f}{}\left(\frac{{3}}{{4}}\right){}{{x}}_{{0}}{}{{x}}_{{1}}{}{{x}}_{{2}}^{{2}}{+}{432}{}{f}{}\left(\frac{{1}}{{4}}\right){}{{x}}_{{0}}^{{2}}{}{{x}}_{{1}}{}{{x}}_{{2}}{-}{768}{}{f}{}\left(\frac{{1}}{{4}}\right){}{{x}}_{{0}}{}{{x}}_{{1}}^{{2}}{}{{x}}_{{2}}{+}{336}{}{f}{}\left(\frac{{1}}{{4}}\right){}{{x}}_{{0}}{}{{x}}_{{1}}{}{{x}}_{{2}}^{{2}}{+}{60}{}{f}{}\left({0}\right){}{{x}}_{{0}}^{{2}}{}{{x}}_{{1}}{}{{x}}_{{2}}{-}{150}{}{f}{}\left({0}\right){}{{x}}_{{0}}{}{{x}}_{{1}}^{{2}}{}{{x}}_{{2}}{+}{90}{}{f}{}\left({0}\right){}{{x}}_{{0}}{}{{x}}_{{1}}{}{{x}}_{{2}}^{{2}}{-}{26}{}{f}{}\left({1}\right){}{{x}}_{{0}}^{{3}}{}{{x}}_{{1}}{-}{2}{}{f}{}\left({1}\right){}{{x}}_{{0}}^{{3}}{}{{x}}_{{2}}{+}{3}{}{f}{}\left({1}\right){}{{x}}_{{0}}^{{2}}{}{{x}}_{{1}}^{{2}}{-}{33}{}{f}{}\left({1}\right){}{{x}}_{{0}}^{{2}}{}{{x}}_{{2}}^{{2}}{+}{36}{}{f}{}\left({1}\right){}{{x}}_{{0}}{}{{x}}_{{1}}^{{3}}{+}{8}{}{f}{}\left({1}\right){}{{x}}_{{0}}{}{{x}}_{{2}}^{{3}}{-}{36}{}{f}{}\left({1}\right){}{{x}}_{{1}}^{{3}}{}{{x}}_{{2}}{+}{111}{}{f}{}\left({1}\right){}{{x}}_{{1}}^{{2}}{}{{x}}_{{2}}^{{2}}{-}{144}{}{f}{}\left(\frac{{3}}{{4}}\right){}{{x}}_{{0}}^{{3}}{}{{x}}_{{1}}{+}{16}{}{f}{}\left(\frac{{3}}{{4}}\right){}{{x}}_{{0}}^{{3}}{}{{x}}_{{2}}{+}{48}{}{f}{}\left(\frac{{3}}{{4}}\right){}{{x}}_{{0}}^{{2}}{}{{x}}_{{1}}^{{2}}{-}{192}{}{f}{}\left(\frac{{3}}{{4}}\right){}{{x}}_{{0}}^{{2}}{}{{x}}_{{2}}^{{2}}{+}{224}{}{f}{}\left(\frac{{3}}{{4}}\right){}{{x}}_{{0}}{}{{x}}_{{1}}^{{3}}{-}{16}{}{f}{}\left(\frac{{3}}{{4}}\right){}{{x}}_{{0}}{}{{x}}_{{2}}^{{3}}{-}{224}{}{f}{}\left(\frac{{3}}{{4}}\right){}{{x}}_{{1}}^{{3}}{}{{x}}_{{2}}{+}{720}{}{f}{}\left(\frac{{3}}{{4}}\right){}{{x}}_{{1}}^{{2}}{}{{x}}_{{2}}^{{2}}{-}{48}{}{f}{}\left(\frac{{1}}{{2}}\right){}{{x}}_{{0}}^{{3}}{}{{x}}_{{1}}{-}{48}{}{f}{}\left(\frac{{1}}{{2}}\right){}{{x}}_{{0}}{}{{x}}_{{1}}^{{3}}{-}{112}{}{f}{}\left(\frac{{1}}{{4}}\right){}{{x}}_{{0}}^{{3}}{}{{x}}_{{1}}{-}{16}{}{f}{}\left(\frac{{1}}{{4}}\right){}{{x}}_{{0}}^{{3}}{}{{x}}_{{2}}{-}{48}{}{f}{}\left(\frac{{1}}{{4}}\right){}{{x}}_{{0}}^{{2}}{}{{x}}_{{1}}^{{2}}{-}{192}{}{f}{}\left(\frac{{1}}{{4}}\right){}{{x}}_{{0}}^{{2}}{}{{x}}_{{2}}^{{2}}{+}{288}{}{f}{}\left(\frac{{1}}{{4}}\right){}{{x}}_{{0}}{}{{x}}_{{1}}^{{3}}{+}{16}{}{f}{}\left(\frac{{1}}{{4}}\right){}{{x}}_{{0}}{}{{x}}_{{2}}^{{3}}{-}{288}{}{f}{}\left(\frac{{1}}{{4}}\right){}{{x}}_{{1}}^{{3}}{}{{x}}_{{2}}{+}{816}{}{f}{}\left(\frac{{1}}{{4}}\right){}{{x}}_{{1}}^{{2}}{}{{x}}_{{2}}^{{2}}{-}{30}{}{f}{}\left({0}\right){}{{x}}_{{0}}^{{3}}{}{{x}}_{{1}}{+}{2}{}{f}{}\left({0}\right){}{{x}}_{{0}}^{{3}}{}{{x}}_{{2}}{+}{15}{}{f}{}\left({0}\right){}{{x}}_{{0}}^{{2}}{}{{x}}_{{1}}^{{2}}{-}{33}{}{f}{}\left({0}\right){}{{x}}_{{0}}^{{2}}{}{{x}}_{{2}}^{{2}}{+}{40}{}{f}{}\left({0}\right){}{{x}}_{{0}}{}{{x}}_{{1}}^{{3}}{-}{8}{}{f}{}\left({0}\right){}{{x}}_{{0}}{}{{x}}_{{2}}^{{3}}{+}{8}{}{f}{}\left({0}\right){}{{x}}_{{1}}^{{3}}{}{{x}}_{{2}}{+}{63}{}{f}{}\left({0}\right){}{{x}}_{{1}}^{{2}}{}{{x}}_{{2}}^{{2}}{+}{7}{}{f}{}\left({1}\right){}{{x}}_{{0}}^{{4}}{+}{20}{}{f}{}\left({1}\right){}{{x}}_{{2}}^{{4}}{+}{32}{}{f}{}\left(\frac{{3}}{{4}}\right){}{{x}}_{{0}}^{{4}}{+}{160}{}{f}{}\left(\frac{{3}}{{4}}\right){}{{x}}_{{2}}^{{4}}{+}{12}{}{f}{}\left(\frac{{1}}{{2}}\right){}{{x}}_{{0}}^{{4}}{+}{12}{}{f}{}\left(\frac{{1}}{{2}}\right){}{{x}}_{{1}}^{{4}}{+}{32}{}{f}{}\left(\frac{{1}}{{4}}\right){}{{x}}_{{0}}^{{4}}{+}{160}{}{f}{}\left(\frac{{1}}{{4}}\right){}{{x}}_{{2}}^{{4}}{+}{7}{}{f}{}\left({0}\right){}{{x}}_{{0}}^{{4}}{-}{12}{}{f}{}\left({0}\right){}{{x}}_{{1}}^{{4}}{+}{20}{}{f}{}\left({0}\right){}{{x}}_{{2}}^{{4}}\right)}{\left({{x}}_{{0}}{-}{3}{}{{x}}_{{1}}{+}{2}{}{{x}}_{{2}}\right){}\left({{x}}_{{0}}{-}{2}{}{{x}}_{{2}}{+}{{x}}_{{1}}\right){}\left({{x}}_{{0}}{-}{{x}}_{{2}}\right){}\left({-}{2}{}{{x}}_{{1}}{+}{{x}}_{{0}}{+}{{x}}_{{2}}\right)}$ (1)
 > $\mathrm{with}\left(\mathrm{Student}[\mathrm{Calculus1}]\right):$
 > $\mathrm{ApproximateInt}\left(\mathrm{sin}\left(x\right),x=0..5,\mathrm{method}=\mathrm{boole}\right)$
 $\frac{{1}}{{15}}{}{\mathrm{sin}}{}\left(\frac{{19}}{{4}}\right){+}\frac{{8}}{{45}}{}{\mathrm{sin}}{}\left(\frac{{39}}{{8}}\right){+}\frac{{7}}{{180}}{}{\mathrm{sin}}{}\left({5}\right){+}\frac{{7}}{{90}}{}{\mathrm{sin}}{}\left({4}\right){+}\frac{{8}}{{45}}{}{\mathrm{sin}}{}\left(\frac{{33}}{{8}}\right){+}\frac{{1}}{{15}}{}{\mathrm{sin}}{}\left(\frac{{17}}{{4}}\right){+}\frac{{8}}{{45}}{}{\mathrm{sin}}{}\left(\frac{{35}}{{8}}\right){+}\frac{{7}}{{90}}{}{\mathrm{sin}}{}\left(\frac{{9}}{{2}}\right){+}\frac{{8}}{{45}}{}{\mathrm{sin}}{}\left(\frac{{37}}{{8}}\right){+}\frac{{1}}{{15}}{}{\mathrm{sin}}{}\left(\frac{{13}}{{4}}\right){+}\frac{{8}}{{45}}{}{\mathrm{sin}}{}\left(\frac{{27}}{{8}}\right){+}\frac{{7}}{{90}}{}{\mathrm{sin}}{}\left(\frac{{7}}{{2}}\right){+}\frac{{8}}{{45}}{}{\mathrm{sin}}{}\left(\frac{{29}}{{8}}\right){+}\frac{{1}}{{15}}{}{\mathrm{sin}}{}\left(\frac{{15}}{{4}}\right){+}\frac{{8}}{{45}}{}{\mathrm{sin}}{}\left(\frac{{31}}{{8}}\right){+}\frac{{8}}{{45}}{}{\mathrm{sin}}{}\left(\frac{{19}}{{8}}\right){+}\frac{{7}}{{90}}{}{\mathrm{sin}}{}\left(\frac{{5}}{{2}}\right){+}\frac{{8}}{{45}}{}{\mathrm{sin}}{}\left(\frac{{21}}{{8}}\right){+}\frac{{1}}{{15}}{}{\mathrm{sin}}{}\left(\frac{{11}}{{4}}\right){+}\frac{{8}}{{45}}{}{\mathrm{sin}}{}\left(\frac{{23}}{{8}}\right){+}\frac{{7}}{{90}}{}{\mathrm{sin}}{}\left({3}\right){+}\frac{{8}}{{45}}{}{\mathrm{sin}}{}\left(\frac{{25}}{{8}}\right){+}\frac{{8}}{{45}}{}{\mathrm{sin}}{}\left(\frac{{13}}{{8}}\right){+}\frac{{1}}{{15}}{}{\mathrm{sin}}{}\left(\frac{{7}}{{4}}\right){+}\frac{{8}}{{45}}{}{\mathrm{sin}}{}\left(\frac{{15}}{{8}}\right){+}\frac{{7}}{{90}}{}{\mathrm{sin}}{}\left({2}\right){+}\frac{{8}}{{45}}{}{\mathrm{sin}}{}\left(\frac{{17}}{{8}}\right){+}\frac{{1}}{{15}}{}{\mathrm{sin}}{}\left(\frac{{9}}{{4}}\right){+}\frac{{8}}{{45}}{}{\mathrm{sin}}{}\left(\frac{{7}}{{8}}\right){+}\frac{{8}}{{45}}{}{\mathrm{sin}}{}\left(\frac{{9}}{{8}}\right){+}\frac{{1}}{{15}}{}{\mathrm{sin}}{}\left(\frac{{5}}{{4}}\right){+}\frac{{8}}{{45}}{}{\mathrm{sin}}{}\left(\frac{{11}}{{8}}\right){+}\frac{{7}}{{90}}{}{\mathrm{sin}}{}\left(\frac{{3}}{{2}}\right){+}\frac{{1}}{{15}}{}{\mathrm{sin}}{}\left(\frac{{1}}{{4}}\right){+}\frac{{8}}{{45}}{}{\mathrm{sin}}{}\left(\frac{{3}}{{8}}\right){+}\frac{{7}}{{90}}{}{\mathrm{sin}}{}\left(\frac{{1}}{{2}}\right){+}\frac{{8}}{{45}}{}{\mathrm{sin}}{}\left(\frac{{5}}{{8}}\right){+}\frac{{1}}{{15}}{}{\mathrm{sin}}{}\left(\frac{{3}}{{4}}\right){+}\frac{{8}}{{45}}{}{\mathrm{sin}}{}\left(\frac{{1}}{{8}}\right){+}\frac{{7}}{{90}}{}{\mathrm{sin}}{}\left({1}\right)$ (2)
 > $\mathrm{ApproximateInt}\left(x\left(x-2\right)\left(x-3\right),x=0..5,\mathrm{method}=\mathrm{boole},\mathrm{output}=\mathrm{plot}\right)$
 > $\mathrm{ApproximateInt}\left(\mathrm{tan}\left(x\right)-2x,-1..1,\mathrm{method}=\mathrm{boole},\mathrm{output}=\mathrm{plot},\mathrm{partition}=50\right)$

To play the following animation in this help page, right-click (Control-click, on Macintosh) the plot to display the context menu.  Select Animation > Play.

 > $\mathrm{ApproximateInt}\left(\mathrm{ln}\left(x\right),x=1..100,\mathrm{method}=\mathrm{boole},\mathrm{output}=\mathrm{animation}\right)$