How do I calculate the area under a curve using the midpoints of rectangles? I figured out how to calculate the area under the curve from the Right endpoint and Left endpoints, but I can't figure out how to calculate it using the midpoints. Especially when it says $M_3$. Ill post the question and my work. Any help is appreciated. Thanks!


 A: For the Midpoint Rule, interpreted geometrically, draw the rectangle with base $[0,1]$ and height $v(0.5)$. Draw the rectangle with base $[1,2]$ and height $v(1.5)$. Draw the rectangle with base $[2,3]$ and height $v(2.5)$. Find the sum of the areas of these rectangles.
So we want
$$(1)(v(0.5))+(1)(v(1.5))+(1)(v(2.5)).$$
More generally, suppose we are integrating $f$ from $a$ to $b$. We divide $[a,b]$ into $n$ equal parts, using subdivision points $a=x_0$, $x_1$, $x_2$, and so on up to $x_n=b$. Let $u_i$ be the midpoint of the interval $[x_{i-1},x_i]$. So $u_i=\frac{x_{i-1}+x_i}{2}$. Then our Midpoint Rule estimate of the integral is
$$\frac{b-a}{n}(f(u_1)+f(u_2)+\cdots+f(u_n)).$$
For "nice" functions, the Midpoint Rule is marginally better than the Trapezoidal Rule that uses the same number of function evaluations, and much better than an endpoint rule. But note that your endpoint rule calculations here use the results of $6$ function evaluations, while the Midpoint Rule use only $3$.
