### Video Transcript

In this video, weβll learn how to
use right, left, and midpoint Riemann sums to numerically approximate definite
integrals. Up until this stage, youβve
probably estimated the area between the curve and the π₯-axis by splitting into
rectangles and finding their combined sum. Weβll now see how this process
links to calculus and how it can help us to numerically approximate definite
integrals.

Suppose weβre looking to find the
area between the curve π¦ equals π of π₯, the π₯-axis, and the vertical lines,
denoted π₯ equals π and π₯ equals π. The region might look a little like
this one shown, though it is possible that the function values could also be both
positive and negative. The Riemann sums give us an
approximation of this area by splitting it up into equal-sized rectangles. The heights of these rectangles
will either be given by the function value at the left endpoint of each
interval. Thatβs a left Riemann sum, the
right endpoint for a right Riemann sum, or the midpoint of each interval.

The formulae for the right and left
Riemann sums are as shown. And remember, when weβre writing a
right Riemann sum, we take values of π from one to π. And when weβre writing a left
Riemann sum, we take values of π from zero to π minus one. And that gives us the value of π
at the left endpoint of each rectangle. Now, here, Ξπ₯ is π minus π
divided by π. π and π are the beginning and end
points of the interval and π is the number of subintervals, in other words, the
number of rectangles weβre splitting the region into. Then, π₯π looks a little bit
confusing. But itβs π plus π lots of
Ξπ₯. In other words, we start at the
lower limit of our interval. And we repeatedly add Ξπ₯, the
width of each rectangle.

Now, letβs imagine weβre splitting
the region into, letβs say, two rectangles. Here, Iβve chosen the height of
each rectangle to be the value of the function of the left endpoint. Now, it follows that this is not
going to give us a very good estimate for the area between the curve and the
π₯-axis. But if we were to split further
into, say, four rectangles, our estimate will be closer to the exact area. And splitting it further into eight
rectangles, for example, and our estimate would be even closer. In fact, as the number of
rectangles or subintervals, π, approaches infinity, the approximate area approaches
the exact area between the curve and the π₯-axis.

When evaluating right Riemann sums,
we can say that the area π of the region that lies under the graph of a continuous
function π is the limit as π approaches infinity of the sum of Ξπ₯ times π of
π₯π for values of π from one to π. And when evaluating left Riemann
sums, we say that the area of the region that lies under the graph of a continuous
function π is the limit of the sum of Ξπ₯ times π of π₯π for values of π from
zero to π minus one. And in fact, instead of using left
or right endpoints, we could even take the height of the πth rectangle to be the
value of π at any number π₯π star in the πth subinterval from π₯π minus one to
π₯π. Recall π₯π star the sample
point. In this case, we can generalize our
formula, as shown.

But then, we move on to yet another
definition. And this is the definition of a
definite integral. And you might have seen this
before. If π is a function defined on the
close interval π to π, we divide that interval into π subintervals of equal
width. Thatβs Ξπ₯, where π₯ nought, π₯
one, π₯ two, and so on are endpoints of the subintervals. Then, π₯ one star, π₯ two star, up
to π₯π sample points in the subintervals so that π₯π star lies in the π
subinterval. Then, the definite integral of π
from π to π is the limit as π approaches β of the sum of Ξπ₯ times π of π₯π
star for values of π from one to π. That is, of course, providing this
limit exists and gives us the same value for all possible choices of sample
points.

But hang on a minute! We just said that the area between
the curve of π¦ equals π of π₯ and the π₯-axis between π₯ equals π and π₯ equals
π is equal to this limit. So that must mean that the definite
integral between the limits of π and π of our function is the exact area. And thatβs great because yes, there
are some functions we can integrate easily. And therefore, we can evaluate the
definite integral to find the exact area between the curve and the π₯-axis. But if we canβt, we now know that
we can use Riemann sums to help approximate it.

Letβs see what this might look
like.

The table shows the values of a
function obtained from an experiment. Estimate the definite integral
between five and 17 of π of π₯ with respect to π₯ using three equal subintervals
with left endpoints.

Remember, we can estimate a
definite integral by using Riemann sums. In this case, weβre estimating the
integral between five and 17 of π of π₯. Now, it doesnβt really matter that
we donβt know what the function is. We have enough information in our
table to perform the left Riemann sum. The left Riemann sum involves
taking the heights of our rectangles as the function value at the left endpoint of
the subinterval. We want to use three equally sized
subintervals. So letβs recall the formula that
allows us to work out the size of each subinterval, in other words, the widths of
the rectangle.

Itβs Ξπ₯ equals π minus π over
π, where π and π are the endpoints of our interval and π is the number of
subintervals. In our case, weβre looking to
evaluate the definite integral between five and 17. So we let π be equal to five and
π be equal to 17. And we want three equal
subintervals. So weβll let π be equal to
three. Ξπ₯ is then 17 minus five all
divided by three, which is simply four. Then when writing a left Riemann
sum, we take values of π from zero to π minus one. Itβs the sum of Ξπ₯ times π of
π₯π for values of π from zero to π minus one. π₯π is π plus π lots of Ξπ₯. In this case, we know that π is
equal to five, and Ξ π₯ is equal to four. So our π₯π value is given by five
plus four π.

Well, since weβre using the left
Riemann sum, we begin by letting π be equal to zero. We need to work out π₯ zero. Itβs five plus four times zero,
which is simply five. We can find π of π₯ nought in our
table. Itβs negative three. Next, we let π be equal to
one. And we get π₯ one to be five plus
four times one, which is nine. We look up the value π₯ equals nine
in our table. And we see that π of nine is
negative 0.6. Next, we let π be equal to
two. And remember, weβre looking for
values of π up to π minus one. Well, three minus one is two. So this is the last value of π
weβre interested in. This time, thatβs five plus four
times two which is 13. We look up π₯ equals 13 in our
table. And we get that π of 13 and π of
π₯ two is 1.8.

Then, according to our summation
formula, we find the sum of the products of Ξπ₯ and these values of π of π₯π. And so, an estimate for our
definite integral is four times negative three plus four times negative 0.6 plus
four times 1.8, which is negative 7.2. An estimate for the definite
integral between five and 17 of π of π₯ with respect to π₯ using three equal
subintervals is negative 7.2.

Now, we donβt need to worry here
that our answer is negative. Remember, when weβre working with
Riemann sums, weβre looking at areas. But when the function values are
negative, the rectangle sits below the π₯-axis. And so, its area is subtracted.

Letβs now have a look at how we can
use the formulae with right endpoints.

Approximate the definite integral
between negative two and two of three π₯ squared minus five π₯ with respect to π₯
using a Riemann sum with right endpoints. Take π to be eight.

Remember, we can estimate the
solution to a definite integral by using Riemann sums, in this case is the definite
integral of three π₯ squared minus five π₯ between the limits of negative two and
two. And weβre going to be using right
endpoints. When writing Riemann sums with
right endpoints, we take values of π from one to π. Itβs the sum of Ξπ₯ times π of
π₯π for these values of π, where Ξπ₯ is π minus π divided by π. Bear in mind here that π is the
number of subintervals and π₯π is equal to π plus π lots of Ξπ₯. So letβs look at what we actually
have.

Our limits are from negative two to
two. So weβll let π be equal to
negative two and π be equal to two. Weβre told that we need to take π
to be eight. Geometrically, this tells us the
number of rectangles we have. And now, we can work out Ξπ₯. Thatβs the width of each
rectangle. According to our formula, Ξπ₯ is π
minus π over π. Thatβs two minus negative two over
eight, which is one-half. And once we have Ξπ₯, we can then
work out π₯π. Itβs π which we said is negative
two plus Ξπ₯. Thatβs half times π. In other words, π₯π is negative
two plus π over two.

Now, for our Riemann sum, we need
to work out π of π₯π. Thatβs clearly π of negative two
plus π over two. We achieve this by substituting
negative two plus π over two into our formula three π₯ squared minus five π₯. And if we distribute our
parentheses and simplify, we see that π of π₯π is three-quarters π squared minus
17 over two π plus 22. Letβs now substitute Ξπ₯ and π of
π₯π into our summation formula. We now see that an approximation to
our definite interval is the sum of a half times three-quarters π squared minus 17
over two π plus 22 for values of π from one to eight. Now, actually, this constant factor
a half is independent of π. So we could actually take it
outside of the sum. And now, whilst this step isnβt
entirely necessary, it canβt simplify things on occasion.

Weβre now going to substitute
values of π from one through to eight into three-quarters π squared minus 17 over
two π plus 22 and find their sum. When π is one, we get 0.75 minus
8.5 plus 22, which is 14.25. When π is two, we get eight. When π is three, we get 3.25. When π is four, we get zero. When π is five, itβs negative
1.75. When π is six, we get negative
two. When itβs seven, we get negative
0.75. And when π is eight, we get
two. Finding the sum of these values and
then multiplying it by one-half and we get 23 over two. And so, an approximation to our
definite integral weβre using a right Riemann sum with eight subintervals is 23 over
two.

So far, weβve considered how to
estimate integrals with left and right Riemann sums. Letβs now look at how we might work
using midpoints.

Using the midpoint rule with π
equals five, round the definite integral from two to five of two π₯ over three π₯
plus two with respect to π₯ to four decimal places.

Remember, we can estimate a
definite integral by using Riemann sums. We split the region into
subintervals and create a rectangle in each. The total area of the rectangles
gives us an estimate to the integral. In a midpoint Riemann sum, the
height of each rectangle is equal to the value of the function at the midpoint of
its base. Now, working with midpoints isnβt
quite as nice as using the left or right Riemann sum. In this case, thereβs nothing to
stop us evaluating each of the areas in term. And letβs begin by working out the
width of each subinterval.

Geometrically, it tells us the
width of the rectangles. And itβs given by Ξπ₯ equals π
minus π over π, where π and π are the endpoints of the interval and π is the
number of subintervals. In our case, our lower limit is two
and our upper limit is five. We, therefore, let π be equal to
two and π be equal to five. And weβre told that π is equal to
five. Ξπ₯ is five minus two over five,
which is three-fifths or 0.6. And a table can make the next step
a little easier. In our table, weβre going to begin
by working out each of the subintervals.

We know the lower limit of our
definite integral to be two. To find the right endpoint of our
first rectangle on our first subinterval, we add 0.6 to two to get 2.6. This means our next rectangle
starts at π₯ equals 2.6. This time, we add 0.6 again. And we find the right endpoint to
be 3.2. The left endpoint of our next
rectangle must, therefore, be 3.2. And the right endpoint is 3.2 plus
Ξπ₯. Thatβs 3.8. Our next rectangle begins at
3.8. And adding 0.6, we find that it
ends at 4.4. And our fifth and final rectangle β
Remember, we wanted π to be equal to five β begins at 4.4 and then ends at 4.4 plus
0.6, which is five. And thatβs a really good start
because we know the upper limit of our interval is indeed five.

Next, weβre going to work out the
midpoint of each of these subintervals. Now, we can probably do this in our
head. But if weβre struggling, we add the
two values and divide by two. And when we do, we obtain the
midpoints to be 2.3, 2.9, 3.5, 4.1, and 4.7, respectively. To work out the height of each
rectangle, we need to work out the value of the function at these points. So, for example, in this first row,
weβll start by working out π of 2.3. To do that, we substitute 2.3 into
our function two π₯ over three π₯ plus two. And we get 46 over 89. Then, we repeat this process for π₯
equals 2.9. When we substitute 3.5 into our
function, we get 14 over 25. And the height of our final two
rectangles are 82 over 143 and 94 over 161 units, respectively.

And our very final step is to
calculate the area of each rectangle by multiplying its width by its height. Of course, the width of each
rectangle is Ξπ₯ at 0.6. So we multiply each of these
function values by 0.6 and then find their sum. Now, we could do this in turn or we
could find their sum and multiply by 0.6. Weβll get the same answer. When we do find the total of all
the values in our column titled Ξπ₯ times π of π₯π, we get 1.66571 and so on. And if we run this correct to four
decimal places, we find that an estimate that the definite integral between two and
five of two π₯ over three π₯ plus two with respect to π₯ is roughly 1.6657.

In this video, we saw that the
definite integral of some function between the limits of π and π can be
approximated using left or right Riemann sums or the midpoint rule. And we used the summation formulae
for the left and right Riemann sums. And we also saw that the midpoint
rule can be a little more complicated, but that itβs absolutely fine to use a table
to estimate the solution.