Numerical Integration using the 'standard' methods:
Left End, Right End, Midpoint, Trapezoid Rule, Simpsons Rule.


        Sidney Birnbaum, Mathematics Department
        California State Polytechnic University, Pomona
        3801 West Temple
        Pomona, Ca   91768

        SBirnbaum@CsuPomona.edu

In addition to performing the indicated calculations, the
program offers the option of doubling N, the number of
subintervals, and recomputing.

    Input variables
A, B    left, right endpoints of the interval of integration.
N       number of subintervals.
f(x)    function to be integrated. [note lower case x]

    Output Variables
LE      Left End estimate: H*Sum(f(x[i]),i,0,N-1) .
RE      Right End estimate: H*Sum(f(x[i]),i,1,N) .
TR      Trapezoid rule estimate: (LE + RE)/2  .
MD      Midpoint rule estimate: H*Sum(f(x[j]),j,1,N);
        x[j] is the midpoint of the jth subinterval.
SI      Simpsons rule estimate; calculated only for N even.

    Principle Internal Variables
H       (B-A)/N  : subinterval length.
FA      f(A) : value of f at left end; f(x[0]).
FB      f(B) : value of f at right end; f(x[N]).
w       current value of x[i] .
SE      Sum(f(x[i]), for i even; end points not included.
SO      Sum(f(x[i]), for i odd;  end points not included.
SM      Sum(f(x[j])), x[j] is the midpoint of the jth interval.

When N is doubled:
2N\->\N : H/2\->\H
SO+SE\->\SE
SM\->\SO
and only SM need be recomputed.
