The shaded region below is bounded by the curve y=x2, the x-axis, and the vertical lines x=2 and x=6. This lesson finds its area, first approximately and then exactly.
The region under y = x² from x = 2 to x = 6.
Geometry has no formula for the area of this region, as it has for a rectangle, a triangle, or a circle. We approximate the region with rectangles, whose areas we can compute, and then take a limit to make the approximation exact.
Four rectangles, right endpoints
Divide the interval into subintervals of equal width and stand a rectangle on each one. When each rectangle's height is the value of f at the right endpoint of its subinterval, the sum of the rectangle areas is the right Riemann sum. With four rectangles it is written R4.
Four rectangles, left endpoints
The left Riemann sum uses the same subintervals and reads each height at the left endpoint.
The two sums bracket the exact area A:
54<A<86.
Both directions come from f being increasing. On a decreasing function they reverse. Each left endpoint then gives the largest value of f on its subinterval, and each right endpoint the smallest. So the left sum is too big and the right sum too small.
More rectangles
With four rectangles the approximation is rough. Use the slider to increase the number of rectangles n. The readout shows the Riemann sum, the exact area, and the error. Compare the left and right sums: at n=4 they differ by 32, and both approach the same value as n increases.
The third button, Midpoint, reads each height at the center of its subinterval. The section on any sample point below works out that sum for four rectangles.
Any number of rectangles
The same construction works for any number of rectangles. Take an interval [a,b] and divide it into n subintervals of equal width. We use right endpoints.
R₁₆: sixteen rectangles with right endpoints. The overestimate is smaller.
The width of each rectangle is
Δx=nb−a,
and the right endpoints are
x1=a+Δx,x2=a+2Δx,…,xi=a+iΔx,…,xn=b.
The i-th rectangle has height f(xi) and width Δx. The sum of the n areas is the approximate area,
Rn=f(x1)Δx+f(x2)Δx+⋯+f(xn)Δx=i=1∑nf(xi)Δx,
and the exact area is the limit of this sum as n→∞:
A=n→∞lim[f(x1)Δx+f(x2)Δx+⋯+f(xn)Δx].
For a continuous f this limit always exists. The left sums, which start at x0=a, approach the same number:
For f(x)=x2 on [2,6], Rn approaches A from above and Ln from below, as the explorer shows.
Any sample point
Left endpoints and right endpoints are two choices out of many. Nothing in the construction requires a rectangle's height to come from an end of its subinterval. The height may be the value of f at any point of the i-th subinterval [xi−1,xi]. Call that point ci, a sample point.
Whatever the sample points, the sum of the n rectangle areas is called a Riemann sum:
i=1∑nf(ci)Δx=f(c1)Δx+f(c2)Δx+⋯+f(cn)Δx.
The left, right, and midpoint sums are all Riemann sums. They differ only in which point of the i-th subinterval ci is.
Integrable functions
Three choices of sample point gave three different numbers: 54, 69, and 86. Each one approximates the same area. The definition below asks that they all approach one limit as n grows.
The definition asks for two things. The limit has to exist, and its value must not depend on where the sample points were taken.
Every function continuous on [a,b] is integrable there. So is every bounded function with only finitely many discontinuities, such as jumps or holes. Until improper integrals at the end of this unit, every function we integrate is one of these.
Every choice of sample point then produces the same limit, so we take whichever is easiest to compute with. That is the right endpoint, xi=a+iΔx. The left endpoint is a+(i−1)Δx and the midpoint is a+(i−21)Δx, and the extra −1 or −21 carries into every term of the sums that follow. We use right endpoints from here on.
Setting up the exact area
We return to f(x)=x2 on [2,6], now with n rectangles and right endpoints.
We can't add up this sum yet. It has n terms, and n is a variable, so the terms can't be written out one by one. To take the limit we need closed-form formulas for
i=1∑n1,i=1∑ni,i=1∑ni2.
Summation formulas
The properties let us split a sum term by term and factor out constants. Note that n is a constant with respect to the index i, so any power of n can be factored out of the sum.
Computing the exact area
We took the limit with right endpoints. Since x2 is continuous on [2,6], it is integrable there, so every other choice of sample point gives the same number. That number is the definite integral: