Basic Science World


Simpson's Method

This Script gives a numerical integration of any function using Simpson's formula:
I=h/3*[F(a)+F(b) +4*sum(odd values)+2*sum(even values]
where F(a) is the value of F(x) at point a and F(b) its value at point b
odd values mean the values of f at i is odd and even is its values at even i
Please notice that the variable should be x
lower limit a=:
upper limit=:
Number of Intervals=:
f(x)=