Evaluates the definite integral using Simpson's 3/8th Method
integral = simpson2(a,b,n,f)
lower limit of integration
upper limit of integration
an even no. (denotes the no. of sub-intervals. Higher the value of n better the result.)
The function that is to be integrated
Returns the definite integral of a function using Simpson's 3/8th Method.
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 | ![]() | ![]() |
http://mathfaculty.fullerton.edu/mathews/n2003/Simpson38RuleMod.html