computing integrals in the midpoint methodwe construct rectangle for every sub-interval where the height equals at the midpoint of the sub-interval let us do this for four rectanglesusing the same sub-intervals as we had for hand calculations with the trapezoidal methodoe : /oe : : /oe : : /and oe : : we get : : : /dt : : : : ( where and are the widths of the sub-intervalsused previously with the trapezoidal method and defined in ( )-( with td the approximation becomes compared with the true answer ( )this is about too smallbut it is better than what we got with the trapezoidal method ( %with the same sub-intervals more rectangles give better approximation the general formula let us derive formula for the midpoint method based on rectangles of equal widthzb zx xdx zx /dx zxn /dx xn xn xn hf hf hf (  xn xn cf :::  ( /dx this sum may be written more compactly as zb /dx where xi ih xi /(