<< simpson Numerical Integration Techniques (integtools) trapez >>

Numerical Integration Techniques (integtools) >> Numerical Integration Techniques (integtools) > simpson2

simpson2

Evaluates the definite integral using Simpson's 3/8th Method.

Calling Sequence

integral = simpson2(a,b,n,f)

Parameters

a:

lower limit of integration

b:

upper limit of integration

n:

a multiple of 3 (denotes the no. of sub-intervals. Higher the value of n better the result.)

f:

The function that is to be integrated

Description

Returns the definite integral of a function using Simpson's 3/8th Method.

Examples

deff('a=f(x)','a=x*x') // define a function f which returns x^2
integral = simpson2(0,2,600,f) // evaluates the integral of x^2 from 0 to 2

See also

Authors

Bibliography

http://mathfaculty.fullerton.edu/mathews/n2003/Simpson38RuleMod.html


Report an issue
<< simpson Numerical Integration Techniques (integtools) trapez >>