We then consider the  inscribed and circumscribed rectangles, like those in the figure, having for bases the segments of length Dx and for height respectively the minimum mi and the maximum Mi of the function values in the same interval.
  n

sn=

Si mi Dx,   approximates the trapezoid area by defect.
  1
Similarly does
  n
Sn= Si Mi Dx
  1
by excess,  the sum of circumscribed rectangle areas. Clearly the greater the n number, the greater the approximation.