A Riemann sum approximates the area between a curve and the -axis by a collection of rectangles. The definite integral is what those approximations converge to as the rectangles become infinitely thin.
| Formula | Name | Notes |
|---|---|---|
| Riemann Sum | , and is any point in the -th subinterval | |
| Uniform Subinterval Width | Used when the subintervals all have the same width | |
| Left Riemann Sum | Sample point at the left endpoint | |
| Right Riemann Sum | Sample point at the right endpoint | |
| Middle Riemann Sum | Sample point at the midpoint | |
| Definite Integral | Exists whenever is continuous on | |
| Reversal Rule | Swapping the limits reverses the sign | |
| Zero-Width Rule | An interval of zero length contributes nothing | |
| Summation Formulas | Needed to evaluate Riemann sums in closed form | |
| Sum of Squares | Needed for integrands involving |
Riemann Sums
Let be defined for . Choose points arbitrarily between a and b
thus dividing the interval into subintervals:
In each of these subintervals, take a value where , and form the sum
S_{n}=f(x_{1}^{*})(x_{1}-x_{0})+f(x_{2}^{*})(x_{2}-x_{1})+\cdots+f(x_{n}^{*})(x_{n}-x_{n-1}). \tag{1}
The sum in Equation (1) is called a Riemann sum for on the interval , after the German mathematician Georg Friedrich Bernhard Riemann (1826-1866). The points are called sample points.
Now let us see what the geometrical interpretation of is. First suppose for all . In this case each term of the sum is the area of a rectangle whose base is a subinterval and whose height is the value of at the sample point:
the area of the rectangle ,
the area of the rectangle ,
the area of the rectangle ,
the area of the rectangle .
Thus represents the total area of all the rectangles in the figure, and approximates the area of the region that lies between the curve and the -axis between and .
If takes both positive and negative values on , then is an approximation for the net area (or the signed area, or sometimes the "net signed area"); that is, the area below the curve and above the -axis minus the area above the curve and below the -axis from to .
The Riemann sum (1) is often shortened as
where (sigma), the Greek form of the letter S, stands for the word "summation." The whole expression indicates that the sum is to be taken of all terms obtained from by giving to k in succession the values .
By introducing the symbol
we can shorten it further and write:
S_{n}=\sum_{k=1}^{n}f(x_{k}^{*})\,\Delta_{k}x. \tag{2}
Please note that here is not a factor. It denotes a difference, in this case the length of the -th subinterval. Many books write instead of ; the two notations mean the same thing.
Some Specific Types of Riemann Sums
The definition allows the sample point to be any point of the -th subinterval. Certain standard choices have their own names.
If the sample point in each subinterval is the left endpoint of the subinterval, that is, if for all k, then is called a left Riemann sum.

If the sample point in each subinterval is the right endpoint of the subinterval, that is, if for all k, then is called a right Riemann sum.

If the sample point in each subinterval is the midpoint of the subinterval, that is, if for all k, then is called a middle Riemann sum (or midpoint Riemann sum).

The graph of is shown below. Estimate the net area between the graph of and the -axis on the interval using five subintervals of equal width and
(a) a left Riemann sum
(b) a right Riemann sum
(c) a midpoint Riemann sum.

Solution
With , and , the width of the rectangles is
(a) The height of each rectangle in a left Riemann sum is the value of the function at the left boundary of each subinterval. The sum of the areas of the rectangles is
\begin{aligned} \Delta x&\left[f(-0.5)+f(0.5)+f(1.5)+f(2.5)+f(3.5)\right]\\ &=1.0\left[1.5+3+4+2.5+(-0.5)\right]=10.5. \end{aligned}
(b) The height of each rectangle in a right Riemann sum is the value of the function at the right boundary of each subinterval. The sum of the areas of the rectangles is
\begin{aligned} \Delta x&\left[f(0.5)+f(1.5)+f(2.5)+f(3.5)+f(4.5)\right]\\ &=1.0\left[3+4+2.5+(-0.5)+(-0.5)\right]=8.5. \end{aligned}
(c) The height of each rectangle in a midpoint Riemann sum is the value of the function at the middle of each subinterval. There are five subintervals and we choose to be the midpoint of the -th one:
- In the first subinterval , .
- In the second subinterval , .
- In the third subinterval , .
- In the fourth subinterval , .
- In the last subinterval , .
Therefore, the sum of the areas of the rectangles is
\begin{aligned} \sum_{k=1}^{5}f(x_{k}^{*})\Delta x &=\Delta x\left[f(0)+f(1)+f(2)+f(3)+f(4)\right]\\ &=1.0\left[2+3.5+3.5+1+(-1)\right]=9. \end{aligned}
Two further choices of sample point are important because they bracket every other Riemann sum.
If the sample point in each subinterval is chosen such that is the maximum value of on the subinterval for all k, then is called an upper Riemann sum.

If the sample point in each subinterval is chosen such that is the minimum value of on the subinterval for all k, then is called a lower Riemann sum.

Because every sample value lies between the minimum and the maximum on its subinterval, every Riemann sum for a given subdivision lies between the lower sum and the upper sum for that subdivision. In the example below, the five-rectangle estimates 10.5, 8.5 and 9 all lie between 5.5 and 13.
The graph of is the same as in the previous example. Estimate the net area between the graph of and the -axis on the interval using five subintervals of equal width and
(a) an upper Riemann sum
(b) a lower Riemann sum.

Solution
(a) As in the previous example, the width of the rectangles is
There are five subintervals: , , , , and . The height of each rectangle is the maximum value of the function (the maximum -value) in the corresponding subinterval.
- When , the maximum value of occurs at .
- When , the maximum value of occurs at .
- When , the maximum value of occurs at .
- When , the maximum value of occurs at .
- When , the maximum value of occurs at or .
Therefore, the upper Riemann sum is
\begin{aligned} \sum_{k=1}^{5}f(x_{k}^{*})\Delta x &=\Delta x\left[f(0.5)+f(1.5)+f(1.5)+f(2.5)+f(4.5)\right]\\ &=1.0\left[3+4+4+2.5+(-0.5)\right]=13. \end{aligned}(b) The height of each rectangle is now the minimum value of the function (the minimum -value) in the corresponding subinterval.
- When , the minimum value of occurs at .
- When , the minimum value of occurs at .
- When , the minimum value of occurs at .
- When , the minimum value of occurs at .
- When , the minimum value of occurs at .
Therefore, the lower Riemann sum is
\begin{aligned} \sum_{k=1}^{5}f(x_{k}^{*})\Delta x &=\Delta x\left[f(-0.5)+f(0.5)+f(2.5)+f(3.5)+f(4)\right]\\ &=1.0\left[1.5+3+2.5+(-0.5)+(-1)\right]=5.5. \end{aligned}
Limit of the Riemann Sums as
If the number of subintervals n increases so that the subinterval lengths (or widths) get smaller and the rectangles become thinner, then the Riemann sum becomes a better approximation to the net area between the curve and the -axis.



Now let the number of subintervals n increase indefinitely , while the width of the widest subinterval approaches zero. If the sum (1), equivalently (2), approaches a number which is independent of the choice of the 's and of the 's, its limit is called the definite integral of between a and b, and is denoted by .
The limit of the sum (2), provided that the number of subintervals n tends to infinity and at the same time the length of each subinterval approaches zero, is called the definite integral of from a to b and is denoted by . If this limit exists, the function is called integrable on the interval .
In words: chop the interval up, build the rectangles, add their signed areas, and then squeeze all the widths down to zero. If that process settles on one number no matter how you chopped or where you sampled, that number is the integral.

We note that:
- The use of the word "integral" and of the symbol suggests a connection with the indefinite integrals of the previous chapter. This connection is established in Section 7.3.
- The symbol is a modified form of S, which stands for summation.
- We call a the lower limit and b the upper limit of integration (or of the interval), and the function the integrand.
- If the integral exists, is called integrable between a and b.
- If is continuous on the interval then exists. The proof of this theorem is beyond the scope of an elementary book.
Dummy Variables
The letter k chosen for the summation index in the Riemann sum is a dummy variable; that is, it can be replaced by any other letter such as i without affecting the value of the sum, provided of course that it is replaced everywhere k occurs:
Similarly, the letter x chosen for the variable of integration in is a dummy variable, which disappears in the final result. In other words, it can be replaced by any other letter we wish without affecting the integral:
For example, if
then
Therefore, instead of , we may sometimes simply write
Unlike the case of the definite integral, the variable of integration in an indefinite integral is not a dummy variable, because it appears in the final result. For example,
and in this sense
Reversing the Limits of Integration
In the previous discussion, we assumed . However, if we omit this condition and assume , we can still retain our definition of the integral; the only change is that we have to number the subdivision points from the right side, which makes the differences negative. We are thus led to the relation
In conformity with this, we define
Evaluating Integrals from the Definition
The next two examples carry out the full limit computation. They are laborious, which is exactly the point: Section 7.3 will replace them with a two-line calculation.
Find by the limit definition.
Solution
Let us divide the interval into n subintervals of equal width . In each subinterval , let us use as the sample point:
\begin{aligned} x_{0} &=-1\\ x_{1} &=-1+\Delta x=-1+\frac{4}{n}\\ x_{2} &=-1+2\Delta x=-1+2\left(\frac{4}{n}\right)\\ &\vdots\\ x_{k} &=-1+k\Delta x=-1+k\left(\frac{4}{n}\right)\\ &\vdots\\ x_{n} &=-1+n\Delta x=-1+n\left(\frac{4}{n}\right)=-1+4=3. \end{aligned}Therefore , and
\begin{aligned} \sum_{k=1}^{n}f(x_{k}^{*})\Delta_{k}x &=\sum_{k=1}^{n}\left(3-\frac{4k}{n}\right)\frac{4}{n}\\ &=\sum_{k=1}^{n}\left(\frac{12}{n}-\frac{16k}{n^{2}}\right)\\ &=\frac{12}{n}\sum_{k=1}^{n}1-\frac{16}{n^{2}}\sum_{k=1}^{n}k\\ &=\frac{12}{n}(n)-\frac{16}{n^{2}}\cdot\frac{n(n+1)}{2}\\ &=12-8\left(1+\frac{1}{n}\right). \end{aligned}Notice that in the above summation, n is a fixed number (say ) and not a function of the summation index k. That is why we could move n outside the sigma sign. We have also used the formulas and .
Because the width of each subinterval is the same, is equivalent to , and we can conclude
\begin{aligned} \int_{-1}^{3}(2-x)\,dx &=\lim_{n\to\infty}\sum_{k=1}^{n}f(x_{k}^{*})\Delta x\\ &=\lim_{n\to\infty}\left[12-8\left(1+\frac{1}{n}\right)\right]\\ &=12-8(1+0)=4. \end{aligned}You can easily show that if we use instead of as the sample point in each subinterval , we arrive at the same result.
Because the graph of is a straight line, we can check our answer with elementary geometry. We subtract the area of the part that lies below the -axis from the area of the part that is above the -axis. It follows from the triangle area formula that

Find by the limit definition.
Solution
Let us divide the interval into n subintervals of equal width :
\begin{aligned} x_{0} &=1\\ x_{1} &=1+\Delta x=1+\frac{2}{n}\\ x_{2} &=1+2\Delta x=1+2\left(\frac{2}{n}\right)\\ &\vdots\\ x_{k} &=1+k\Delta x=1+k\left(\frac{2}{n}\right)\\ &\vdots\\ x_{n} &=1+n\Delta x=1+n\left(\frac{2}{n}\right)=3. \end{aligned}Take . Then
\begin{aligned} \sum_{k=1}^{n}f(x_{k}^{*})\Delta x &=\sum_{k=1}^{n}\left[\frac{2}{n}+\frac{8k}{n^{2}}+\frac{8k^{2}}{n^{3}}\right]\\ &=\frac{2}{n}\sum_{k=1}^{n}1+\frac{8}{n^{2}}\sum_{k=1}^{n}k+\frac{8}{n^{3}}\sum_{k=1}^{n}k^{2}\\ &=\frac{2}{n}\cdot n+\frac{8}{n^{2}}\cdot\frac{n(n+1)}{2}+\frac{8}{n^{3}}\cdot\frac{n(n+1)(2n+1)}{6}\\ &=2+4\cdot\frac{n+1}{n}+\frac{4}{3}\left(\frac{n+1}{n}\right)\left(\frac{2n+1}{n}\right)\\ &=2+4\left(1+\frac{1}{n}\right)+\frac{4}{3}\left(1+\frac{1}{n}\right)\left(2+\frac{1}{n}\right). \end{aligned}The width of every subinterval is the same, and is equivalent to . As , , and hence
\begin{aligned} \int_{1}^{3}x^{2}\,dx &=\lim_{n\to\infty}\sum_{k=1}^{n}f(x_{k}^{*})\Delta x\\ &=\lim_{n\to\infty}\left[2+4\left(1+\frac{1}{n}\right)+\frac{4}{3}\left(1+\frac{1}{n}\right)\left(2+\frac{1}{n}\right)\right]\\ &=2+4(1+0)+\frac{4}{3}(1+0)(2+0)\\ &=\frac{26}{3}. \end{aligned}There are no formulas from elementary geometry that can help us verify our answer, but we will soon learn a theorem, called the Fundamental Theorem of Calculus, that enables us to evaluate such definite integrals easily.

Using Geometry Instead of the Limit
When the region under the graph is made of triangles, rectangles, or circular pieces, we can read off the integral without any limit at all.
Find by interpreting the integral as the net area under the graph.
Solution
We know what the graph of looks like. To sketch the graph of , we simply shift the graph of downward units. The net area of the region between the graph of and the -axis over can then be computed from triangles:
\begin{aligned} \int_{-1}^{3}(|x|-2)\,dx &=-A_{1}-A_{2}-A_{3}+A_{4}\\ &=-1-\frac{1}{2}-2+\frac{1}{2}\\ &=-3. \end{aligned}The answer is negative because most of the region lies below the -axis.

Find using a geometric formula.
Solution
We recognize that the curve is the upper semicircle of radius 1 centered at the origin. Because we can easily compute the area between the semicircle and the -axis, taking the limit of Riemann sums is not required.
\begin{aligned} \int_{-1}^{1}\sqrt{1-x^{2}}\,dx &=\text{area between the semicircle of radius 1 and the }x\text{-axis}\\ &=\frac{1}{2}(\text{area of a circle of radius 1})\\ &=\frac{1}{2}\pi(1)^{2}=\frac{\pi}{2}. \end{aligned}
Exercises
Let on the interval . Using four subintervals of equal width, compute
(a) the left Riemann sum,
(b) the right Riemann sum,
(c) the midpoint Riemann sum.
Answer
(a) (b) (c)
Solution
Here and the partition points are .
(a) Left endpoints are :
\begin{aligned} S &= \tfrac{1}{2}\left[f(0)+f(0.5)+f(1)+f(1.5)\right]\\ &= \tfrac{1}{2}\left[1+1.25+2+3.25\right]=\tfrac{15}{4}. \end{aligned}(b) Right endpoints are :
\begin{aligned} S &= \tfrac{1}{2}\left[1.25+2+3.25+5\right]=\tfrac{23}{4}. \end{aligned}(c) Midpoints are :
\begin{aligned} S &= \tfrac{1}{2}\left[1.0625+1.5625+2.5625+4.0625\right]=\tfrac{37}{8}. \end{aligned}The exact value is . As expected, the midpoint sum is by far the best of the three estimates, and because is increasing on the left sum is the lower sum and the right sum is the upper sum. In the pictures this is visible at a glance: the left rectangles all sit below the curve, the right rectangles all poke above it, and the midpoint rectangles cut through it so that the overshoot and the undershoot nearly cancel.
For on with three subintervals of equal width, identify the upper Riemann sum and the lower Riemann sum, and compute both.
Answer
The upper sum is the left sum, ; the lower sum is the right sum, .
Solution
Here , with subintervals , , .
Since is decreasing on , the maximum on each subinterval occurs at its left endpoint and the minimum at its right endpoint. So the upper sum is the left sum, and the lower sum is the right sum. This reversal compared with the previous exercise is the whole point: "upper" does not mean "right."
Upper (left) sum:
\begin{aligned} U &= \tfrac{2}{3}\left[f(0)+f\!\left(\tfrac{2}{3}\right)+f\!\left(\tfrac{4}{3}\right)\right]\\ &= \tfrac{2}{3}\left[4+\tfrac{32}{9}+\tfrac{20}{9}\right] = \tfrac{2}{3}\cdot\tfrac{88}{9}=\tfrac{176}{27}\approx6.52. \end{aligned}Lower (right) sum:
\begin{aligned} L &= \tfrac{2}{3}\left[f\!\left(\tfrac{2}{3}\right)+f\!\left(\tfrac{4}{3}\right)+f(2)\right]\\ &= \tfrac{2}{3}\left[\tfrac{32}{9}+\tfrac{20}{9}+0\right] = \tfrac{2}{3}\cdot\tfrac{52}{9}=\tfrac{104}{27}\approx3.85. \end{aligned}The exact value lies between them, as it must. Compare the two pictures with those of the previous exercise: there the taller rectangles were on the right, here they are on the left, and the only thing that changed was whether increases or decreases.
Evaluate directly from the limit definition, using right endpoints as the sample points.
Answer
Solution
With and ,
\begin{aligned} \sum_{k=1}^{n}f(x_{k})\Delta x &= \sum_{k=1}^{n}\left(\frac{6k}{n}+1\right)\frac{2}{n}\\ &= \frac{12}{n^{2}}\sum_{k=1}^{n}k+\frac{2}{n}\sum_{k=1}^{n}1\\ &= \frac{12}{n^{2}}\cdot\frac{n(n+1)}{2}+\frac{2}{n}\cdot n\\ &= 6\left(1+\frac{1}{n}\right)+2. \end{aligned}Letting gives .
Check by geometry. The region is a trapezoid with parallel sides and and width 2, so its area is .
Evaluate from the definition, and state which summation formula you needed.
Answer
, using .
Solution
Take and . Then
\begin{aligned} \sum_{k=1}^{n}x_{k}^{2}\,\Delta x &= \sum_{k=1}^{n}\frac{k^{2}}{n^{2}}\cdot\frac{1}{n} = \frac{1}{n^{3}}\sum_{k=1}^{n}k^{2}\\ &= \frac{1}{n^{3}}\cdot\frac{n(n+1)(2n+1)}{6}\\ &= \frac{1}{6}\left(1+\frac{1}{n}\right)\left(2+\frac{1}{n}\right). \end{aligned}As this tends to .
Use geometry, not the limit definition, to evaluate each integral:
(a)
(b)
(c)
Answer
(a) (b) (c)
Solution
(a) The graph consists of two triangles, each with base 2 and height 2, both above the axis: .
(b) is the upper semicircle of radius 3. From to we get one quarter of the disc: .
(c) The line crosses the axis at . Above the axis on we get a triangle of base 2 and height 2, area 2. Below the axis on we get a triangle of base 1 and height 1, area , counted negatively: .
Express the following limit as a definite integral:
Answer
(equivalently ).
Solution
Read the sum against the template . Here , which corresponds to an interval of total length 1, and the sample point is , a right endpoint on . The remaining factor is . Therefore
The answer is not unique: with the substitution the same limit equals . Any correct reading of the pattern is acceptable.
Suppose . Find
(a)
(b)
(c)
Answer
(a) (b) (c)
Solution
(a) By the reversal rule, swapping the limits changes the sign.
(b) By the zero-width rule, an integral over an interval of length zero is zero.
(c) The variable of integration in a definite integral is a dummy variable, so renaming as changes nothing.
Sketch the graph of on and use it to explain why is positive even though part of the graph lies below the -axis. Then compute the value.
Answer
; the area above the axis (2) exceeds the area below it .
Solution
The line crosses the -axis at . On the graph lies below the axis, forming a triangle of base 1 and height 1, so its area is and it contributes . On the graph lies above the axis, forming a triangle of base 2 and height 2, area 2, contributing . The net area is
The integral measures net area, so a sign-changing integrand can still give a positive answer whenever the region above the axis is larger. The total geometric area, by contrast, would be .
Explain why need not exist if is unbounded on , using for and as an illustration.
Answer
Because sample points can be chosen arbitrarily close to , the Riemann sums can be made arbitrarily large, so no single limiting value exists.
Solution
Fix any subdivision of and consider the first subinterval . The sample point may be chosen anywhere in it, and can be made as large as we please by taking close enough to zero. Its contribution to the Riemann sum is , which therefore has no upper bound, no matter how fine the subdivision is.
Since the sums do not approach a single number independent of the choice of the 's, the defining limit fails to exist and is not integrable on in the sense of this section. (Integrals of this kind are treated separately as improper integrals.)
The moral: boundedness is necessary for Riemann integrability, and continuity on is a convenient sufficient condition.
Let be continuous and increasing on , and let and be the left and right Riemann sums with n equal subintervals. Show that
and explain what this says about the accuracy of the estimates.
Answer
The difference telescopes to with , so the gap between the two estimates shrinks like .
Solution
With and partition points ,
\begin{aligned} R_{n}-L_{n} &= \Delta x\sum_{k=1}^{n}f(x_{k})-\Delta x\sum_{k=1}^{n}f(x_{k-1})\\ &= \Delta x\sum_{k=1}^{n}\left[f(x_{k})-f(x_{k-1})\right]. \end{aligned}The sum telescopes: every interior term appears once with a plus sign and once with a minus sign, leaving only . Hence
Because is increasing, is the lower sum and is the upper sum, so the true value of the integral is trapped between them. The width of that trap is proportional to , which both proves that the two sums converge to a common limit and tells us that doubling the number of rectangles roughly halves the error.
Express the following limit as a definite integral, and evaluate it geometrically if you can:
Answer
Solution
Force the expression into the shape by peeling off one factor of :
So , which signals an interval of total length 1, and the sample point is , the right endpoint of the -th subinterval of . The remaining factor is . Hence
This is exactly the integral computed from the definition in Exercise 4, whose value is . Geometry alone will not give it, since the region under a parabola is not made of triangles and circular arcs, but the summation formula does.
Express the following limit as a definite integral:
What does the value of this integral say about the average height of one arch of the sine curve?
Answer
; the average height of the arch is .
Solution
The factor sitting outside the sine is , so and the interval has total length . The sample point is
which runs from up to : these are the right endpoints of the equal subintervals of . The remaining factor is . Therefore
Notice the pattern in both this exercise and the previous one: the factor multiplying the sum is always , and dividing the interval length by it recovers . Reading first is the fastest way to identify the interval.
The average height. One arch of sits over an interval of length and encloses area 2, so a rectangle of the same base with the same area would have height . That is the average value of over , a quantity studied in Section 7.7. It is noticeably less than the peak height 1, because the arch is near its maximum only briefly.
Let on the interval , divided into three subintervals of equal width. Compute the upper Riemann sum and the lower Riemann sum , and compare them with the left and right Riemann sums.
Answer
, , left sum , right sum . The exact value is . Neither the left nor the right sum is the upper or the lower sum.
Solution
Here , and the subintervals are , , .
The essential point is that is decreasing on and increasing on . So the location of the maximum and the minimum is not the same in every subinterval:
| Subinterval | Behaviour of | Maximum | Minimum |
|---|---|---|---|
| decreasing | (left end) | (right end) | |
| increasing | (right end) | (left end) | |
| increasing | (right end) | (left end) |
Upper sum. Take the maximum on each subinterval:
Lower sum. Take the minimum on each subinterval:
Comparison with the left and right sums.
The exact value is
All four estimates satisfy , as they must, but neither the left sum nor the right sum equals the upper or the lower sum. That coincidence happens only when is monotone on the whole interval, as in Exercises 1 and 2. Here the subinterval takes its maximum at the left end while the other two take theirs at the right end, so no single endpoint rule can produce the upper sum.
Let on with four subintervals of equal width. Compute the upper and lower Riemann sums, and explain why the left and right Riemann sums are equal to each other yet equal to neither of them.
Answer
and ; the left and right sums both equal . The exact value is .
Solution
Here and the subintervals are , , , . The sine curve increases on and decreases on , so the two halves behave in opposite ways.
| Subinterval | Behaviour | Maximum | Minimum |
|---|---|---|---|
| increasing | |||
| increasing | |||
| decreasing | |||
| decreasing |
Upper sum.
\begin{aligned} U &= \frac{\pi}{4}\left[\frac{\sqrt{2}}{2}+1+1+\frac{\sqrt{2}}{2}\right]\\ &= \frac{\pi}{4}\left(2+\sqrt{2}\right)\approx2.6812. \end{aligned}Lower sum.
\begin{aligned} L &= \frac{\pi}{4}\left[0+\frac{\sqrt{2}}{2}+\frac{\sqrt{2}}{2}+0\right]\\ &= \frac{\pi\sqrt{2}}{4}\approx1.1107. \end{aligned}Notice that the first and last rectangles of the lower sum are degenerate: the minimum of on and on is , so those rectangles collapse onto the -axis and contribute nothing. They are drawn as dashed segments above.
The left and right sums.
They are equal, both approximately , because the list of sample values is the same list read backwards: the symmetry of the sine arch about makes take the same four values at the left endpoints as at the right endpoints.
Yet neither equals or . On the rising half the maximum sits at the right endpoint, while on the falling half it sits at the left endpoint, so the upper sum mixes the two rules; the lower sum mixes them the other way. The exact value is , and indeed
The general lesson from this exercise and the previous one: upper and lower sums are defined by the behaviour of , not by a fixed choice of endpoint. They coincide with the right and left sums only when is monotone throughout .