The midpt function uses the rectangle method to calculate
the integral of the function f over the interval from
a to b. The parameter m sets the number
of intervals to use when evaluating the rectangles. Additional
options are passed to the function f when evaluating.