A Riemann sum approximates a definite integral with a single repeated calculation: width times height on each slice, then add the slices. Get the width and the sample point straight and the rest is arithmetic.

The formula and its symbols

For a function ff on [a,b][a,b], the general Riemann sum is

i=1nf(xi)Δxi\sum_{i=1}^n f(x_i^*) \, \Delta x_i

Here Δxi\Delta x_i is the width of the iith subinterval, and xix_i^* is the sample point chosen inside that subinterval — its height. The sample point can be the left endpoint, the right endpoint, or the midpoint. Each term f(xi)Δxif(x_i^*)\,\Delta x_i is one small contribution; the sum adds them across the interval.

Why this approximates the integral

The definite integral abf(x)dx\int_a^b f(x)\,dx measures accumulated change over an interval and often represents signed area under the curve. A Riemann sum replaces the curve with rectangles that are easy to add. As the slices get thinner, the rectangles follow the graph more closely — and if ff is continuous on [a,b][a,b], finer partitions make the sums approach the exact integral. That limiting process is the core idea behind integration: the integral is the limit of these small accumulated pieces. The formula simply makes the "small contribution times width, then add" structure visible before limit notation hides it.

Left, right, and midpoint sums

With equal-width subintervals,

Δx=ban\Delta x = \frac{b-a}{n}

and the sample-point rule sets the type:

  • Left sum: left endpoint of each subinterval.
  • Right sum: right endpoint of each subinterval.
  • Midpoint sum: midpoint of each subinterval.

These choices can change whether the estimate is too high or too low. If the function is increasing on the whole interval, a left sum underestimates and a right sum overestimates — a conclusion that depends on the function actually being increasing there.

Worked example: right sum for f(x)=x2f(x)=x^2 on [0,2][0,2]

Approximate 02x2dx\int_0^2 x^2\,dx with a right Riemann sum, n=4n=4 equal subintervals.

Width of each subinterval:

Δx=204=12\Delta x = \frac{2-0}{4} = \frac{1}{2}

Right endpoints:

x1=12,x2=1,x3=32,x4=2x_1 = \tfrac{1}{2}, \quad x_2 = 1, \quad x_3 = \tfrac{3}{2}, \quad x_4 = 2

Evaluate ff:

f ⁣(12)=14,f(1)=1,f ⁣(32)=94,f(2)=4f\!\left(\tfrac{1}{2}\right) = \tfrac{1}{4}, \quad f(1) = 1, \quad f\!\left(\tfrac{3}{2}\right) = \tfrac{9}{4}, \quad f(2) = 4

Build the sum:

R4=(14+1+94+4)12=15212=154=3.75R_4 = \left(\tfrac{1}{4} + 1 + \tfrac{9}{4} + 4\right)\tfrac{1}{2} = \frac{15}{2} \cdot \frac{1}{2} = \frac{15}{4} = 3.75

The exact integral is

02x2dx=[x33]02=832.67\int_0^2 x^2\,dx = \left[\frac{x^3}{3}\right]_0^2 = \frac{8}{3} \approx 2.67

The comparison matters more than the arithmetic: the right sum gives 3.753.75 while the exact value is about 2.672.67, so the right sum overestimates. That happens because x2x^2 is increasing on [0,2][0,2], making each right-endpoint rectangle slightly too tall.

Practice the calculation

Compute a midpoint sum for f(x)=x2f(x)=x^2 on [0,2][0,2] with the same n=4n=4. The midpoints are 14,34,54,74\tfrac{1}{4}, \tfrac{3}{4}, \tfrac{5}{4}, \tfrac{7}{4}. Answer check: the midpoint estimate should come out to 218=2.625\tfrac{21}{8} = 2.625, which lands much closer to the exact 832.67\tfrac{8}{3} \approx 2.67 than the right sum did — a quick way to see how the sample-point choice changes the estimate.

Calculation traps to watch for

  1. Mixing up Δx\Delta x and the sample point. Δx\Delta x is the width; xix_i^* is where you measure the height.
  2. Using right endpoints when the problem asks for left endpoints, or vice versa.
  3. Forgetting the estimate can be above or below the exact integral depending on the function and the sample rule.
  4. Treating every Riemann sum as ordinary area. If the function is below the xx-axis, the sum gives signed area, not total physical area.
  5. Assuming more rectangles always fix everything. Finer partitions improve the approximation under standard conditions such as continuity, but the sum is still an approximation until you take the limit.

When Riemann sums are used

Riemann sums show up wherever a quantity is built from many small contributions: in calculus they give the intuition behind the definite integral; in physics they model accumulated quantities such as displacement from velocity samples; in numerical work they give simple estimates when an exact antiderivative is inconvenient. They are also a practical check on whether you understand what an integral means before applying antiderivative rules mechanically.

Frequently Asked Questions

What is a Riemann sum in simple terms?
A Riemann sum approximates a definite integral by splitting an interval into small pieces, building a rectangle on each piece, and adding the rectangle areas. On each slice you compute width times height, where the height comes from evaluating the function at a chosen sample point, then you add all the slices together.
What is the difference between left, right, and midpoint Riemann sums?
With equal-width subintervals, the only difference is the sample point used for each rectangle's height: the left endpoint, the right endpoint, or the midpoint of each subinterval. The choice can change whether the estimate comes out too high or too low, depending on how the function behaves on the interval.
Does a left Riemann sum overestimate or underestimate?
If the function is increasing on the whole interval, a left sum underestimates the integral and a right sum overestimates it. That conclusion depends on the function actually being increasing there; for decreasing functions the roles reverse, so always check the behavior of the function on the specific interval first.
How is a Riemann sum related to the definite integral?
The definite integral measures accumulated change and is the limit of Riemann sums as the slices get thinner. For a continuous function on a closed interval, finer partitions make the rectangle sums approach the exact value of the integral. That limiting process is the core idea behind integration.

Need help with a problem?

Upload your question and get a verified, step-by-step solution in seconds.

Open GPAI Solver →