Riemann Sum and Area Approximation
The area of a region $S$ that lies under the curve $y=f(x)$ from $a$ to $b$ can be approximated by summing the areas of a collection of rectangles.
Figure 4.1 The rectangles approximate the area between the graph of the function $y=f(x)$ and the $x$-axis.
Definition of Riemann Sum
Let $f$ be a continuous function defined on the closed interval $[a, b]$, and let $\Delta$ be a partition of $[a, b]$ given by
$
a=x_0<x_1<x_2<\cdots<x_{n-1}<x_n=b
$
where $\Delta x_i$ is the width of the $i$ th interval. If $c_i$ is any point in the $i$ th interval, then the sum
$
\sum_{i=1}^n f\left(c_i\right) \Delta x_i=f\left(c_1\right) \Delta x_1+f\left(c_2\right) \Delta x_2+\cdots+f\left(c_i\right) \Delta x_i+\cdots+f\left(c_n\right) \Delta x_n
$
is called a Riemann sum for $f$ on the interval $[a, b]$.
If every subinterval is of equal width, the partition is regular and $\Delta x=\frac{\boldsymbol{b}-\boldsymbol{a}}{\boldsymbol{n}}$.
Then the Riemann sum can be written
$
\sum_{i=1}^n f\left(c_i\right) \Delta x=\Delta x\left[f\left(c_1\right)+f\left(c_2\right)+\cdots+f\left(c_i\right)+\cdots+f\left(c_n\right)\right]
$
where $c_i=a+i(\Delta x)$.
Left, Right, and Midpoint Riemann Sum Approximation
If $c_i$ is the left endpoint of each subinterval then $\sum_{i=1}^n f\left(c_i\right) \Delta x_i$ is called a left Riemann sum.
If $c_i$ is the right endpoint of each subinterval then $\sum_{i=1}^n f\left(c_i\right) \Delta x_i$ is called a right Riemann sum.
If $c_i$ is the midpoint of each subinterval then $\sum_{i=1}^n f\left(c_i\right) \Delta x_i$ is called a midpoint Riemann sum.
Example1
- Approximate the area of the region bounded by the graph of $f(x)=-x^2+x+2$, the $x$-axis, and the vertical lines $x=0$ and $x=2$,
(a) by using a left Riemann sum with four subintervals,
(b) by using a right Riemann sum with four subintervals, and
(c) by using a midpoint Riemann sum with four subintervals.
▶️Answer/Explanation
Solution
(a)
For a left Riemann sum with 4 subintervals, we use the four rectangles whose heights are the values of $f$ at the left endpoints of their bases.
The left endpoints of each subinterval are $0,0.5,1$, and 1.5 and $\Delta x=\frac{b-a}{n}=\frac{2-0}{4}=\frac{1}{2}$.
The left Riemann sum is
$
\begin{aligned}
\sum_{i=1}^4 f\left(c_i\right) \Delta x_i & =f(0) \cdot\left(\frac{1}{2}\right)+f(0.5) \cdot\left(\frac{1}{2}\right)+f(1) \cdot\left(\frac{1}{2}\right)+f(1.5) \cdot\left(\frac{1}{2}\right) \\
& =\frac{1}{2}[2+2.25+2+1.25]=3.75
\end{aligned}
$
(b) For a right Riemann sum with 4 subintervals, we use the three rectangles whose heights are the values of $f$ at the right endpoints of their bases.
The right endpoints of each subinterval are $0.5,1,1.5$, and 2 , and $\Delta x=\frac{b-a}{n}=\frac{2-0}{4}=\frac{1}{2}$.
The right Riemann sum is
$
\begin{aligned}
\sum_{i=1}^4 f\left(c_i\right) \Delta x_i & =f(0.5) \cdot\left(\frac{1}{2}\right)+f(1) \cdot\left(\frac{1}{2}\right)+f(1.5) \cdot\left(\frac{1}{2}\right)+f(2) \cdot\left(\frac{1}{2}\right) \\
& =\frac{1}{2}[2.25+2+1.25+0]=2.75
\end{aligned}
$
(c) For a midpoint Riemann sum with 4 subintervals, we use the four rectangles whose heights are the values of $f$ at the midpoints of their bases.
The midpoints of each subinterval are $0.25,0.75,1.25$, and 1.75 , and $\Delta x=\frac{b-a}{n}=\frac{2-0}{4}=\frac{1}{2}$. The midpoint Riemann sum is
$
\begin{aligned}
\sum_{i=1}^4 f\left(c_i\right) \Delta x_i & =f(.25) \cdot\left(\frac{1}{2}\right)+f(.75) \cdot\left(\frac{1}{2}\right)+f(1.25) \cdot\left(\frac{1}{2}\right)+f(1.75) \cdot\left(\frac{1}{2}\right) \\
& =\frac{1}{2}[2.1875+2.1875+1.6875+0.6875]=3.375
\end{aligned}
$
Example 2
The function $f$ is continuous on the closed interval $[0,12]$ and has values as shown in the table above. Use a midpoint Riemann sum with 4 subintervals of equal length to approximate the area that lies under $f$ and above the $x$-axis from $x=0$ to $x=12$.
▶️Answer/Explanation
Solution
The four intervals are $[0,3],[3,6],[6,9]$, and $[9,12]$.
$1.5,4.5,7.5$, and 10.5 are the midpoints of each interval.
Midpoint Riemann sum is
$
\begin{aligned}
& f(1.5) \cdot 3+f(4.5) \cdot 3+f(7.5) \cdot 3+f(10.5) \cdot 3 \\
& =3 \cdot[1.45+5.05+12.25+23.05] \\
& =125.4
\end{aligned}
$
Example3
- Using a left Riemann sum with three subintervals $[0,1],[1,2]$, and $[2,3]$, what is the approximation of $\int_0^3(3-x)(x+1) d x$ ?
(A) 7.5
(B) 9
(C) 10
(D) 11.5
▶️Answer/Explanation
Ans:C
Example4
The function $f$ is continuous on the closed interval $[1,10]$ and has values as shown in the table above. Using a right Riemann sum with four subintervals $[1,3],[3,5],[5,8],[8,10]$, what is the approximation of $\int_1^{10} f(x) d x$ ?
(A) 96
(B) 116
(C) 132
(D) 159
▶️Answer/Explanation
AnsD
Example5
- The expression $\frac{1}{20}\left[\left(\frac{1}{20}\right)^2+\left(\frac{2}{20}\right)^2+\left(\frac{3}{20}\right)^2+\ldots+\left(\frac{20}{20}\right)^2\right]$ is a Riemann sum approximation for
(A) $\frac{1}{20} \int_0^{20} x^2 d x$
(B) $\frac{1}{20} \int_0^1 x^2 d x$
(C) $\int_0^1 x^2 d x$
(D) $\int_0^1 \frac{1}{x^2} d x$
▶️Answer/Explanation
AnsC