Rectangular method computes an approximate of the numerical value of a definite integral by summing up the areas of the rectangles whose heights are determined by the values of a function which is illustrated by the figure below.

A definite integral is defined as a limit of Riemann sums, so any Riemann sum could be used as an approximation to the integral: If we divide [a, b] into subintervals of equal length \Delta x=\frac{b-a}{n} , then we have

\int_{a}^{b}f(x)dx \approx \sum_{i=1}^{n}f(x_{i}^{*})\Delta x

where x_i^* is any point in the i_th subinterval {x_{i-1}, x_i$}. If x_i^* is chosen to be the left endpoint of the interval, then x_i^*= x_i and we’ll have