Riemann Sum — Right Endpoint Approximation

April 12, 2026

Problem

Approximate ∫₀⁴ x² dx using 8 right-endpoint rectangles.

Explanation

The right-endpoint Riemann sum uses the function value at the right side of each subinterval. For an increasing function like f(x)=x2f(x) = x^{2}, this systematically overestimates the true area — every rectangle sticks above the curve.

The Setup

Same partition as the left sum, but we evaluate ff at the right endpoint xi=a+iΔxx_i = a + i\,\Delta x for i=1,2,,ni = 1, 2, \ldots, n:

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

Step-by-Step Solution

Given: f(x)=x2f(x) = x^{2}, a=0a = 0, b=4b = 4, n=8n = 8.

Find: The right-endpoint Riemann sum R8R_8.


Step 1 — Compute Δx\Delta x.

Δx=408=0.5\Delta x = \dfrac{4 - 0}{8} = 0.5

Step 2 — List the right endpoints.

xi=0.5,  1.0,  1.5,  2.0,  2.5,  3.0,  3.5,  4.0x_i = 0.5,\; 1.0,\; 1.5,\; 2.0,\; 2.5,\; 3.0,\; 3.5,\; 4.0

Step 3 — Evaluate f(xi)=xi2f(x_i) = x_i^{2}.

f(0.5)=0.25,    f(1)=1,    f(1.5)=2.25,    f(2)=4,f(0.5) = 0.25, \;\; f(1) = 1, \;\; f(1.5) = 2.25, \;\; f(2) = 4,

f(2.5)=6.25,    f(3)=9,    f(3.5)=12.25,    f(4)=16f(2.5) = 6.25, \;\; f(3) = 9, \;\; f(3.5) = 12.25, \;\; f(4) = 16

Step 4 — Sum the function values.

i=18f(xi)=0.25+1+2.25+4+6.25+9+12.25+16=51.0\sum_{i=1}^{8} f(x_i) = 0.25 + 1 + 2.25 + 4 + 6.25 + 9 + 12.25 + 16 = 51.0

Step 5 — Multiply by Δx\Delta x.

R8=0.5×51.0=25.5R_8 = 0.5 \times 51.0 = 25.5

Step 6 — Compare to the exact value.

04x2dx=64321.333\int_{0}^{4} x^{2}\,dx = \dfrac{64}{3} \approx 21.333

The error is 25.521.333=4.16725.5 - 21.333 = 4.167, or about 20% overestimation. The right sum is slightly worse than the left sum (which underestimated by 18%), because ff grows faster as xx grows — the error in the rightmost rectangle alone is huge.

Step 7 — Average the left and right sums (Trapezoidal Rule).

A neat observation: averaging LnL_n and RnR_n gives a much better estimate. This average is the Trapezoidal Rule:

Tn=Ln+Rn2=17.5+25.52=21.5T_n = \dfrac{L_n + R_n}{2} = \dfrac{17.5 + 25.5}{2} = 21.5

That's only 0.167 away from the exact value 64/321.33364/3 \approx 21.333less than 1% error with the same number of subdivisions!


Answer: The right-endpoint Riemann sum with n=8n = 8 rectangles is

  R8=25.5  \boxed{\;R_8 = 25.5\;}

This overestimates the exact area 64321.333\dfrac{64}{3} \approx 21.333 by 4.17 square units (≈ 20% error). The trapezoidal average (Ln+Rn)/2=21.5(L_n + R_n)/2 = 21.5 is almost exactly right.

Try It

  • Adjust n — watch how both the left and right errors shrink toward the exact value 64/364/3.
  • Toggle show exact area to see the true region in faint green.
  • Notice how every rectangle's top-right corner touches the curve — that's the defining feature of a right Riemann sum.

Interactive Visualization

Parameters

8.00
Your turn

Got your own math or physics problem?

Turn any problem into an interactive visualization like this one — powered by AI, generated in seconds. Free to try, no credit card required.

Sign Up Free to Try It30 free visualizations every day
Riemann Sum — Right Endpoint Approximation | MathSpin