Achievable logoAchievable logo
AP Calculus AB
Sign in
Sign up
Purchase
Textbook
Practice exams
Support
How it works
Exam catalog
Mountain with a flag at the peak
Textbook
Introduction
1. Limits
2. Derivative basics
3. Advanced differentiation
4. Contextual uses
5. Analytical uses
6. Integration
6.1 Accumulation of change
6.2 Riemann sums & area
6.3 Definite integrals
6.4 Accumulation functions
6.5 Behavior of accumulation functions
6.6 Fundamental theorem of calculus
6.7 Indefinite integrals
6.8 u-substitution
6.9 Long division & completing the square
7. Differential equations
8. Applications of integrals
9. Testing details tag
Wrapping up
Achievable logoAchievable logo
6.2 Riemann sums & area
Achievable AP Calculus AB
6. Integration
Our AP Calculus AB course is currently in development and is a work-in-progress.

Riemann sums & area

9 min read
Font
Discuss
Share
Feedback

What you’ll learn:

  • How to approximate the area under a curve using rectangles (Riemann sums) and trapezoids
  • Calculate Riemann sums for intervals of unequal widths
  • Interpret whether left or right sums over- or underestimate based on the function’s behavior

In the previous section, areas were easy to find because the regions were simple geometric shapes. Now suppose you want the area under a curved graph, like f(x)=x2, from x=a to x=b. Before learning how to find the exact area, it helps to start with an approximation.

A common approach is to break the interval into smaller pieces, approximate the region with rectangles (or trapezoids), and add up their areas. This idea leads to Riemann sum approximations.

Riemann sums to estimate area

There are 3 main types of Riemann approximations: left, right, and midpoint Riemann sums. All three use rectangles.

Another common approximation is the Trapezoidal rule, which uses trapezoids. It isn’t technically a Riemann sum, but it follows the same “partition and add” process.

Here are the steps to finding a Riemann sum:

  1. Divide the interval [a,b] into n subintervals, where each subinterval has equal width Δx:

Δx=nb−a​

  1. On each subinterval, choose a point xk​ to evaluate the function (this choice depends on which type of Riemann sum you’re using).

  2. Multiply the function value f(xk​) by the width Δxto get the area of a rectangle.
    For a trapezoid,Δx is the height of each trapezoid while the function values are the bases.

    • Note: If the function value is negative, the rectangle lies below the x-axis, so its contribution is negative. That’s expected here because we’re approximating net signed area, which accounts for both positive and negative values.
  3. Add the areas together.

Examples

Estimate the area under f(x)=x2 with n=4 subintervals on the interval [1,5]using a:

a) Right Riemann sum
b) Left Riemann sum
c) Midpoint Riemann sum
d) Trapezoidal sum

a) Right Riemann sum

  1. Divide the interval[1,5] into n=4 subintervals, each with equal width:

Δx=nb−a​

=45−1​

=1

This step is the same for all of the sums.

  1. Since n=4 and this is a right Riemann sum, use the right endpoint of each subinterval to set the rectangle height.
Figure 6.2.1 Right Riemann sum
Figure 6.2.1 Right Riemann sum
  1. The right endpoints are x=5,4,3,2 and the function values are:
  • f(5)=25
  • f(4)=16
  • f(3)=9
  • f(2)=4
  1. Then the right Riemann sum is

R4​=Δx(f(5)+f(4)+f(3)+f(2))

=1(25+16+9+4)

=54 units2

b) Left Riemann sum

  1. Just as in part a),

Δx=1

  1. For a left Riemann sum, use the left endpoint of each subinterval to set the rectangle height.
Figure 6.2.2 Left Riemann sum
Figure 6.2.2 Left Riemann sum
  1. The left endpoints are x=1,2,3,4 and the function values are:
  • f(1)=1
  • f(2)=4
  • f(3)=9
  • f(4)=16
  1. Then the left Riemann sum is

L4​=Δx(f(1)+f(2)+f(3)+f(4))

=1(1+4+9+16)

=30 units2

c) Midpoint Riemann sum

  1. Just as in the previous parts,

Δx=1

  1. The 4 rectangles correspond to these 4 subintervals:
  • [1,2]
  • [2,3]
  • [3,4]
  • [4,5]
  1. For a midpoint sum, the height of each rectangle is the function value at the midpoint of each subinterval.

The midpoint is found by averaging the endpoints. For example,

  • Midpoint of [3,4]=

23+4​=3.5

The midpoints of each subinterval in this example are x=1.5,2.5,3.5,4.5 and the function values are:

  • f(1.5)=2.25
  • f(2.5)=6.25
  • f(3.5)=12.25
  • f(4.5)=20.25
Figure 6.2.3 Midpoint Riemann sum
Figure 6.2.3 Midpoint Riemann sum
  1. Then the midpoint Riemann sum is

M4​=Δx(f(1.5)+f(2.5)+f(3.5)+f(4.5))

=1(2.25+6.25+12.25+20.25)

=41 units2

d) Trapezoidal sum

The area of a trapezoid is

A=2h​(b1​+b2​)

Here, the trapezoids are oriented sideways:

  • the height of each trapezoid is Δx=1
  • the parallel bases have lengths given by the function values at the endpoints of each subinterval
Figure 6.2.4 Trapezoidal sum
Figure 6.2.4 Trapezoidal sum

For the leftmost trapezoid, the lengths of the parallel bases are f(1) and f(2).

For the trapezoid next to it, the parallel bases are f(2) and f(3).

Notice that when you add the trapezoid areas, interior function values (like f(2)) appear in two adjacent trapezoids, so they get counted twice. Only the endpoint values, f(1) and f(5), are counted once.

Then

T4​=2Δx​(f(1)+2f(2)+2f(3)+2f(4)+f(5))

=21​(1+2(4)+2(9)+2(16)+25)

=42 units2

Unequal widths

On some AP exam problems, the subinterval widths aren’t all the same, so you can’t use a single Δx. These problems are often given in a table.

The rate of water, in gallons per minute, flowing into a tank can be modeled by function g(t), which is continuous and strictly increasing on the interval [0,10]. Select values are given below:

t g(t)
0 3
2 5
5 10
7 12
10 15

a) Will a left or right Riemann sum underestimate the actual change in the amount of water?
b) Approximate the net change in the amount of water after 10 seconds using a left Riemann sum with the subintervals[0,2],[2,5],[5,7], and [7,10]. Include units.
c) Repeat part b) using a right Riemann sum with the same subintervals. Include units.

Solutions

a) Underestimation

(spoiler)

Because g(t) is strictly increasing, the left-endpoint rectangles lie below the curve on each subinterval. That means a left Riemann sum gives an underestimate of the actual net change. A right Riemann sum uses right endpoints, so its rectangles lie above the curve, giving an overestimate.

b) Left Riemann sum

(spoiler)

The rectangles can be made as shown in the image below. The units come from multiplying the units of g(t) by the units of t, so the result is in gallons.

Figure 6.2.5 Left sum
Figure 6.2.5 Left sum

Use the left endpoint of each subinterval for the height, and use the subinterval length for the width:

  • On [0,2]: width 2, height g(0)=3
  • On [2,5]: width 3, height g(2)=5
  • On [5,7]: width 2, height g(5)=10
  • On [7,10]: width 3, height g(7)=12

So the approximate net change is:

A=2(3)+3(5)+2(10)+3(12)

=67 gallons

c) Right Riemann sum

(spoiler)

Now use the right endpoint of each subinterval for the height:

Figure 6.2.6 Right sum
Figure 6.2.6 Right sum

The approximate net change is:

A=3(15)+2(12)+3(10)+2(5)

=109 gallons

When deciding whether a Riemann sum is an overestimate or an underestimate, a quick sketch can help you compare the rectangles (or trapezoids) to the curve.

The estimation depends on whether the function is increasing/decreasing (for left/right Riemann sums) or concave up/down (for trapezoidal sums).

  • Left sum: If a function is…

    • Increasing → underestimate
    • Decreasing → overestimate
  • Right sum: If a function is…

    • Increasing → overestimate
    • Decreasing → underestimate
  • Trapezoidal sum: If a function is…

    • Concave up → overestimate
    • Concave down → underestimate

Riemann sums to estimate area

  • Approximate area under a curve by summing areas of rectangles (Riemann sums) or trapezoids (Trapezoidal rule)
  • Three main Riemann sums: left, right, midpoint
  • Steps:
    • Divide [a,b] into n subintervals of width Δx=nb−a​
    • Choose evaluation point (xk​) per subinterval (left, right, or midpoint)
    • Area per rectangle: f(xk​)Δx (signed area if f(xk​) negative)
    • Add all areas for total approximation

Right Riemann sum (Example)

  • Use right endpoints of each subinterval for rectangle heights
  • Formula: Rn​=Δx∑k=1n​f(xk​) (right endpoints)
  • For f(x)=x2 on [1,5], n=4: R4​=54 units2

Left Riemann sum (Example)

  • Use left endpoints of each subinterval for rectangle heights
  • Formula: Ln​=Δx∑k=0n−1​f(xk​) (left endpoints)
  • For f(x)=x2 on [1,5], n=4: L4​=30 units2

Midpoint Riemann sum (Example)

  • Use midpoints of each subinterval for rectangle heights
  • Formula: Mn​=Δx∑k=1n​f(midpointk​)
  • For f(x)=x2 on [1,5], n=4: M4​=41 units2

Trapezoidal sum (Example)

  • Use trapezoids with bases at function values of subinterval endpoints
  • Area formula: A=2h​(b1​+b2​), h=Δx
  • Trapezoidal sum: Tn​=2Δx​[f(x0​)+2f(x1​)+...+2f(xn−1​)+f(xn​)]
  • For f(x)=x2 on [1,5], n=4: T4​=42 units2

Unequal widths

  • For unequal subintervals, use actual widths for each rectangle/trapezoid
  • Left sum: use left endpoint value and subinterval width for each rectangle
  • Right sum: use right endpoint value and subinterval width for each rectangle

Over- and underestimation rules

  • Left sum:
    • Increasing function → underestimate
    • Decreasing function → overestimate
  • Right sum:
    • Increasing function → overestimate
    • Decreasing function → underestimate
  • Trapezoidal sum:
    • Concave up → overestimate
    • Concave down → underestimate

Sign up for free to take 5 quiz questions on this topic

All rights reserved ©2016 - 2026 Achievable, Inc.

Riemann sums & area

What you’ll learn:

  • How to approximate the area under a curve using rectangles (Riemann sums) and trapezoids
  • Calculate Riemann sums for intervals of unequal widths
  • Interpret whether left or right sums over- or underestimate based on the function’s behavior

In the previous section, areas were easy to find because the regions were simple geometric shapes. Now suppose you want the area under a curved graph, like f(x)=x2, from x=a to x=b. Before learning how to find the exact area, it helps to start with an approximation.

A common approach is to break the interval into smaller pieces, approximate the region with rectangles (or trapezoids), and add up their areas. This idea leads to Riemann sum approximations.

Riemann sums to estimate area

There are 3 main types of Riemann approximations: left, right, and midpoint Riemann sums. All three use rectangles.

Another common approximation is the Trapezoidal rule, which uses trapezoids. It isn’t technically a Riemann sum, but it follows the same “partition and add” process.

Here are the steps to finding a Riemann sum:

  1. Divide the interval [a,b] into n subintervals, where each subinterval has equal width Δx:

Δx=nb−a​

  1. On each subinterval, choose a point xk​ to evaluate the function (this choice depends on which type of Riemann sum you’re using).

  2. Multiply the function value f(xk​) by the width Δxto get the area of a rectangle.
    For a trapezoid,Δx is the height of each trapezoid while the function values are the bases.

    • Note: If the function value is negative, the rectangle lies below the x-axis, so its contribution is negative. That’s expected here because we’re approximating net signed area, which accounts for both positive and negative values.
  3. Add the areas together.

Examples

Estimate the area under f(x)=x2 with n=4 subintervals on the interval [1,5]using a:

a) Right Riemann sum
b) Left Riemann sum
c) Midpoint Riemann sum
d) Trapezoidal sum

a) Right Riemann sum

  1. Divide the interval[1,5] into n=4 subintervals, each with equal width:

Δx=nb−a​

=45−1​

=1

This step is the same for all of the sums.

  1. Since n=4 and this is a right Riemann sum, use the right endpoint of each subinterval to set the rectangle height.
  1. The right endpoints are x=5,4,3,2 and the function values are:
  • f(5)=25
  • f(4)=16
  • f(3)=9
  • f(2)=4
  1. Then the right Riemann sum is

R4​=Δx(f(5)+f(4)+f(3)+f(2))

=1(25+16+9+4)

=54 units2

b) Left Riemann sum

  1. Just as in part a),

Δx=1

  1. For a left Riemann sum, use the left endpoint of each subinterval to set the rectangle height.
  1. The left endpoints are x=1,2,3,4 and the function values are:
  • f(1)=1
  • f(2)=4
  • f(3)=9
  • f(4)=16
  1. Then the left Riemann sum is

L4​=Δx(f(1)+f(2)+f(3)+f(4))

=1(1+4+9+16)

=30 units2

c) Midpoint Riemann sum

  1. Just as in the previous parts,

Δx=1

  1. The 4 rectangles correspond to these 4 subintervals:
  • [1,2]
  • [2,3]
  • [3,4]
  • [4,5]
  1. For a midpoint sum, the height of each rectangle is the function value at the midpoint of each subinterval.

The midpoint is found by averaging the endpoints. For example,

  • Midpoint of [3,4]=

23+4​=3.5

The midpoints of each subinterval in this example are x=1.5,2.5,3.5,4.5 and the function values are:

  • f(1.5)=2.25
  • f(2.5)=6.25
  • f(3.5)=12.25
  • f(4.5)=20.25
  1. Then the midpoint Riemann sum is

M4​=Δx(f(1.5)+f(2.5)+f(3.5)+f(4.5))

=1(2.25+6.25+12.25+20.25)

=41 units2

d) Trapezoidal sum

The area of a trapezoid is

A=2h​(b1​+b2​)

Here, the trapezoids are oriented sideways:

  • the height of each trapezoid is Δx=1
  • the parallel bases have lengths given by the function values at the endpoints of each subinterval

For the leftmost trapezoid, the lengths of the parallel bases are f(1) and f(2).

For the trapezoid next to it, the parallel bases are f(2) and f(3).

Notice that when you add the trapezoid areas, interior function values (like f(2)) appear in two adjacent trapezoids, so they get counted twice. Only the endpoint values, f(1) and f(5), are counted once.

Then

T4​=2Δx​(f(1)+2f(2)+2f(3)+2f(4)+f(5))

=21​(1+2(4)+2(9)+2(16)+25)

=42 units2

Unequal widths

On some AP exam problems, the subinterval widths aren’t all the same, so you can’t use a single Δx. These problems are often given in a table.

The rate of water, in gallons per minute, flowing into a tank can be modeled by function g(t), which is continuous and strictly increasing on the interval [0,10]. Select values are given below:

t g(t)
0 3
2 5
5 10
7 12
10 15

a) Will a left or right Riemann sum underestimate the actual change in the amount of water?
b) Approximate the net change in the amount of water after 10 seconds using a left Riemann sum with the subintervals[0,2],[2,5],[5,7], and [7,10]. Include units.
c) Repeat part b) using a right Riemann sum with the same subintervals. Include units.

Solutions

a) Underestimation

(spoiler)

Because g(t) is strictly increasing, the left-endpoint rectangles lie below the curve on each subinterval. That means a left Riemann sum gives an underestimate of the actual net change. A right Riemann sum uses right endpoints, so its rectangles lie above the curve, giving an overestimate.

b) Left Riemann sum

(spoiler)

The rectangles can be made as shown in the image below. The units come from multiplying the units of g(t) by the units of t, so the result is in gallons.

Use the left endpoint of each subinterval for the height, and use the subinterval length for the width:

  • On [0,2]: width 2, height g(0)=3
  • On [2,5]: width 3, height g(2)=5
  • On [5,7]: width 2, height g(5)=10
  • On [7,10]: width 3, height g(7)=12

So the approximate net change is:

A=2(3)+3(5)+2(10)+3(12)

=67 gallons

c) Right Riemann sum

(spoiler)

Now use the right endpoint of each subinterval for the height:

The approximate net change is:

A=3(15)+2(12)+3(10)+2(5)

=109 gallons

When deciding whether a Riemann sum is an overestimate or an underestimate, a quick sketch can help you compare the rectangles (or trapezoids) to the curve.

The estimation depends on whether the function is increasing/decreasing (for left/right Riemann sums) or concave up/down (for trapezoidal sums).

  • Left sum: If a function is…

    • Increasing → underestimate
    • Decreasing → overestimate
  • Right sum: If a function is…

    • Increasing → overestimate
    • Decreasing → underestimate
  • Trapezoidal sum: If a function is…

    • Concave up → overestimate
    • Concave down → underestimate
Key points

Riemann sums to estimate area

  • Approximate area under a curve by summing areas of rectangles (Riemann sums) or trapezoids (Trapezoidal rule)
  • Three main Riemann sums: left, right, midpoint
  • Steps:
    • Divide [a,b] into n subintervals of width Δx=nb−a​
    • Choose evaluation point (xk​) per subinterval (left, right, or midpoint)
    • Area per rectangle: f(xk​)Δx (signed area if f(xk​) negative)
    • Add all areas for total approximation

Right Riemann sum (Example)

  • Use right endpoints of each subinterval for rectangle heights
  • Formula: Rn​=Δx∑k=1n​f(xk​) (right endpoints)
  • For f(x)=x2 on [1,5], n=4: R4​=54 units2

Left Riemann sum (Example)

  • Use left endpoints of each subinterval for rectangle heights
  • Formula: Ln​=Δx∑k=0n−1​f(xk​) (left endpoints)
  • For f(x)=x2 on [1,5], n=4: L4​=30 units2

Midpoint Riemann sum (Example)

  • Use midpoints of each subinterval for rectangle heights
  • Formula: Mn​=Δx∑k=1n​f(midpointk​)
  • For f(x)=x2 on [1,5], n=4: M4​=41 units2

Trapezoidal sum (Example)

  • Use trapezoids with bases at function values of subinterval endpoints
  • Area formula: A=2h​(b1​+b2​), h=Δx
  • Trapezoidal sum: Tn​=2Δx​[f(x0​)+2f(x1​)+...+2f(xn−1​)+f(xn​)]
  • For f(x)=x2 on [1,5], n=4: T4​=42 units2

Unequal widths

  • For unequal subintervals, use actual widths for each rectangle/trapezoid
  • Left sum: use left endpoint value and subinterval width for each rectangle
  • Right sum: use right endpoint value and subinterval width for each rectangle

Over- and underestimation rules

  • Left sum:
    • Increasing function → underestimate
    • Decreasing function → overestimate
  • Right sum:
    • Increasing function → overestimate
    • Decreasing function → underestimate
  • Trapezoidal sum:
    • Concave up → overestimate
    • Concave down → underestimate