Simpson's 3/8 Rule - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Education : Student Packages : Calculus 1 : Visualization : Integration : Student/Calculus1/Simpson38

Simpson's 3/8 Rule

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

ApproximateInt(f(x), x = a..b, method = simpson[3/8], opts)

ApproximateInt(f(x), a..b, method = simpson[3/8], opts)

ApproximateInt(Int(f(x), x = a..b), method = simpson[3/8], 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 = simpson[3/8], opts) command approximates the integral of f(x) from a to b by using Simpson's 3/8 rule.  This rule is also known as Newton's 3/8 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=a=x0,x1,...,xN=b of the interval a,b, Simpson's 3/8 rule approximates the integral on each subinterval xi1,xi by integrating the cubic function that interpolates the four points xi1,fxi1, 2xi13+xi3,f2xi13+xi3, xi13+2xi3,fxi13+2xi3, and xi,fxi.  This value is

xixi1fxi1+3f2xi13+xi3+3fxi13+2xi3+fxi8

• 

In the case that the widths of the subintervals are equal, the approximation can be written as

bafx0+3f2x03+x13+3fx03+2x13+2fx1+3f2x13+x23+3fx13+2x23+2fx2+...+fxN13+2xN3+fxN8N

  

Traditionally, Simpson's 3/8 rule is written as: given N, where N is a positive multiple of 3, and given equally spaced points a=x0,x1,x2,...,xN=b, an approximation to the integral abfxⅆx is

3bafx0+3fx1+3fx2+2fx3+3fx4+3fx5+2fx6+3fx7+...+3fxN1+fxN8N

• 

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.

Examples

polynomialCurveFittingPolynomialInterpolationx0,2x0+x13,x0+2x13,x1,f0,f13,f23,f1,z:

integrated∫x0x1polynomialⅆz:

factorintegrated

x0x1f1+3f23+3f13+f08

(1)

withStudentCalculus1:

ApproximateIntsinx,x=0..5,method=simpson38

sin516+3sin23616+sin48+3sin25616+3sin13316+sin928+3sin14316+3sin29616+3sin17616+sin38+3sin19616+3sin10316+sin728+3sin11316+3sin5316+3sin11616+sin28+3sin13616+3sin7316+sin528+3sin8316+3sin2316+3sin5616+3sin7616+3sin4316+sin328+3sin1316+sin128+3sin1616+sin18

(2)

ApproximateIntxx2x3,x=0..5,method=simpson38,output=plot

ApproximateInttanx2x,x=1..1,method=simpson38,output=plot,partition=50

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.

ApproximateIntlnx,1..100,method=simpson38,output=animation

See Also

Boole's Rules

Newton-Cotes Rules

plot/options

Simpson's Rule

Student

Student plot options

Student[Calculus1]

Student[Calculus1][ApproximateInt]

Student[Calculus1][ApproximateIntTutor]

Student[Calculus1][RiemannSum]

Student[Calculus1][VisualizationOverview]

Trapezoidal Rule