what are riemann sums? a riemann sum is a sum that estimates the value of a definite integral (or area under a curve if the function is positive). there are a number of different types of riemann sum that are important to master for the ap calculus bc exam.
we’ll cover the basics and see a few examples below.
riemann sums — definition
given a function f(x), and an interval [a, b], a riemann sum estimates the value of the definite integral of f(x) from x = a to x = b according to the formula:
what does it all mean???
first of all, it’s important to know what all that notation means.
that big greek letter sigma (σ) is an instruction to add up a bunch of terms.
what follows the σ are the terms that you will compute and add up.
each term is an area calculation for a rectangle. as you know, the area of any rectangle is equal to its height times its width.
in the case of a riemann sum, the heights are always function values:
on the other hand, the width is the same for each rectangle, and there’s a formula to find it:
here, a and b are the given endpoints of the interval. (equivalently, those are the bounds of integration in a definite integral.) the variable n stands for the number of rectangles in the riemann sum.
we will also need to know about the points xk that serve to cut up the interval. here’s a formula to find each one (just plugin in k = 0, 1, 2, …, n).
now different kinds of riemann sums use these xk points in different ways. although it seems like a lot to remember, the process is actually pretty straightforward. try not to stress out!
types of riemann sum
there are three basic types of riemann sum that could show up on the calculus bc exam.
- right endpoint sum
- left endpoint sum
- midpoint rule
other, more advanced estimation formulas such as the trapezoid rule and simpson’s rule, are not technically riemann sums. however, they are similar in spirit, and so we’ll talk about them as well.
no matter what, every method begins the same way.
- find δx.
- find the points xk.
i like to put the points xk onto a number line. you should always have x0 = a and xn = b, as shown below.
examples
let’s estimate the value of , using right endpoint, left endpoint, and midpoint riemann sums with four rectangles.
setup steps
first, find the width δx. here, a = 1, b = 3, and n = 4 are given.
next, find the points xk.
right endpoints
for the right endpoint sum, ignore x0. the reason is that x0 is the extreme left point of the interval, and so it is not the right endpoint of any subinterval.
we will plug in the other points into the given function in order to find their heights. at this point, it helps to sketch the graph and understand where the right-endpoint rectangles are situated.
i like to organize my work into a table. there will be a column for the right endpoints, the heights and widths of each rectangle, and a final column for areas. just multiply height × width to get area. then add the numbers in the final column.
right endpoints | height: f(x) = √(x) + 1 | width: δx | area |
---|---|---|---|
1.5 | √(1.5) + 1 = 2.22 | 1/2 | 1.11 |
2 | √(2) + 1 = 2.41 | 1/2 | 1.21 |
2.5 | √(2.5) + 1 = 2.58 | 1/2 | 1.29 |
3 | √(3) + 1 = 2.73 | 1/2 | 1.37 |
total: | 4.98 |
the final answer is 4.98.
left endpoints
once you have seen a right riemann sum, the left riemann sum will be super easy. the only difference is which x-values to use. this time, ignore the extreme right endpoint, xn.
left endpoints | height: f(x) = √(x) + 1 | width: δx | area |
---|---|---|---|
1 | √(1) + 1 = 2 | 1/2 | 1 |
1.5 | √(1.5) + 1 = 2.22 | 1/2 | 1.11 |
2 | √(2) + 1 = 2.41 | 1/2 | 1.21 |
2.5 | √(2.5) + 1 = 2.58 | 1/2 | 1.29 |
total: | 4.61 |
this time, we get 4.61 as a final answer.
midpoint rule
now for midpoint rule, we have to do an extra step.
calculate the midpoints of each subinterval. there’s an easy formula to do this:
so let’s find those midpoints in our example!
here is what the midpoint rule looks like. notice that each rectangle’s height is governed by where its midline hits the curve.
now plug these midpoints into the formula (again, using a table).
midpoints | height: f(x) = √(x) + 1 | width: δx | area |
---|---|---|---|
1.25 | √(1.25) + 1 = 2.12 | 1/2 | 1.06 |
1.75 | √(1.75) + 1 = 2.32 | 1/2 | 1.16 |
2.25 | √(2.25) + 1 = 2.50 | 1/2 | 1.25 |
2.75 | √(2.75) + 1 = 2.66 | 1/2 | 1.33 |
total: | 4.80 |
here, the final answer is 4.8.
more advanced approximation methods
although the following methods are not really riemann sums, they do fit the general pattern. first of all, both trapezoid rule and simpson’s rule involve sums of certain function values. second, both methods estimate the value of a definite integral.
let’s see how they work.
trapezoid rule
the trapezoid rule is so named because we use trapezoids rather than rectangles to do the approximation.
without getting bogged down in the theoretical details, there is a formula that works out all of the trapezoid areas for you.
so, with our running example, the estimate using four trapezoids is:
the final answer is about 4.788.
simpson’s rule
simpson’s rule is a much more accurate way to estimate the definite integral value. however, the formula is a little trickier.
for one thing, you must use an even number of subintervals. that is, n must be even.
except for the first and last terms, the coefficients alternate between 4 and 2.
here’s an example of using simpson’s rule:
working out this sum, you should get approximately 4.792.
relationship to the definite integral
finite riemann sums only provide estimates. however, as the number of rectangles increases, the better the estimate will be.
in fact, in the limit as n → ∞, the riemann sum converges to the exact area under the curve!
fortunately you won’t have to work out this kind of limit on the exam. instead, you can rely on more straightforward formulas specific to integration. see ap calculus exam review: integrals for more about that.
leave a reply