📚

 > 

♾️ 

 > 

🔥

6.2 Approximating Areas with Riemann Sums

1 min readjune 18, 2024

Emery

Emery

Emery

Emery

6.2 Approximating Areas with Riemann Sums

Welcome back to AP Calc with Fiveable! In the last guide, we explored accumulations of change and thought about how to compute them. Here, we’ll take a deep dive into Riemann sums, a method for approximating the area under the curve to find the accumulation of change.


📶 Graphical Riemann Sums

As we delve into integral calculus, our goal has shifted from computing the instantaneous rate of change to computing the area under the curve. Riemann sums are a useful tool for approximating this. Take a look at this graph:

PNG image.png

Image courtesy of Emery

You would have a hard time computing this geometrically. But, we can approximate it using familiar shapes, like this:

PNG image 2.png

Image courtesy of Emery

We can see that this isn’t exact, but that our approximation improves if we use more and more rectangles:

PNG image 22.png

Image courtesy of Emery

The use of these rectangles to approximate the area under the curve is called a Riemann sum. There are four main Riemann sums:

  1. Left Riemann Sum
  2. Right Riemann Sum
  3. Midpoint Riemann Sum
  4. Trapezoidal Sum

Now, let’s get into each of these in detail!

↔️ Left and Right Riemann Sum

There are two basic types of Riemann sums, called “left endpoint” and “right endpoint.” Here is an example of the same curve with a left Riemann sum, versus one with a right Riemann sum:

PNG image 6.png

Image courtesy of Emery

You can see that the left and right refer to which points we use to determine the height of our rectangles. Left Riemann sums touch the curve with their top left corners, and right Riemann sums touch the curve with their top right corners.

➗ Subdivisions

Another thing that we can vary when deciding to take a Riemann sum is the width of our base. Our base length can either be uniform or non-uniform, as illustrated here:

PNG image 5.png

Image courtesy of Emery

The base lengths formed by dividing up the total interval are called “subdivisions.”

🤔 Overestimating vs Underestimating

We know that a Riemann sum isn’t a perfect calculation of our area under the curve, but are we overestimating or underestimating when we use one? Try these problems and then fill in the blanks to see if you can figure out the pattern!

PNG image 7.png

Image courtesy of Emery

Fill in the Blanks! 🧠

  • A left Riemann sum ________when a function is ________.
  • A right Riemann sum ________when a function is ________.
  • A left Riemann sum ________when a function is ________.
  • A right Riemann sum ________when a function is ________.

Answer Key:

If you haven’t already guessed the pattern, here are the rules:

  • A left Riemann sum underestimates when a function is increasing 📈
  • A right Riemann sum overestimates when a function is increasing 📈
  • A left Riemann sum overestimates when a function is decreasing 📉
  • A right Riemann sum underestimates when a function is decreasing 📉

Now that we know which types of Riemann sums make which types of errors in their estimations, how might we make our approximation more accurate?


📐 Trapezoidal and Midpoint Riemann Sums

If you guessed by averaging the two estimations, you’d be correct! We can do this in one of two ways.

📐 Trapezoidal Riemann Sum

If you’ve already calculated the left and right Riemann sum for a graph, you can simply take their average. But, there’s an even faster way to do this, using another simple geometric shape—the trapezoid! Instead of finding just the left or right endpoints, we mark every point over the interval we’re interested in. Then, we connect pairs of points together:

PNG image 8.png

Image courtesy of Emery

This creates trapezoids! Instead of using the area formula for a rectangle, we now take the average of the two side lengths and multiple them by the base, using this formula:

a+b2h\frac{a+b}{2}\cdot h

📍 Midpoint Riemann Sum

Midpoint Riemann sums have the same goal as trapezoidal Riemann sums—to minimize the amount of error. They accomplish this by using the middle point of the rectangle as its height, as illustrated here:

PNG image 9.png

Image courtesy of Emery

🤔 Overestimating vs Underestimating

Just like left and right Riemann sums, the trapezoidal and midpoint Riemann sums may be an over- or underestimation depending on the type of graph.

PNG image 10.png

Image courtesy of Emery

Be familiar with the following:

  • A trapezoidal Riemann sum underestimates when a function is concave down.
  • A trapezoidal Riemann sum overestimates when a function is concave up.
  • A midpoint Riemann sum underestimates when a function is concave up.
  • A midpoint Riemann sum overestimates when a function is concave down.

🔢 Numerical Riemann Sums

Sometimes we’re not given a graph to base our estimates on! Let’s work through a sample problem to learn how to approach these types of problems.

Given the function f(x)=12x2f(x)=\frac{1}{2}x^2, find L4, R4, T4,L_4,\ R_4,\ T_4, and M4M_4 over the interval [0,4].

The very first thing you should do in this type of problem is draw a graph!

PNG image 11.png

Image courtesy of Emery

Then, pick one of the Riemann sums to calculate. We’re going to solve for L4L_4 and R4R_4 first.

First, figure out how wide each rectangle will be by dividing the total interval by the number of subdivisions we want:

404=1\frac{4-0}{4}=1

Then, draw our rectangles on the graph for each type of endpoint:

PNG image 12.png

Image courtesy of Emery

We can also make a table of values from the graph:

xy (height)
00
10.5
22
34.5
48

Based on our graphs, to find L4L_4 we need to use the left endpoints, which are x=0, 1, 2, 3x=0,\ 1,\ 2,\ 3. Since our base width is 1, we can just sum their values. Thus,

L4=0+0.5+2+4.5=7L_4=0+0.5+2+4.5=\boxed{7}

Let’s do the same thing for R4R_4, using x=1, 2, 3, 4x=1,\ 2,\ 3,\ 4:

R4=0.5+2+4.5+8=15R_4=0.5+2+4.5+8=\boxed{15}

Now on to T4T_4!

We know that there will be four trapezoids since we are using the same number of subdivisions. We can draw it like this:

PNG image 13.png

Image courtesy of Emery

We can also use the same table of values from the first part of the problem to find our values for a and b.

xy (height)
00
10.5
22
34.5
48

Let’s plug these values into our equation to find the area of our first trapezoid:

0+0.521=0.25\frac{0+0.5}{2}\cdot 1=0.25

We can do this for all four trapezoids and add them up to get our total area:

0+0.521+0.5+221+2+4.521+4.5+821=11\frac{0+0.5}{2}\cdot 1+\frac{0.5+2}{2}\cdot 1+\frac{2+4.5}{2}\cdot 1+\frac{4.5+8}{2}\cdot 1=\boxed{11}

Finally, let’s find M4M_4, starting by drawing our rectangles onto the graph:

PNG image 14.png

Image courtesy of Emery

First, we can plug in our x-values from the graph to find the height of each rectangle:

xy (height)
0.50.125
1.51.125
2.53.125
3.56.125

Since our the width of each base is just 1, we can simply sum the four values to get our area under the curve estimated by M4M_4:

0.125+1.125+3.125+6.125=10.50.125+1.125+3.125+6.125=\boxed{10.5}

Bonus Question: Are T4T_4 and M4M_4 overestimates or underestimates?

Solution: T4T_4 is an overestimate and M4M_4 is an underestimate, which means the true area under the curve lies somewhere between 10.5 and 11!


📝 Practice Problems and Solutions

Now take some time to practice these on your own!

❓Questions

  1. Given the function f(x)=2x+1f(x)=2x+1 over the interval [1, 5], calculate the Riemann sum with n=4n=4 using the right endpoints of each subinterval.
  2. A function f(x)=x2+3xf(x)=x^2+3x is defined over the interval [0, 2]. Compute the left Riemann sum with n=6n=6 for this function.
  3. Given the function f(x)=3x24f(x)=3x^2-4 over the interval [2, 8], find T12T_{12} and M12M_{12}.

✏️ Solutions

Problem 1 Solution****

First, let’s graph this function over the given interval:

PNG image 15.png

Image courtesy of Emery

Then, let’s figure out what the width of our rectangles will be and graph with the right endpoints: 514=1\frac{5-1}{4}=1.

PNG image 16.png

Image courtesy of Emery

Now, let’s find their heights numerically:

x-valuey (height)
25
37
49
511

Now, let’s solve by summing the areas of each rectangle:

(51)+(71)+(91)+(111)=32(5\cdot1)+(7\cdot 1)+(9\cdot1)+(11\cdot1)=\boxed{32}

Problem 2 Solution****

First, let’s graph this function over the given interval:

PNG image 17.png

Image courtesy of Emery

Then, let’s figure out the width of our rectangles and graph with the left endpoints: 206=13\frac{2-0}{6}=\frac{1}{3}

PNG image 18.png

Image courtesy of Emery

Now, let’s find their heights numerically:

x-valuey (height)
00
1/310/9
2/322/9
14
4/352/9
5/370/9

Now, let’s solve by summing the areas of each rectangle:

L6=(013)+(10913)+(22913)+(413)+(52913)+(70913)L_6=(0\cdot\frac{1}{3})+(\frac{10}{9}\cdot\frac{1}{3})+(\frac{22}{9}\cdot\frac{1}{3})+(4\cdot\frac{1}{3})+(\frac{52}{9}\cdot\frac{1}{3})+(\frac{70}{9}\cdot\frac{1}{3})

We can rewrite this by factoring out our base length like so:

L6=13(0+109+229+4+529+709)7.04L_6=\frac{1}{3}\Bigg(0+\frac{10}{9}+\frac{22}{9}+4+\frac{52}{9}+\frac{70}{9}\Bigg)\approx\boxed{7.04}

Problem 3 Solution****

First, let’s graph the function over the given interval:

PNG image 19.png

Image courtesy of Emery

Then, let’s figure out the width of our rectangles and graph with the trapezoids: 8212=12\frac{8-2}{12}=\frac{1}{2}

PNG image 21.png

Image courtesy of Emery

Let’s start by solving for T12T_{12} by creating a table of values:

x-valuey (height)
28
2.514.75
323
3.532.75
444
4.556.75
571
5.586.75
6104
6.5122.75
7143
7.5164.75
8188

Now, let’s plug it into our equation:

(80.5)+(14.750.5)+(230.5)+(32.750.5)+(440.5)+(56.750.5)+(710.5)+(86.750.5)+(1040.5)+(122.750.5)+(1430.5)+(164.750.5)+(1880.5)(8\cdot0.5)+(14.75\cdot0.5)+(23\cdot0.5)+(32.75\cdot0.5)+(44\cdot0.5)+(56.75\cdot0.5)+(71\cdot0.5)+(86.75\cdot0.5)+(104\cdot0.5)+(122.75\cdot0.5)+(143\cdot0.5)+(164.75\cdot0.5)+(188\cdot0.5)

And simplify!

0.5(8+14.75+23+32.75+44+56.75+71+86.75+104+122.75+143+164.75+188)=529.750.5(8+14.75+23+32.75+44+56.75+71+86.75+104+122.75+143+164.75+188)=\boxed{529.75}

Let’s do the same with midpoints:

PNG image 20.png

Image courtesy of Emery

x-valuey (height)
2.2511.1875
2.7518.6875
3.2527.6875
3.7538.1875
4.2550.1875
4.7563.6875
5.2578.6875
5.7595.1875
6.25113.1875
6.75132.6875
7.25153.6875
7.75176.1875

Now, let’s plug in and solve:

M12=0.5(11.1875+18.6875+27.6875+38.1875+50.1875+63.6875+78.6875+95.1875+113.1875+132.6875+153.6875+176.1875)=479.625M_{12}=0.5(11.1875+18.6875+27.6875+38.1875+50.1875+63.6875+78.6875+95.1875+113.1875+132.6875+153.6875+176.1875)=\boxed{479.625}

🌟 Closing

Here are the key takeaways you should now understand about Riemann sums:

  • What a left, right, trapezoidal, or midpoint Riemann sum is and…
    • How to calculate their values numerically
    • When they are overestimates or underestimates
  • How to determine the width of rectangles or trapezoids
  • How to depict Riemann sums graphically

Best of luck! 🍀

<< Hide Menu

📚

 > 

♾️ 

 > 

🔥

6.2 Approximating Areas with Riemann Sums

1 min readjune 18, 2024

Emery

Emery

Emery

Emery

6.2 Approximating Areas with Riemann Sums

Welcome back to AP Calc with Fiveable! In the last guide, we explored accumulations of change and thought about how to compute them. Here, we’ll take a deep dive into Riemann sums, a method for approximating the area under the curve to find the accumulation of change.


📶 Graphical Riemann Sums

As we delve into integral calculus, our goal has shifted from computing the instantaneous rate of change to computing the area under the curve. Riemann sums are a useful tool for approximating this. Take a look at this graph:

PNG image.png

Image courtesy of Emery

You would have a hard time computing this geometrically. But, we can approximate it using familiar shapes, like this:

PNG image 2.png

Image courtesy of Emery

We can see that this isn’t exact, but that our approximation improves if we use more and more rectangles:

PNG image 22.png

Image courtesy of Emery

The use of these rectangles to approximate the area under the curve is called a Riemann sum. There are four main Riemann sums:

  1. Left Riemann Sum
  2. Right Riemann Sum
  3. Midpoint Riemann Sum
  4. Trapezoidal Sum

Now, let’s get into each of these in detail!

↔️ Left and Right Riemann Sum

There are two basic types of Riemann sums, called “left endpoint” and “right endpoint.” Here is an example of the same curve with a left Riemann sum, versus one with a right Riemann sum:

PNG image 6.png

Image courtesy of Emery

You can see that the left and right refer to which points we use to determine the height of our rectangles. Left Riemann sums touch the curve with their top left corners, and right Riemann sums touch the curve with their top right corners.

➗ Subdivisions

Another thing that we can vary when deciding to take a Riemann sum is the width of our base. Our base length can either be uniform or non-uniform, as illustrated here:

PNG image 5.png

Image courtesy of Emery

The base lengths formed by dividing up the total interval are called “subdivisions.”

🤔 Overestimating vs Underestimating

We know that a Riemann sum isn’t a perfect calculation of our area under the curve, but are we overestimating or underestimating when we use one? Try these problems and then fill in the blanks to see if you can figure out the pattern!

PNG image 7.png

Image courtesy of Emery

Fill in the Blanks! 🧠

  • A left Riemann sum ________when a function is ________.
  • A right Riemann sum ________when a function is ________.
  • A left Riemann sum ________when a function is ________.
  • A right Riemann sum ________when a function is ________.

Answer Key:

If you haven’t already guessed the pattern, here are the rules:

  • A left Riemann sum underestimates when a function is increasing 📈
  • A right Riemann sum overestimates when a function is increasing 📈
  • A left Riemann sum overestimates when a function is decreasing 📉
  • A right Riemann sum underestimates when a function is decreasing 📉

Now that we know which types of Riemann sums make which types of errors in their estimations, how might we make our approximation more accurate?


📐 Trapezoidal and Midpoint Riemann Sums

If you guessed by averaging the two estimations, you’d be correct! We can do this in one of two ways.

📐 Trapezoidal Riemann Sum

If you’ve already calculated the left and right Riemann sum for a graph, you can simply take their average. But, there’s an even faster way to do this, using another simple geometric shape—the trapezoid! Instead of finding just the left or right endpoints, we mark every point over the interval we’re interested in. Then, we connect pairs of points together:

PNG image 8.png

Image courtesy of Emery

This creates trapezoids! Instead of using the area formula for a rectangle, we now take the average of the two side lengths and multiple them by the base, using this formula:

a+b2h\frac{a+b}{2}\cdot h

📍 Midpoint Riemann Sum

Midpoint Riemann sums have the same goal as trapezoidal Riemann sums—to minimize the amount of error. They accomplish this by using the middle point of the rectangle as its height, as illustrated here:

PNG image 9.png

Image courtesy of Emery

🤔 Overestimating vs Underestimating

Just like left and right Riemann sums, the trapezoidal and midpoint Riemann sums may be an over- or underestimation depending on the type of graph.

PNG image 10.png

Image courtesy of Emery

Be familiar with the following:

  • A trapezoidal Riemann sum underestimates when a function is concave down.
  • A trapezoidal Riemann sum overestimates when a function is concave up.
  • A midpoint Riemann sum underestimates when a function is concave up.
  • A midpoint Riemann sum overestimates when a function is concave down.

🔢 Numerical Riemann Sums

Sometimes we’re not given a graph to base our estimates on! Let’s work through a sample problem to learn how to approach these types of problems.

Given the function f(x)=12x2f(x)=\frac{1}{2}x^2, find L4, R4, T4,L_4,\ R_4,\ T_4, and M4M_4 over the interval [0,4].

The very first thing you should do in this type of problem is draw a graph!

PNG image 11.png

Image courtesy of Emery

Then, pick one of the Riemann sums to calculate. We’re going to solve for L4L_4 and R4R_4 first.

First, figure out how wide each rectangle will be by dividing the total interval by the number of subdivisions we want:

404=1\frac{4-0}{4}=1

Then, draw our rectangles on the graph for each type of endpoint:

PNG image 12.png

Image courtesy of Emery

We can also make a table of values from the graph:

xy (height)
00
10.5
22
34.5
48

Based on our graphs, to find L4L_4 we need to use the left endpoints, which are x=0, 1, 2, 3x=0,\ 1,\ 2,\ 3. Since our base width is 1, we can just sum their values. Thus,

L4=0+0.5+2+4.5=7L_4=0+0.5+2+4.5=\boxed{7}

Let’s do the same thing for R4R_4, using x=1, 2, 3, 4x=1,\ 2,\ 3,\ 4:

R4=0.5+2+4.5+8=15R_4=0.5+2+4.5+8=\boxed{15}

Now on to T4T_4!

We know that there will be four trapezoids since we are using the same number of subdivisions. We can draw it like this:

PNG image 13.png

Image courtesy of Emery

We can also use the same table of values from the first part of the problem to find our values for a and b.

xy (height)
00
10.5
22
34.5
48

Let’s plug these values into our equation to find the area of our first trapezoid:

0+0.521=0.25\frac{0+0.5}{2}\cdot 1=0.25

We can do this for all four trapezoids and add them up to get our total area:

0+0.521+0.5+221+2+4.521+4.5+821=11\frac{0+0.5}{2}\cdot 1+\frac{0.5+2}{2}\cdot 1+\frac{2+4.5}{2}\cdot 1+\frac{4.5+8}{2}\cdot 1=\boxed{11}

Finally, let’s find M4M_4, starting by drawing our rectangles onto the graph:

PNG image 14.png

Image courtesy of Emery

First, we can plug in our x-values from the graph to find the height of each rectangle:

xy (height)
0.50.125
1.51.125
2.53.125
3.56.125

Since our the width of each base is just 1, we can simply sum the four values to get our area under the curve estimated by M4M_4:

0.125+1.125+3.125+6.125=10.50.125+1.125+3.125+6.125=\boxed{10.5}

Bonus Question: Are T4T_4 and M4M_4 overestimates or underestimates?

Solution: T4T_4 is an overestimate and M4M_4 is an underestimate, which means the true area under the curve lies somewhere between 10.5 and 11!


📝 Practice Problems and Solutions

Now take some time to practice these on your own!

❓Questions

  1. Given the function f(x)=2x+1f(x)=2x+1 over the interval [1, 5], calculate the Riemann sum with n=4n=4 using the right endpoints of each subinterval.
  2. A function f(x)=x2+3xf(x)=x^2+3x is defined over the interval [0, 2]. Compute the left Riemann sum with n=6n=6 for this function.
  3. Given the function f(x)=3x24f(x)=3x^2-4 over the interval [2, 8], find T12T_{12} and M12M_{12}.

✏️ Solutions

Problem 1 Solution****

First, let’s graph this function over the given interval:

PNG image 15.png

Image courtesy of Emery

Then, let’s figure out what the width of our rectangles will be and graph with the right endpoints: 514=1\frac{5-1}{4}=1.

PNG image 16.png

Image courtesy of Emery

Now, let’s find their heights numerically:

x-valuey (height)
25
37
49
511

Now, let’s solve by summing the areas of each rectangle:

(51)+(71)+(91)+(111)=32(5\cdot1)+(7\cdot 1)+(9\cdot1)+(11\cdot1)=\boxed{32}

Problem 2 Solution****

First, let’s graph this function over the given interval:

PNG image 17.png

Image courtesy of Emery

Then, let’s figure out the width of our rectangles and graph with the left endpoints: 206=13\frac{2-0}{6}=\frac{1}{3}

PNG image 18.png

Image courtesy of Emery

Now, let’s find their heights numerically:

x-valuey (height)
00
1/310/9
2/322/9
14
4/352/9
5/370/9

Now, let’s solve by summing the areas of each rectangle:

L6=(013)+(10913)+(22913)+(413)+(52913)+(70913)L_6=(0\cdot\frac{1}{3})+(\frac{10}{9}\cdot\frac{1}{3})+(\frac{22}{9}\cdot\frac{1}{3})+(4\cdot\frac{1}{3})+(\frac{52}{9}\cdot\frac{1}{3})+(\frac{70}{9}\cdot\frac{1}{3})

We can rewrite this by factoring out our base length like so:

L6=13(0+109+229+4+529+709)7.04L_6=\frac{1}{3}\Bigg(0+\frac{10}{9}+\frac{22}{9}+4+\frac{52}{9}+\frac{70}{9}\Bigg)\approx\boxed{7.04}

Problem 3 Solution****

First, let’s graph the function over the given interval:

PNG image 19.png

Image courtesy of Emery

Then, let’s figure out the width of our rectangles and graph with the trapezoids: 8212=12\frac{8-2}{12}=\frac{1}{2}

PNG image 21.png

Image courtesy of Emery

Let’s start by solving for T12T_{12} by creating a table of values:

x-valuey (height)
28
2.514.75
323
3.532.75
444
4.556.75
571
5.586.75
6104
6.5122.75
7143
7.5164.75
8188

Now, let’s plug it into our equation:

(80.5)+(14.750.5)+(230.5)+(32.750.5)+(440.5)+(56.750.5)+(710.5)+(86.750.5)+(1040.5)+(122.750.5)+(1430.5)+(164.750.5)+(1880.5)(8\cdot0.5)+(14.75\cdot0.5)+(23\cdot0.5)+(32.75\cdot0.5)+(44\cdot0.5)+(56.75\cdot0.5)+(71\cdot0.5)+(86.75\cdot0.5)+(104\cdot0.5)+(122.75\cdot0.5)+(143\cdot0.5)+(164.75\cdot0.5)+(188\cdot0.5)

And simplify!

0.5(8+14.75+23+32.75+44+56.75+71+86.75+104+122.75+143+164.75+188)=529.750.5(8+14.75+23+32.75+44+56.75+71+86.75+104+122.75+143+164.75+188)=\boxed{529.75}

Let’s do the same with midpoints:

PNG image 20.png

Image courtesy of Emery

x-valuey (height)
2.2511.1875
2.7518.6875
3.2527.6875
3.7538.1875
4.2550.1875
4.7563.6875
5.2578.6875
5.7595.1875
6.25113.1875
6.75132.6875
7.25153.6875
7.75176.1875

Now, let’s plug in and solve:

M12=0.5(11.1875+18.6875+27.6875+38.1875+50.1875+63.6875+78.6875+95.1875+113.1875+132.6875+153.6875+176.1875)=479.625M_{12}=0.5(11.1875+18.6875+27.6875+38.1875+50.1875+63.6875+78.6875+95.1875+113.1875+132.6875+153.6875+176.1875)=\boxed{479.625}

🌟 Closing

Here are the key takeaways you should now understand about Riemann sums:

  • What a left, right, trapezoidal, or midpoint Riemann sum is and…
    • How to calculate their values numerically
    • When they are overestimates or underestimates
  • How to determine the width of rectangles or trapezoids
  • How to depict Riemann sums graphically

Best of luck! 🍀