Why Unequal Widths Need Care
A Riemann sum estimates accumulated signed area by adding the contributions of rectangles. When the subintervals all have the same width, one width can be used for every rectangle. But a partition need not divide an interval into equal pieces. If its widths vary, each rectangle must use the width of the particular subinterval on which its height is sampled.
The main task is therefore a careful match: for each subinterval, identify its width and the function value assigned to that interval. Pairing a height with the wrong width can change the result even if every function value and every width has been copied correctly.
Partition Widths and Riemann Sums
A partition of \([a,b]\) is an ordered list of points \(a=x_0<x_1<\cdots<x_n=b\). It divides the interval into \(n\) subintervals, \([x_{i-1},x_i]\). The width of the \(i\)th subinterval is the difference between its right and left endpoints.
For a function \(f\), choose one sample point \(c_i\) in each subinterval. The height assigned to that subinterval is \(f(c_i)\). Its signed rectangle contribution is that height multiplied by that subinterval’s width.
The sample point might be the left endpoint, the right endpoint, the midpoint, or another specified point in the subinterval. The sum uses the chosen sample point; it does not require all subintervals to have the same width.
If \(f(c_i)\) is positive, the contribution is positive. If \(f(c_i)\) is negative, the contribution is negative. Thus a Riemann sum represents signed rectangle contributions, not necessarily the sum of positive geometric areas.
A Reliable Calculation Process
With unequal widths, organize the calculation one subinterval at a time. Keeping the interval, width, sample point, function value, and product together prevents a value from drifting into a neighboring interval.
Write \([x_0,x_1]\), \([x_1,x_2]\), and so on, in order.
For the interval \([x_{i-1},x_i]\), subtract its left endpoint from its right endpoint.
Use the specified point for that interval, then evaluate \(f\) there if needed.
Compute \(f(c_i)\Delta x_i\) before adding the contributions.
Keep negative values negative and check the interval-to-width pairing.
Worked Example: A Left-Endpoint Sum
Worked Example: A Left-Endpoint Sum
A function is given on the partition \(0=x_0<x_1=1<x_2=3<x_3=5\), with \(f(0)=2\), \(f(1)=4\), and \(f(3)=1\). Calculate the left-endpoint Riemann sum.
For a left-endpoint sum, the sample point for each subinterval is its left endpoint. First calculate the widths:
The three intervals are \([0,1]\), \([1,3]\), and \([3,5]\). Their left-endpoint heights are \(f(0)=2\), \(f(1)=4\), and \(f(3)=1\), respectively. Multiply each height by the width of the same interval:
The left-endpoint sum is \(12\). Checking the pairings gives contributions \(2\cdot1=2\), \(4\cdot2=8\), and \(1\cdot2=2\); adding them again gives \(2+8+2=12\).
Worked Example: A Right-Endpoint Sum
Worked Example: A Right-Endpoint Sum
Calculate the right-endpoint sum for \(f(x)=x+1\) on the partition \(0=x_0<x_1=2<x_2=5<x_3=6\).
The intervals are \([0,2]\), \([2,5]\), and \([5,6]\), so their widths are:
A right-endpoint sum uses \(2\), \(5\), and \(6\) as the sample points. Evaluate the function at each one:
Now multiply each right-endpoint height by its own interval width:
The right-endpoint sum is \(31\). The width-height products are \(6\), \(18\), and \(7\); their total, \(6+18+7\), checks the result.
Worked Example: A Sum with Specified Sample Points
Worked Example: A Sum with Specified Sample Points
A table gives \(f(0.5)=3\), \(f(2)=2\), and \(f(5)=4\). Find the Riemann sum on the partition \(0=x_0<x_1=1<x_2=4<x_3=6\), using sample points \(0.5\), \(2\), and \(5\), in that order.
Match each sample point with its interval: \(0.5\in[0,1]\), \(2\in[1,4]\), and \(5\in[4,6]\). The widths are:
The corresponding heights are \(3\), \(2\), and \(4\). Thus:
The sum is \(17\). Checking interval by interval: \([0,1]\) contributes \(3\), \([1,4]\) contributes \(6\), and \([4,6]\) contributes \(8\); \(3+6+8=17\). Each sample point lies in the interval whose width it multiplies.
Why Each Width Must Match Its Height
For one subinterval \([x_{i-1},x_i]\), a rectangle with height \(f(c_i)\) and width \(x_i-x_{i-1}\) has signed area \(f(c_i)(x_i-x_{i-1})\). Adding the contributions of all the subintervals gives the Riemann sum. This explains why the product must use the height and width from the same interval: together they describe that interval’s rectangle.
More explicitly, on the \(i\)th interval, the rectangle spans horizontally from \(x_{i-1}\) to \(x_i\), giving width \(x_i-x_{i-1}\), while its chosen height is \(f(c_i)\). Its contribution is therefore exactly \(f(c_i)(x_i-x_{i-1})\). Summing these contributions for \(i=1,\ldots,n\) produces the stated sum.
If the function values represent a quantity per unit of \(x\), multiplying by a width in \(x\) gives a quantity accumulated over that interval. The pairing matters for the same reason: a rate on one interval must be multiplied by that interval’s width, not another interval’s width.
Common Mistake: Reusing One Width
A frequent error is to assume the widths are equal simply because there are several rectangles. In the second worked example, the widths were \(2\), \(3\), and \(1\), not a common \(\Delta x\). Using \(2\) for every width would produce this incorrect calculation:
The correction is to use the actual width on each interval: \(2\) for \([0,2]\), \(3\) for \([2,5]\), and \(1\) for \([5,6]\). Therefore the correct calculation is:
Another version of the same mistake is to use all the right heights but attach them to the wrong widths. A useful check is to write each term with its interval visible, such as \(f(5)(5-2)\), before evaluating it. That makes it harder to mistake the width of one interval for another.
Key Checks Before Adding
- Are the partition points in increasing order?
- Was every width computed as right endpoint minus left endpoint?
- Does each sample point belong to the interval whose width it uses?
- Was the specified sampling rule followed?
- Were negative heights kept negative in the products?
Unequal-width sums use the same rectangle idea as other Riemann sums. The essential adjustment is to calculate each \(\Delta x_i\) separately and keep it attached to the function value from its own subinterval.
Check Your Understanding
For each question, track the interval, sample point, height, and width together.
- For the partition \(0<2<5\), what are the two subinterval widths?
- On the partition \(0<1<4\), a left-endpoint sum uses \(f(0)=3\) and \(f(1)=-2\). Calculate the sum.
- On the partition \(1<3<6\), a right-endpoint sum has \(f(3)=4\) and \(f(6)=1\). Calculate the sum.
- Why is it incorrect to use one common width when the partition intervals have different lengths?
- For a Riemann sum, what does a negative function value do to that interval’s contribution?