Rectangle method

From Wikipedia, the free encyclopedia

In integral calculus, the rectangle method (also called the Mid-Ordinate Rule) uses an approximation to a definite integral, made by finding the area of a series of rectangles.

Either the left or right corners, or top middle of the boxes lie on the graph of a function, with the bases run along the x-axis. The approximation is taken by adding up the areas (base multiplied by height, a function value) of the n rectangles that fill the space between two desired x-values.

\int_a^b f(x)\,dx \approx \sum_{i=1}^{n} f(a+i'\Delta x)\Delta x \quad \mbox{ where } \Delta x = \frac{b-a}{n} \;,\;
                  i' = \begin{cases} i-1 	& \mbox{if left approx.}\\
			                    i-\frac{1}{2}	& \mbox{if midpoint approx.}\\
                                            i    	& \mbox{if right approx.}	\end{cases}

The necessity of a + ix arises when a is not zero, and as such the position of the first rectangle is not at f(ix) but rather at f(a + ix). As n gets larger, the approximation gets more accurate. In fact, the limit of the approximation as n approaches infinity is exactly equal to the definite integral.

\int_a^b f(x)\,dx = \lim_{n \to \infty} \sum_{i=1}^{n} f(a+i'\Delta x)\Delta x

This is true regardless of which i' is used. Although the midpoint approximation tends to be more accurate for finite n, the limit of all three approximations as n approaches infinity is the same, thus any of them can be used to calculate a definite integral.

Right Riemann approximation
Right Riemann approximation
Midpoint approximation
Midpoint approximation
Left Riemann approximation
Left Riemann approximation

[edit] Error

The approximation error in the midpoint rule decays as the cube of the width of the box:

\int_a^{a+h} f(x)\,dx = hf(a + h/2) + \frac{h^3}{24}f''(\xi)

for some \xi \in (a, a+h).

[edit] See also

Languages