Supriya Ghosh (Editor)

Rectangle method

Updated on
Edit
Like
Comment
Share on FacebookTweet on TwitterShare on LinkedInShare on Reddit
Rectangle method

In mathematics, specifically in integral calculus, the rectangle method (also called the midpoint or mid-ordinate rule) computes an approximation to a definite integral, made by finding the area of a collection of rectangles whose heights are determined by the values of the function.

Specifically, the interval ( a , b ) over which the function is to be integrated is divided into N equal subintervals of length h = ( b a ) / N . The rectangles are then drawn so that either their left or right corners, or the middle of their top line lies on the graph of the function, with bases running along the x -axis. The approximation to the integral is then calculated by adding up the areas (base multiplied by height) of the N rectangles, giving the formula:

a b f ( x ) d x h n = 0 N 1 f ( x n )

where h = ( b a ) / N and x n = a + n h .

The formula for x n above gives x n for the Top-left corner approximation.

As N gets larger, this approximation gets more accurate. In fact, this computation is the spirit of the definition of the Riemann integral and the limit of this approximation as n is defined and equal to the integral of f on ( a , b ) if this Riemann integral is defined. Note that this is true regardless of which i is used, however the midpoint approximation tends to be more accurate for finite n .

Error

For a function f which is twice differentiable, the approximation error in each section ( a , a + Δ ) of the midpoint rule decays as the cube of the width of the rectangle. (For a derivation based on a Taylor approximation, see Midpoint method)

E i Δ 3 24 f ( ξ )

for some ξ in ( a , a + Δ ) . Summing this, the approximation error for n intervals with width Δ is less than or equal to

n = 1 , 2 , 3 ,

where n + 1 is the number of nodes

E n Δ 3 24 f ( ξ )

in terms of the total interval, we know that n Δ = b a so we can rewrite the expression:

E ( b a ) Δ 2 24 f ( ξ )

which is equal to:

E ( b a ) 3 24 n 2 f ( ξ )


for some ξ in ( a , b ) .

References

Rectangle method Wikipedia