AP Calculus AB/BC • Unit 6 • Integration Foundations

Approximating Areas with Riemann Sums: Left, Right, Midpoint, and Trapezoidal Rule

Riemann sums approximate the area under a curve by dividing an interval into smaller subintervals and adding the areas of simple shapes. The basic version uses rectangles. The related trapezoidal rule uses trapezoids. These methods are the foundation of definite integrals, accumulated change, numerical integration, and the Fundamental Theorem of Calculus.

In AP Calculus, Riemann sums help students understand what an integral means before exact antiderivatives are introduced. A definite integral such as \(\int_a^b f(x)\,dx\) can be interpreted as the limit of Riemann sums as the number of subintervals increases. When exact integration is hard or impossible, Riemann sums also provide practical approximations from formulas, graphs, or tables of values.

Quick Rule

Width first. Heights second. Sum last.

Width\(\Delta x=\frac{b-a}{n}\)
LeftFirst \(n\) points
RightLast \(n\) points
MidpointMiddle of each interval

What Is a Riemann Sum?

A Riemann sum is a method for approximating area under a graph. Suppose a function \(f(x)\) is defined on an interval \([a,b]\). Instead of finding the exact area all at once, we divide the interval into \(n\) equal pieces. Each piece has width \(\Delta x\), and each rectangle has height determined by a sample point inside its subinterval.

\[ \Delta x=\frac{b-a}{n} \]

If the sample point in the \(i\)-th subinterval is called \(x_i^*\), then a general Riemann sum is:

\[ \sum_{i=1}^{n} f(x_i^*)\Delta x \]

This formula means: choose a height \(f(x_i^*)\), multiply by the rectangle width \(\Delta x\), and add all rectangle areas. Each rectangle estimates a small piece of the total area. The more rectangles we use, the better the approximation usually becomes.

The notation can look complicated, but the idea is simple. A rectangle’s area is width times height. A Riemann sum is just a total of many rectangle areas:

\[ \text{Approximate Area} = \text{Width}\times(\text{Height}_1+\text{Height}_2+\cdots+\text{Height}_n) \]

Core meaning: Riemann sums approximate accumulated area or accumulated change by adding small pieces.

Interactive Riemann Sum Calculator

Use this tool to approximate \(\int_a^b f(x)\,dx\) for simple functions. It shows left, right, midpoint, or trapezoidal approximations and gives a simple visual model of the rectangles or trapezoids.

Choose a method and click “Calculate Approximation.”
x y

The Four Main Approximation Methods

There are several common ways to choose heights for approximating area. The three rectangle methods are left, right, and midpoint Riemann sums. The trapezoidal rule is not technically a rectangle-based Riemann sum, but it is closely related and frequently studied with Riemann sums in AP Calculus.

Left Riemann Sum

A left Riemann sum uses the left endpoint of each subinterval as the rectangle height. If the partition points are \(x_0,x_1,\ldots,x_n\), then the left sum uses \(x_0\) through \(x_{n-1}\).

\[ L_n=\Delta x\left[f(x_0)+f(x_1)+\cdots+f(x_{n-1})\right] \]

Right Riemann Sum

A right Riemann sum uses the right endpoint of each subinterval as the rectangle height. It uses \(x_1\) through \(x_n\).

\[ R_n=\Delta x\left[f(x_1)+f(x_2)+\cdots+f(x_n)\right] \]

Midpoint Riemann Sum

A midpoint Riemann sum uses the midpoint of each subinterval. If the first subinterval is \([x_0,x_1]\), its midpoint is \(\frac{x_0+x_1}{2}\). Midpoint sums are often more accurate than left or right sums for smooth functions because they balance the rectangle around the center of each subinterval.

\[ M_n=\Delta x\left[f(m_1)+f(m_2)+\cdots+f(m_n)\right] \] \[ m_i=\frac{x_{i-1}+x_i}{2}=a+\left(i-\frac{1}{2}\right)\Delta x \]

Trapezoidal Rule

The trapezoidal rule approximates area using trapezoids instead of rectangles. Each trapezoid uses two neighboring function values as its parallel sides. The formula looks different because interior function values are counted twice.

\[ T_n=\frac{\Delta x}{2}\left[f(x_0)+2f(x_1)+2f(x_2)+\cdots+2f(x_{n-1})+f(x_n)\right] \]

Trapezoidal pattern: first value + twice every middle value + last value, then multiply by \(\frac{\Delta x}{2}\).

Over-Estimation and Under-Estimation

Riemann sums do not always equal the exact area. Depending on the shape of the function and the method used, they can over-estimate or under-estimate. For AP Calculus, the most important over/under rule involves increasing and decreasing functions.

Function Behavior Left Riemann Sum Right Riemann Sum Reason
Increasing function Under-estimate Over-estimate Left endpoints use smaller heights; right endpoints use larger heights.
Decreasing function Over-estimate Under-estimate Left endpoints use larger heights; right endpoints use smaller heights.

For example, \(f(x)=x^2\) is increasing on \([1,5]\). A left Riemann sum will use the smaller height at the beginning of each subinterval, so it misses area and under-estimates. A right Riemann sum will use the larger height at the end of each subinterval, so it includes extra area and over-estimates.

For \(f(x)=e^{-x}\), the function is decreasing. A left Riemann sum uses larger heights at the start of each subinterval, so it over-estimates. A right Riemann sum uses smaller heights at the end of each subinterval, so it under-estimates.

Important: Do not claim over-estimate or under-estimate unless you know the function is increasing or decreasing on the entire interval. If the function changes direction, the rule may not apply globally.

Step-by-Step Method for Riemann Sums

  1. Identify the interval. Determine \(a\) and \(b\) from \([a,b]\).
  2. Identify the number of subintervals. Use the given value of \(n\).
  3. Calculate the width. Use \(\Delta x=\frac{b-a}{n}\).
  4. Find partition points. Use \(x_i=a+i\Delta x\).
  5. Choose sample points. Use left endpoints, right endpoints, midpoints, or trapezoidal endpoints.
  6. Evaluate the function. Calculate each needed \(f(x)\) value.
  7. Multiply and add. Apply the formula carefully.
  8. Interpret the answer. State whether the result approximates area, distance, accumulation, or another contextual quantity.
\[ \text{Riemann Sum Process} = \text{Interval} + \Delta x + \text{Sample Points} + \text{Heights} + \text{Total Area} \]

Worked Example 1: Left, Right, Midpoint, and Trapezoidal Approximations

Problem: Approximate \(\int_1^5 x^2\,dx\) using \(n=4\) subintervals with left, right, midpoint, and trapezoidal methods.

First identify the interval and width:

\[ a=1,\quad b=5,\quad n=4,\quad \Delta x=\frac{5-1}{4}=1 \]

The partition points are:

\[ x_0=1,\quad x_1=2,\quad x_2=3,\quad x_3=4,\quad x_4=5 \]

Left Riemann Sum

\[ L_4=1\left[f(1)+f(2)+f(3)+f(4)\right] \] \[ L_4=1(1^2+2^2+3^2+4^2)=1(1+4+9+16)=30 \]

Right Riemann Sum

\[ R_4=1\left[f(2)+f(3)+f(4)+f(5)\right] \] \[ R_4=1(2^2+3^2+4^2+5^2)=1(4+9+16+25)=54 \]

Midpoint Riemann Sum

The midpoints are \(1.5,2.5,3.5,4.5\).

\[ M_4=1\left[f(1.5)+f(2.5)+f(3.5)+f(4.5)\right] \] \[ M_4=1(2.25+6.25+12.25+20.25)=41 \]

Trapezoidal Rule

\[ T_4=\frac{1}{2}\left[f(1)+2f(2)+2f(3)+2f(4)+f(5)\right] \] \[ T_4=\frac{1}{2}(1+8+18+32+25)=42 \]

Results: \(L_4=30\), \(R_4=54\), \(M_4=41\), and \(T_4=42\). The exact value is \(\frac{124}{3}\approx41.33\), so the midpoint approximation is especially close in this example.

Worked Example 2: Riemann Sums from a Table

Many AP Calculus problems give a table instead of a formula. In those problems, you must use the available values carefully. The trapezoidal rule is especially common with table data because it uses all given endpoints and approximates the curve between them with line segments.

Problem: Use the data to approximate \(\int_0^8 f(x)\,dx\) with the trapezoidal rule.

\(x\) 0 2 4 6 8
\(f(x)\) 3 7 11 9 5

The spacing is \(\Delta x=2\), and there are \(4\) subintervals. Apply the trapezoidal formula:

\[ T_4=\frac{2}{2}\left[f(0)+2f(2)+2f(4)+2f(6)+f(8)\right] \] \[ T_4=1\left[3+2(7)+2(11)+2(9)+5\right] \] \[ T_4=3+14+22+18+5=62 \]

Answer: \(\int_0^8 f(x)\,dx\approx62\).

Worked Example 3: Summation Notation

Problem: Express the right Riemann sum for \(\int_2^{10}(3x+1)\,dx\) with \(n=4\) using summation notation, then evaluate.

First calculate the width:

\[ \Delta x=\frac{10-2}{4}=2 \]

For a right Riemann sum, use \(x_i=a+i\Delta x\), where \(i=1,2,3,4\):

\[ x_i=2+2i \]

Now write the sum:

\[ R_4=\sum_{i=1}^{4} f(2+2i)\cdot2 \] \[ R_4=\sum_{i=1}^{4}\left[3(2+2i)+1\right]\cdot2 = 2\sum_{i=1}^{4}(7+6i) \]

Evaluate the terms:

\[ R_4=2(13+19+25+31)=2(88)=176 \]

Answer: \(R_4=2\sum_{i=1}^{4}(7+6i)=176\).

How Riemann Sums Connect to Definite Integrals

Riemann sums are not just approximation tricks. They explain what a definite integral means. When \(n\) is small, the approximation may be rough. When \(n\) becomes larger, the rectangles become thinner and the approximation becomes more accurate. If \(f\) is integrable on \([a,b]\), then the limiting value of the Riemann sums is the definite integral.

\[ \int_a^b f(x)\,dx = \lim_{n\to\infty}\sum_{i=1}^{n}f(x_i^*)\Delta x \]

This formula is one of the most important conceptual bridges in calculus. It says that exact area can be understood as the limit of approximate areas. The definite integral is not just an antiderivative shortcut. It is the precise value approached by increasingly refined accumulation sums.

This idea appears in many real-world settings. If \(v(t)\) is velocity, a Riemann sum can approximate distance traveled. If \(r(t)\) is a rate of water flow, a Riemann sum can approximate total water volume. If \(P(t)\) is power, a Riemann sum can approximate energy used. In each case, the structure is the same: rate times small change in input, added over an interval.

\[ \text{Accumulated Change}\approx\sum(\text{Rate})(\text{Small Time Interval}) \]

Calculator and AP Exam Strategy

Riemann sum problems may appear on calculator-active or calculator-inactive sections. When using a calculator, you still need to show the setup. AP graders usually expect to see \(\Delta x\), the method being used, the function values or formula pattern, and the final approximation. A calculator can help with arithmetic, but it cannot replace mathematical communication.

  • Start with \(\Delta x\). Most Riemann sum errors begin with the wrong width.
  • List sample points. This prevents left/right/midpoint confusion.
  • Use exactly \(n\) heights. Left, right, and midpoint sums use \(n\) rectangles.
  • For trapezoids, use \(n+1\) function values. The endpoints are counted once and interior values are counted twice.
  • Include units in context problems. If the function is a rate, the integral gives accumulated units.
  • Check reasonableness. For increasing functions, the exact value should lie between the left and right approximations.

Common Mistakes to Avoid

  • Forgetting to multiply by \(\Delta x\). Adding heights is not enough; area requires width times height.
  • Using \(n+1\) values in a left or right sum. Rectangle methods use exactly \(n\) heights.
  • Mixing up left and right endpoints. Left uses the first \(n\) partition points; right uses the last \(n\).
  • Using endpoints instead of midpoints for midpoint sums. Midpoints are averages of consecutive partition points.
  • Forgetting \(\frac{1}{2}\) in the trapezoidal rule. The trapezoidal formula includes \(\frac{\Delta x}{2}\).
  • Not doubling middle terms in the trapezoidal rule. Only the first and last terms are not doubled.
  • Claiming over/under-estimation without checking monotonicity. The increasing/decreasing rule must apply on the interval.
  • Rounding too early. Keep exact values or enough decimal precision until the final answer.

Practice Problems

Try each problem before opening the answer. Focus on the setup, not only the final number.

1. Approximate \(\int_0^4 x^3\,dx\) using a left Riemann sum with \(n=4\).

\(\Delta x=\frac{4-0}{4}=1\). Left endpoints: \(0,1,2,3\). \(L_4=1[0^3+1^3+2^3+3^3]=0+1+8+27=36\).

2. Approximate \(\int_1^3\frac{1}{x}\,dx\) using a right Riemann sum with \(n=4\).

\(\Delta x=\frac{3-1}{4}=0.5\). Right endpoints: \(1.5,2,2.5,3\). \(R_4=0.5\left[\frac{1}{1.5}+\frac{1}{2}+\frac{1}{2.5}+\frac{1}{3}\right]\approx0.95\).

3. Use a midpoint sum with \(n=3\) to approximate \(\int_0^3(x^2+1)\,dx\).

\(\Delta x=1\). Midpoints: \(0.5,1.5,2.5\). \(M_3=1[f(0.5)+f(1.5)+f(2.5)]=1[1.25+3.25+7.25]=11.75\).

4. Use the trapezoidal rule for \(x=0,3,6,9\) and \(f(x)=2,5,7,4\).

\(\Delta x=3\). \(T_3=\frac{3}{2}[2+2(5)+2(7)+4]=\frac{3}{2}(30)=45\).

5. If \(f\) is increasing on \([a,b]\), does a left Riemann sum over-estimate or under-estimate?

It under-estimates because each left endpoint height is smaller than the function values to its right on the same subinterval.

FAQ: Approximating Areas with Riemann Sums

What is a Riemann sum?

A Riemann sum is an approximation of area under a curve using rectangles. It divides an interval into subintervals, chooses a sample point in each subinterval, and adds the rectangle areas \(f(x_i^*)\Delta x\).

How do you find \(\Delta x\) for a Riemann sum?

Use \(\Delta x=\frac{b-a}{n}\), where \([a,b]\) is the interval and \(n\) is the number of subintervals.

What is the difference between left and right Riemann sums?

A left Riemann sum uses the left endpoint of each subinterval as the rectangle height. A right Riemann sum uses the right endpoint of each subinterval.

What is a midpoint Riemann sum?

A midpoint Riemann sum uses the midpoint of each subinterval as the rectangle height. It is often more accurate than left or right sums for smooth functions.

Is the trapezoidal rule a Riemann sum?

The trapezoidal rule is not a rectangle-based Riemann sum, but it is a closely related numerical integration method that approximates area using trapezoids.

When does a left Riemann sum under-estimate?

A left Riemann sum under-estimates when the function is increasing on the entire interval.

When does a right Riemann sum under-estimate?

A right Riemann sum under-estimates when the function is decreasing on the entire interval.