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. In short: width times height on each slice, then add the slices.

For a function ff on [a,b][a,b], the general Riemann sum formula 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. The sample point might be the left endpoint, the right endpoint, or the midpoint.

What a Riemann sum means

The definite integral abf(x)dx\int_a^b f(x)\,dx measures accumulated change over an interval. Geometrically, it often represents signed area under the curve.

A Riemann sum replaces the curve with rectangles that are easier to add. When the slices get thinner, the rectangles usually follow the graph more closely. If ff is continuous on [a,b][a,b], finer partitions make the sums approach the exact integral.

That is the core idea behind integration: the integral is the limit of these small accumulated pieces.

Left, right, and midpoint Riemann sums

If the subintervals all have equal width, then

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

and the sample point rule determines the kind of sum:

  • Left sum: use the left endpoint of each subinterval.
  • Right sum: use the right endpoint of each subinterval.
  • Midpoint sum: use the 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. That conclusion depends on the function actually being increasing on that interval.

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

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

First find the width of each subinterval:

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

Because this is a right sum, use the right endpoints:

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

Now evaluate the function:

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

Build the sum:

R4=(14+1+94+4)12R_4 = \left(\frac{1}{4} + 1 + \frac{9}{4} + 4\right)\frac{1}{2}

Add inside the parentheses:

14+1+94+4=152\frac{1}{4} + 1 + \frac{9}{4} + 4 = \frac{15}{2}

So

R4=15212=154=3.75R_4 = \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 integral is about 2.672.67, so the right sum is an overestimate. That happens here because x2x^2 is increasing on [0,2][0,2], which makes each right-endpoint rectangle a little too tall.

Common mistakes with Riemann sums

  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 that 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 definite integral and the Riemann sum give signed area, not total physical area.
  5. Assuming more rectangles always fix every issue. Finer partitions improve the approximation under standard conditions such as continuity, but the sum is still an approximation until you take the limit idea seriously.

When Riemann sums are used

Riemann sums are useful whenever a quantity is built from many small contributions.

  • In calculus, they give the intuition behind the definite integral.
  • In physics, they can model accumulated quantities such as displacement from velocity samples.
  • In numerical work, they provide simple estimates when an exact antiderivative is inconvenient or not the point.

They are also a practical check on whether you really understand what an integral means before using antiderivative rules mechanically.

A fast way to read the formula

Each term f(xi)Δxif(x_i^*) \Delta x_i is one small contribution. The full sum says: add all the small contributions across the interval.

That same pattern shows up throughout calculus: small contribution times width, then add. A Riemann sum makes that structure visible before the limit notation turns it into an integral.

Try a similar problem

Try a midpoint sum for f(x)=x2f(x)=x^2 on [0,2][0,2] with the same n=4n=4. Then compare it with the right sum above and the exact value 83\frac{8}{3}. That is a quick way to see how the sample-point choice changes the estimate.

Need help with a problem?

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

Open GPAI Solver →