Icon for AP® Calculus AB-BC

AP® Calculus AB-BC

How to Do Midpoint Riemann Sum and Other Approximations

how to do midpoint riemann sum

Exact integrals are beautiful, yet many real‐world shapes refuse to give tidy antiderivatives. Therefore, approximating area under a curve becomes essential in physics, economics, and life sciences. AP® Calculus Objectives LIM-5.A.1–5.A.4 expect mastery of these numerical techniques. This review walks through four classic methods—left, right, how to do midpoint Riemann sum, and trapezoidal Riemann sums—then touches on error analysis and calculator shortcuts.

Why Approximate?

  • Imagine tracking the temperature of lake water every hour from sunrise to noon. The graph is jagged, and an algebraic formula might not exist. However, the area beneath that curve equals accumulated heat energy.
  • Whenever antiderivatives are messy or unknown, numerical sums explain how to evaluate definite integrals quickly and accurately.

Riemann Sums at a Glance

A Riemann sum chops an interval [a,b] into n subintervals of width \Delta x. For each subinterval, a sample height is chosen and multiplied by width.

Key symbols

  • \Delta x = \dfrac{b-a}{n} for uniform partitions
  • x_i = endpoint or midpoint used
  • f(x_i) = height of rectangle or trapezoid

Non-uniform widths also work, yet AP® examples usually stay uniform.

Left Riemann Sum

Definition

The left Riemann sum uses the left endpoint of each subinterval.

L_n = \sum_{i=0}^{n-1} f(x_i)\Delta x

Step-by-Step Example

Approximate the integral of f(x)=x^2 on [0,2] with n=4.

  1. Width: \Delta x = \dfrac{2-0}{4}=0.5
  2. Left endpoints: 0, 0.5, 1.0, 1.5
  3. Heights: 0², 0.5², 1², 1.5² → 0, 0.25, 1, 2.25
  4. Multiply and add:
    • L_4 = (0+0.25+1+2.25)\times0.5 = 1.75

Graphing these rectangles shows gaps above the curve; therefore, for an increasing function, the left sum underestimates.

Right Endpoint Approximation

Definition

The right Riemann sum uses right endpoints.

R_n = \sum_{i=1}^{n} f(x_i)\Delta x

Trigonometric Example

Approximate \int_{0}^{\pi} \sin xdx with n=3.

  1. \Delta x = \dfrac{\pi-0}{3} = \dfrac{\pi}{3}
  2. Right endpoints: \dfrac{\pi}{3}, \dfrac{2\pi}{3}, \pi
  3. Heights: \sin\left(\dfrac{\pi}{3}\right)=\dfrac{\sqrt3}{2}, \sin\left(\dfrac{2\pi}{3}\right)=\dfrac{\sqrt3}{2}, \sin(\pi)=0
  4. Sum:
    • R_3 = \left(\dfrac{\sqrt3}{2}+\dfrac{\sqrt3}{2}+0\right)\dfrac{\pi}{3} = \dfrac{\sqrt3\pi}{3}

Because \sin x is increasing then decreasing, some rectangles stand above and others below. However, over the whole interval error remains moderate. For a strictly increasing function, the right sum overestimates.

How to Do a Midpoint Riemann Sum

Why Midpoints Work Better

Midpoint rectangles straddle the curve, canceling symmetrical errors. Consequently, the midpoint method often doubles accuracy compared with left or right sums.

Formula

M_n = \sum_{i=1}^{n} f\left(\dfrac{x_{i-1}+x_i}{2}\right)\Delta x

Detailed Example: Nonlinear Function

Approximate \int_{1}^{5} \sqrt{x}dx using n=4.

1. Width: \Delta x = \dfrac{5-1}{4}=1

2. Subintervals: [1,2], [2,3], [3,4], [4,5]

3. Midpoints: 1.5, 2.5, 3.5, 4.5

4. Create a quick table

Midpointf(x)=\sqrt{x}
1.5\sqrt{1.5}\approx1.225
2.5\sqrt{2.5}\approx1.581
3.5\sqrt{3.5}\approx1.871
4.5\sqrt{4.5}\approx2.121

5. Multiply and add:

M_4 = 1(1.225+1.581+1.871+2.121)\approx6.80

The exact integral equals \dfrac{2}{3}(5^{3/2}-1^{3/2})\approx6.82, so the midpoint error is tiny.

Trapezoidal Riemann Sum

Bridging Rectangles and Trapezoids

The trapezoidal Riemann sum averages left and right heights, producing trapezoids that hug slanted segments better.

Formula

T_n = \dfrac{\Delta x}{2}\left[f(x_0)+2\sum_{i=1}^{n-1}f(x_i)+f(x_n)\right]

Exponential Decay Example

Approximate \int_{0}^{3} e^{-x}dx with n=3.

  1. \Delta x = 1
  2. Function values:
    • f(0)=1, f(1)=e^{-1}, f(2)=e^{-2}, f(3)=e^{-3}
  3. Plug in:
    • T_3 = \dfrac{1}{2}\left[1 + 2(e^{-1}+e^{-2}) + e^{-3}\right] \approx 0.550

Quick Reference Chart

TermMeaning / Key Feature
Riemann SumSum of “height × width” that approximates an integral
\Delta xSubinterval width: (b – a)/n
Left Riemann SumUses left endpoints; underestimates if f increasing
Right Endpoint ApproximationUses right endpoints; overestimates if f increasing
Midpoint RuleUses midpoints
Trapezoidal Riemann SumAverage of left and right heights
ConcavitySign of f''(x) predicts over/under behavior

Putting It All Together

Choosing among methods depends on speed and accuracy. Midpoint and trapezoidal rules offer superior precision for the same n, yet left or right sums sometimes appear in free-response because they are quicker to draw. Therefore, always state the partition, label \Delta x, and identify sample points, demonstrating how to do midpoint Riemann sum when appropriate. Showing this structure earns partial credit even if arithmetic slips.

Remember: approximation is a professional tool, not a shortcut. Engineers and statisticians rely on it daily.

Conclusion

Approximating area under a curve unlocks answers when exact calculus stalls. The left Riemann sum, right endpoint approximation, how to do midpoint Riemann sum, and trapezoidal Riemann sum each have clear formulas, predictable errors, and real-world value. Practice each method on polynomials, exponentials, and trig graphs. Mastery now will make the AP® exam—and future science courses—feel more manageable.

Sharpen Your Skills for AP® Calculus AB-BC

Are you preparing for the AP® Calculus exam? We’ve got you covered! Try our review articles designed to help you confidently tackle real-world math problems. You’ll find everything you need to succeed, from quick tips to detailed strategies. Start exploring now!

Need help preparing for your AP® Calculus AB-BC exam?

Albert has hundreds of AP® Calculus AB-BC practice questions, free responses, and an AP® Calculus AB-BC practice test to try out.

Interested in a school license?​

Bring Albert to your school and empower all teachers with the world's best question bank for:

➜ SAT® & ACT®
➜ AP®
➜ ELA, Math, Science, & Social Studies
➜ State assessments

Options for teachers, schools, and districts.