Riemann Sums (College Board AP® Calculus AB): Revision Note

Roger B

Written by: Roger B

Reviewed by: Dan Finlay

Updated on

What is a Riemann sum?

  • A Riemann sum is a method for approximating the exact value of an accumulation of change

    • Equivalently, it is a method for approximating the exact value of a definite integral

    • Or the exact area between a curve and the x-axis

  • The approximation is made by adding up the areas of a number of rectangles

  • There are three types of Riemann sum you should know and be able to use:

    • Left Riemann sum

    • Right Riemann sum

    • Midpoint Riemann sum

Left Riemann sum

How do I calculate a left Riemann sum?

  • To calculate the left Riemann sum of a function f between x=a and x=b (where a<b):

    • Divide the interval into n subintervals by choosing values x0, x1, ..., xn such that a=x0<x1<<xn=b

      • The intervals do not need to be the same size

    • Let this define n rectangles

      • The ith rectangle has a width of (xixi1)

        • This is the distance from the left-hand side of the rectangle to the right-hand side

      • The ith rectangle has a height of f(xi1)

        • This is the value of the function at the left-hand side of the rectangle

    • The left Riemann sum is the sum of the areas of these n rectangles

      • (x1x0)·f(x0)+(x2x1)·f(x1)++(xnxn1)·f(xn1)

An example of the graph of a curve, showing the rectangles used to calculate a left Riemann sum
An example of a left Riemann sum with n=5
  • In general, increasing the number of rectangles, n, gives a more accurate approximation

  • On the exam you may just be given values of the function in a table, rather than being given the function explicitly

    • See the Worked Example

How can I tell if a left Riemann sum is an underestimate or an overestimate?

  • If a function is increasing over the interval for which a left Riemann sum is being calculated

    • then the left Riemann sum will be an underestimate

  • If a function is decreasing over the interval for which a left Riemann sum is being calculated

    • then the left Riemann sum will be an overestimate

Two graphs with the rectangles used to calculate a left Riemann sum, showing that a left Riemann sum will give an underestimate for an increasing function and an overestimate for a decreasing function
  • If a function has both increasing and decreasing portions, then it is not immediately obvious whether a Riemann sum will be an underestimate or an overestimate

Worked Example

A social sciences researcher is using a function m to model the total mass of all the garden gnomes appearing on lawns in a particular neighborhood at time t. The function m is twice-differentiable, with m(t) measured in kilograms and t measured in days.

The table below gives selected values of m'(t), the rate of change of the mass, over the time interval 0t12. At time t=0, m(0)=24.9 kilograms.

t

(days)

0

3

7

10

12

m'(t)

(kilograms per day)

2.6

4.8

12.2

0.7

-1.3

(a) Use a left Riemann sum with the four subintervals indicated in the table to estimate the change in the total mass of garden gnomes between t=0 and t=12.

(b) Hence find an estimate for the total mass of the garden gnomes at t=12.

Answer:

(a)

The Riemann sum will be based on four rectangles

  • The first rectangle will have a width of (3-0) and a height equal to m'(0)

  • The second rectangle will have a width of (7-3) and a height equal to m'(3)

  • The third rectangle will have a width of (10-7) and a height equal to m'(7)

  • The fourth rectangle will have a width of (12-10) and a height equal to m'(10)

(30)·2.6+(73)·4.8+(107)·12.2+(1210)·0.7=65.0

This has units of kilograms, because each term is the product of a 'kg/day' quantity and a 'days' quantity

The mass of garden gnomes increases by approximately 65.0 kg between t=0 and t=12

(b)

The answer to part (a) only shows the change in mass

To find the estimate for the total final mass, add the initial mass of 24.9 kilograms

65.0+24.9=89.9

89.9 kg

Right Riemann sum

How do I calculate a right Riemann sum?

  • To calculate the right Riemann sum of a function f between x=a and x=b (where a<b):

    • Divide the interval into n subintervals by choosing values x0, x1, ..., xn such that a=x0<x1<<xn=b

      • The intervals do not need to be the same size

    • Let this define n rectangles

      • The ith rectangle has a width of (xixi1)

        • This is the distance from the left-hand side of the rectangle to the right-hand side

      • The ith rectangle has a height of f(xi)

        • This is the value of the function at the right-hand side of the rectangle

    • The right Riemann sum is the sum of the areas of these n rectangles

      • (x1x0)·f(x1)+(x2x1)·f(x2)++(xnxn1)·f(xn)

An example of the graph of a curve, showing the rectangles used to calculate a left Riemann sum
An example of a left Riemann sum with n=5
  • In general, increasing the number of rectangles, n, gives a more accurate approximation

  • On the exam you may just be given values of the function in a table, rather than being given the function explicitly

    • See the Worked Example

How can I tell if a right Riemann sum is an underestimate or an overestimate?

  • If a function is increasing over the interval for which a right Riemann sum is being calculated

    • then the right Riemann sum will be an overestimate

  • If a function is decreasing over the interval for which a right Riemann sum is being calculated

    • then the right Riemann sum will be an underestimate

Two graphs with the rectangles used to calculate a right Riemann sum, showing that a right Riemann sum will give an overestimate for an increasing function and an underestimate for a decreasing function
  • If a function has both increasing and decreasing portions, then it is not immediately obvious whether a Riemann sum will be an underestimate or an overestimate

Worked Example

A social sciences researcher is using a function m to model the total mass of all the garden gnomes appearing on lawns in a particular neighborhood at time t. The function m is twice-differentiable, with m(t) measured in kilograms and t measured in days.

The table below gives selected values of m'(t), the rate of change of the mass, over the time interval 0t12. At time t=0, m(0)=24.9 kilograms.

t

(days)

0

3

7

10

12

m'(t)

(kilograms per day)

2.6

4.8

12.2

0.7

-1.3

Use a right Riemann sum with the four subintervals indicated in the table to find an estimate for the total mass of the garden gnomes at t=12.

Answer:

The Riemann sum will be based on four rectangles

  • The first rectangle will have a width of (3-0) and a height equal to m'(3)

  • The second rectangle will have a width of (7-3) and a height equal to m'(7)

  • The third rectangle will have a width of (10-7) and a height equal to m'(10)

  • The fourth rectangle will have a width of (12-10) and a height equal to m'(12)

(30)·4.8+(73)·12.2+(107)·0.7+(1210)·(1.3)=62.7

This has units of kilograms, because each term is the product of a 'kg/day' quantity and a 'days' quantity

However that answer only approximates the change in mass

To find the estimate for the total final mass, add the initial mass of 24.9 kilograms

62.7+24.9=87.6

The total mass of garden gnomes at t=12 is approximately 87.6 kg

Midpoint Riemann sum

How do I calculate a midpoint Riemann sum?

  • To calculate the midpoint Riemann sum of a function f between x=a and x=b (where a<b):

    • Divide the interval into n subintervals by choosing values x0, x1, ..., xn such that a=x0<x1<<xn=b

      • The intervals do not need to be the same size

    • Let this define n rectangles

      • The ith rectangle has a width of (xixi1)

        • This is the distance from the left-hand side of the rectangle to the right-hand side

      • The ith rectangle has a height of f(xi1+xi2)

        • This is the value of the function at the midpoint of the rectangle

    • The midpoint Riemann sum is the sum of the areas of these n rectangles

      • (x1x0)·f(x0+x12)+(x2x1)·f(x1+x22)++(xnxn1)·f(xn1+xn2)

An example of the graph of a curve, showing the rectangles used to calculate a midpoint Riemann sum with n=5
An example of a midpoint Riemann sum with n=5

Examiner Tips and Tricks

Note that you take the function of the midpoint of the values. You do not take the midpoint of the values of the function. The midpoint of the values of the function are used in the trapezoidal sum.

  • It is not immediately obvious whether a midpoint Riemann sum will give an underestimate or an overestimate

    • The rectangles often combine an underestimate on one side of their midpoint line, and an overestimate on the other side

  • In general, increasing the number of rectangles, n, gives a more accurate approximation

  • On the exam you may just be given values of the function in a table, rather than being given the function explicitly

    • See the Worked Example

Worked Example

A social sciences researcher is using a function m to model the total mass of all the garden gnomes appearing on lawns in a particular neighborhood at time t. The function m is twice-differentiable, with m(t) measured in kilograms and t measured in days.

The table below gives selected values of m'(t), the rate of change of the mass, over the time interval 0t12. At time t=0, m(0)=24.9 kilograms.

t

(days)

0

1.5

3

5

7

8.5

10

11

12

m'(t)

(kg/ day)

2.6

3.5

4.8

9.1

12.2

5.2

0.7

-0.1

-1.3

Use a midpoint Riemann sum to find an estimate for the total mass of the garden gnomes at t=12. Use four subintervals to calculate the sum, for subintervals of t between 0 and 3, 3 and 7, 7 and 10, and 10 and 12.

Answer:

Note that 1.5, 5, 8.5 and 11 are the midpoints of the intervals 0-3, 3-7, 7-10 and 10-12, respectively

The Riemann sum will be based on four rectangles

  • The first rectangle will have a width of (3-0) and a height equal to m'(1.5)

  • The second rectangle will have a width of (7-3) and a height equal to m'(5)

  • The third rectangle will have a width of (10-7) and a height equal to m'(8.5)

  • The fourth rectangle will have a width of (12-10) and a height equal to m'(11)

(30)·3.5+(73)·9.1+(107)·5.2+(1210)·(0.1)=62.3

This has units of kilograms, because each term is the product of a 'kg/day' quantity and a 'days' quantity

However that answer only approximates the change in mass

To find the estimate for the total final mass, add the initial mass of 24.9 kilograms

62.3+24.9=87.2

The total mass of garden gnomes at t=12 is approximately 87.2 kg

Unlock more, it's free!

Join the 100,000+ Students that ❤️ Save My Exams

the (exam) results speak for themselves:

Build on this topic

Roger B

Author: Roger B

Expertise: Development Editor

Roger's teaching experience stretches all the way back to 1992, and in that time he has taught students at all levels between Year 7 and university undergraduate. Having conducted and published postgraduate research into the mathematical theory behind quantum computing, he is more than confident in dealing with mathematics at any level the exam boards might throw at you.

Dan Finlay

Reviewer: Dan Finlay

Expertise: Portfolio Lead

Dan graduated from the University of Oxford with a First class degree in mathematics. As well as teaching maths for over 8 years, Dan has marked a range of exams for Edexcel, tutored students and taught A Level Accounting. Dan has a keen interest in statistics and probability and their real-life applications.