# Approximating areas by Riemann sums ```LECTURE 11: APPROXIMATING AREAS UNDER CURVES
MINGFENG ZHAO
January 28, 2015
Approximating areas by Riemann sums
Figure 1. Approximation of the area
Definition 1. Suppose [a, b] is a closed interval, for any positive integer n, a partition with n subintervals is a set of
n + 1 points x0 , x1 , &middot; &middot; &middot; , xn such that
x0 = a &lt; x1 &lt; &middot; &middot; &middot; &lt; xn−1 &lt; xn = b.
The points x0 , x1 , &middot; &middot; &middot; , xn−1 , xn are called the grid points of this partition. This partition contains n subintervals:
[x0 , x1 ], [x1 , x2 ], &middot; &middot; &middot; , [xn−1 , xn ],
with ∆xi = xi − xi−1 for all i = 1, &middot; &middot; &middot; , n.
b−a
for all i = 1, &middot; &middot; &middot; , n, this partition is called the regular partition of the interval [a, b]. In this case,
If ∆xi =
n
b−a
∆x =
is called the subinterval length, and the k-th grid point is:
n
xk = a + k∆x,
for k = 0, 1, 2, &middot; &middot; &middot; , n.
1
2
MINGFENG ZHAO
Example 1. A regular partition with subinterval length 1 of [1, 5] is:
[1, 2], [2, 3], [3, 4], [4, 5].
That is,
x0 = 1, x1 = 2, x2 = 3, x3 = 4, x4 = 5.
This regular partition has 5 grid points.
Example 2. Find the regular partition with 10 grid points of [2, 20].
By the assumption, we have n = 10 − 1 = 9, then the length of each small interval is:
∆x =
20 − 2
18
=
= 2.
9
9
So we have
xk = 2 + k∆x = 2 + 2k,
for all k = 0, 1, &middot; &middot; &middot; , 9.
Then this regular partition is:
[2, 4], [4, 6], [6, 8], [8, 10], [10, 12], [12, 14], [14, 16], [16, 18], [18, 20].
Definition 2. Let f be a function on the closed interval [a, b], and a = x0 &lt; x1 &lt; &middot; &middot; &middot; &lt; xn = b be a partition of [a, b],
for any k = 0, 1, &middot; &middot; &middot; , n, we choose any point x∗k in k-th interval [xk−1 , xk ], the the sum
f (x∗1 )∆x1 + f (x∗2 )∆x2 + &middot; &middot; &middot; + f (x∗n )∆xn
is called a general Riemann sum of f on [a, b]. If a partition is regular, that is, ∆x1 = ∆x2 = &middot; &middot; &middot; = ∆xn =
b−a
, the
n
general Riemann sum is called the Riemann sum with n subintervals, then
• If x∗k = xk−1 for any k = 1, &middot; &middot; &middot; , n, the sum is called a left endpoint Riemann sum.
• If x∗k = xk for any k = 1, &middot; &middot; &middot; , n, the sum is called a right endpoint Riemann sum.
xk−1 + xk
∆x
= xk−1 +
for any k = 1, &middot; &middot; &middot; , n, the sum is called a midpoint endpoint Riemann sum.
• If x∗k =
2
2
Example 3. Calculate the left Riemann sum for f (x) = cos(x) on the interval [0, π] using n = 4.
The length of the subinterval for the regular partition of [0, π] with n = 4 will be:
∆x =
π−0
π
= .
4
4
Then
x0 = 0, x1 = 0 + ∆x =
π
π
3π
, x2 = 0 + 2∆x = , x3 = 0 + 3∆x =
, x4 = π.
4
2
4
LECTURE 11: APPROXIMATING AREAS UNDER CURVES
3
So the left Riemann sum is:
f (x0 )∆x + f (x1 )∆x + f (x2 )∆x + f (x3 )∆x
π π
π π
π
3π
π
&middot; + cos
&middot; + cos
= cos(0) &middot; + cos
&middot;
4
4
4
2
4
4
4
√
√
π
2 π
2 π
π
= 1&middot; +
&middot; +0&middot; −
&middot;
4
2 4
4
2 4
π
=
.
4
Example 4. Estimate the area A under the graph of f on the interval [0, 2] using the left and right Riemann sums
with n = 4, where f is continuous but known only at the points in the following table.
Since [0, 2] has n = 4 subintervals, then ∆x =
x0 = 0,
x
f (x)
0
1
0.5
3
1.0
4.5
1.5
5.5
2.0
6.0
2−0
= 0.5 and
4
x1 = 0.5,
x2 = 1,
x3 = 1.5,
and x4 = 2.
So
• The left Riemann sum is:
f (x0 )∆x + f (x1 )∆x + f (x2 )∆x + f (x3 )∆x = 1 &middot; 0.5 + 3 &middot; 0.5 + 4.5 &middot; 0.5 + 4.5 &middot; 0.5 + 5.5 &middot; 0.5 = 7.0.
• The right Riemann sum is:
f (x1 )∆x + f (x2 )∆x + f (x3 )∆x + f (x4 )∆x = 3 &middot; 0.5 + 4.5 &middot; 0.5 + 4.5 &middot; 0.5 + 5.5 &middot; 0.5 + 6.0 &middot; 0.5 = 9.5.
Sigma notation
Definition 3. For a sequence of numbers, x1 , x2 ,&middot; &middot; &middot; , xn , the sum x1 + x2 + &middot; &middot; &middot; + xn is denoted by
n
X
i=1
called the sigma notation.
xi , which is
4
MINGFENG ZHAO
Remark 1. In general, for integers m ∈ Z and n ≥ m, for a sequence of numbers, xm , xm+1 , &middot; &middot; &middot; , xn , we use the
representation:
xm + xm+1 + &middot; &middot; &middot; + xn =
n
X
xi .
i=m
Example 5. For a regular partition x0 = a &lt; x1 &lt; &middot; &middot; &middot; &lt; xn = b of [a, b], then the Riemann sum can be written:
f (x∗1 )∆x + f (x∗2 )∆x + &middot; &middot; &middot; + f (x∗n )∆x =
n
X
f (x∗i )∆x.
i=1
For the choices
x∗i ’s,
we have
a. For the left Riemann sum, we have x∗i = xi−1 = a + (i − 1)∆x.
b. For the right Riemann sum, we have x∗i = xi = a + i∆x.
a + (i − 1)∆x + a + i∆x
1
xi−1 + xi
∗
=
=a+ i−
∆x.
c. For the midpoint Riemann sum, we have xi =
2
2
2
Example 6. Compute 1 + 2 + 3 + &middot; &middot; &middot; + 100.
In fact, we have
1 + 2 + 3 + &middot; &middot; &middot; + 100 =
100
X
i.
i=1
Let A = 1 + 2 + 3 + &middot; &middot; &middot; + 100, then we have
A =
=
1 + 2 + 3 + &middot; &middot; &middot; + 100
100 + 99 + 98 + &middot; &middot; &middot; + 1.
So we get
2A
=
1 + 2 + 3 + &middot; &middot; &middot; + 100
+
100 + 99 + 98 + &middot; &middot; &middot; + 1
=
100 ∗ 101.
That is,
A=
100 ∗ 101
= 50 ∗ 101 = 5050.
2
Department of Mathematics, The University of British Columbia, Room 121, 1984 Mathematics Road, Vancouver, B.C.