# How to do midpoint Riemann sum?

Midpoint Riemann sum is one of the methods in estimating the area under a curve in a given interval [a, b]. To estimate the area using this method, apply the formula A = delta x * [f(x1) + f(x2) + ... f(xn)], where delta x = (b - a)/n, n is the number of subintervals, f(x) is the function of the curve, and x1, x2, x3,...xn are the midpoint of each subintervals. Riemann sum is used to estimate the area under a curve in an interval [a, b]. Its formula is

`A ~~ sum_(i=1)^n f(x_i ) Delta x`.

To apply this formula, the interval [a, b] is subdivided into subintervals/rectangles of equal width (refer to figure 1). The width of each rectangle is

`Delta x = (b - a)/n`,

where n is the number of subintervals/rectangles.

To determine the height of each rectangle, plug in the value of xi to the function of the curve f(x).

`height = f(x_i)`

In midpoint Riemman sum, the xi is the middle x value of each subinterval.

`x_i= (x_i + x_(i+1))/2`

When the height of each rectangle is known, compute the area of each rectangle by multiplying the height and width.

`A_i = f(x_i) Delta x`

To get the estimate of the area under the curve, add the area of all the rectangles present from A_1 to A_n.

`A ~~ A_1+A_2+ ... + A_n`

`A~~ f(x_1)Delta x + f(x_2)Delta x+ ... + f(x_n) Delta x`

Factoring out the width, this becomes

`A~~ Delta x ( f(x_1) + f(x_2)+...+f(x_n))`

Thus, `A~~ sum _(i=1)^n f(x_i) Delta x = Delta x(f(x_1) + f(x_2) + ... + f(x_n)).`

To show its application, consider this example.

Example: Use midpoint Riemann sum to estimate the area between the function `f(x) = x^2+2` and the x-axis on the interval [0, 6]. Use 3 subintervals (n=3).

To solve, graph the given function. Then, subdivide the region between the curve and the x-axis to three rectangles. (Refer to Figure 2.)

The width of each rectangle is

`Delta x = (b - a)/n = (6-0)/3 = 2`.

Then, determine the midpoint of each subinterval.

The first subinterval is [0, 2]. So the midpoint of the first subinterval is

`x_1 = (0+2)/2 = 1`.

The second subinterval is [2, 4]. So the midpoint of the second subinterval is

`x_2 = (2+4)/2 = 3`.

The third subinterval is [4, 6]. So the midpoint of the third subinterval is

`x_3 = (4+6)/2 = 5`.

Use these midpoints of each subinterval to get the height of each rectangle.

Height of first rectangle: `f(x_1) = 1^2 + 2 = 3`

Height of the second rectangle: `f(x_2) = 3^2+2 = 11`

Height of the third rectangle: `f(x_3) = 5^2+2 = 27`

Applying the formula above, the estimated area is

`A~~ sum_(i=1)^3 f(x_i) Delta x = Delta x[ f(x_1+ f(x_2) + f(x_3)]`

`A ~~ 2*(3 + 11 + 27)`

`A~~ = 2 * 41`

`A~~ = 82`

Therefore, the area of the region between f(x) and the x-axis on the interval [0, 6] is approximately 82 square units.

Images:
This image has been Flagged as inappropriate Click to unflag
Approved by eNotes Editorial Team