From Rate Measurements to Cumulative Change
A rate describes how quickly a quantity changes. If the rate is known continuously over a time interval, accumulated change is represented by the integral of that rate. In practice, measurements are often available only at selected times. The rate between those times is not directly recorded, so the total change must be estimated.
The basic strategy is to approximate the rate between observations by a simple shape. A rectangle treats the rate as constant over an interval; a trapezoid treats it as changing linearly between the measured endpoint rates. The estimated accumulated change is then the area of the chosen shapes.
If the quantity is a stock \(C(t)\), its estimated value at the final time is the initial stock plus the estimated change. The rate and time units must combine to give the units of the accumulated quantity: for example, litres per minute multiplied by minutes gives litres.
Rectangle and Trapezoid Formulas
Write \(h_i=t_{i+1}-t_i\) for the length of interval \(i\). The left-rectangle method uses the rate measured at the interval's left endpoint; the right-rectangle method uses the right endpoint. The trapezoidal method uses the average of the two endpoint rates.
Here \(L\), \(R\), and \(T\) denote estimates of accumulated change, not rates. If rates can be negative, these formulas estimate net change: positive and negative contributions are added with their signs. If all rates are nonnegative, the estimates represent nonnegative accumulated change.
For equally spaced measurements, every interval has the same length \(h\), so the formulas simplify. In particular, the trapezoidal estimate can be written as \(h\) times half the first rate, all interior rates, and half the last rate:
When intervals are unequal, use each interval's own length \(h_i\). A single average interval length cannot generally replace those individual widths: a rate measured across a longer interval contributes over more time.
Worked Example: Comparing Estimates on Equal Intervals
A production rate is measured in litres per minute at the times below. Estimate the production from minute 0 to minute 6 using left rectangles, right rectangles, and trapezoids.
Each interval has length \(h=2\) min. The left-rectangle estimate uses the rates at minutes 0, 2, and 4:
The right-rectangle estimate uses the rates at minutes 2, 4, and 6:
For trapezoids, compute each interval's average rate and multiply by its width:
As an arithmetic check, the trapezoidal estimate is the average of the left and right estimates here: \((24+22)/2=23\) L. This relationship holds on an equally spaced grid because each interior rate appears once in each rectangle sum, while the two endpoint rates appear in only one. The units also check: \((\text{L/min})(\text{min})=\text{L}\).
Why the Trapezoidal Formula Works
The trapezoidal method corresponds to a specific assumption about the unobserved rate: on each interval, the rate varies linearly between its endpoint measurements. For an interval \([a,b]\), with endpoint rates \(r(a)\) and \(r(b)\), the line joining those values has average height \(\bigl(r(a)+r(b)\bigr)/2\). Its area is therefore the average height times the width.
This derivation explains both the formula and its limitation. A trapezoid is exact for a rate that is linear on the interval, but a real rate may curve or vary irregularly between observations. The measured endpoints alone do not reveal precisely what happened in between.
Worked Example: Unequal Sampling Intervals
Suppose a service process has rates measured in jobs per hour as follows. Estimate its accumulated work from time 0 to time 4 with left rectangles, right rectangles, and trapezoids.
The interval lengths are \(1\), \(2\), and \(1\) hours. For the left estimate, use the rate at the start of each interval:
For the right estimate, use the rate at the end of each interval:
For trapezoids, average the endpoint rates separately on each interval, then multiply by that interval's length:
The units are jobs because each rate in jobs per hour is multiplied by an interval in hours. If we assume the rate is linear on each interval, the trapezoidal calculation is not merely an estimate: it is the exact accumulated work under that piecewise-linear rate model. For example, on the two-hour interval from time 1 to time 3, the assumed average rate is \((14+8)/2=11\) jobs per hour, giving \(11(2)=22\) jobs.
How the Sampling Interval Affects an Estimate
Shorter intervals generally give the approximation more opportunities to track changes in the rate. They do not, by themselves, guarantee that a particular estimate moves closer to the true total: the shape of the rate between observations matters. Under a smoothness assumption, however, the effect can be quantified for trapezoids.
To justify the bound on one interval \([a,b]\), let \(p\) be the line through the endpoint values. The interpolation remainder for a twice-differentiable function gives, at each interior \(t\), \(r(t)-p(t)=\frac{r''(\xi)}{2}(t-a)(t-b)\) for some \(\xi\) between \(a\) and \(b\). Consequently, if \(\lvert r''\rvert\le M\), then \(\lvert r(t)-p(t)\rvert\le\frac{M}{2}(t-a)(b-t)\). Integrating this inequality over the interval gives
The integral of \(p\) is the trapezoidal contribution. Applying the one-interval bound to every interval and adding the bounds proves the stated composite estimate. With equal spacing, there are \(n=(t_n-t_0)/h\) intervals; thus \(nMh^3/12=M(t_n-t_0)h^2/12\). The bound shows why reducing the spacing can reduce the possible trapezoidal error when the curvature stays bounded. It does not apply without the stated smoothness and derivative bound.
Worked Example: Comparing Coarse and Fine Sampling
Consider the rate \(r(t)=t^2\) on \(0\le t\le2\), measured in units per hour, with \(t\) in hours. This known rate lets us compare sampled estimates with the exact accumulated change.
Using only the endpoint measurements, \(r(0)=0\) and \(r(2)=4\), the trapezoidal estimate is
The exact change is \(\int_0^2t^2\,dt=[t^3/3]_0^2=8/3\) units, so the coarse estimate is high by \(4-8/3=4/3\) units.
Now add a measurement at \(t=1\), where \(r(1)=1\). The two trapezoidal contributions are
The fine estimate is high by \(3-8/3=1/3\) unit, less than the coarse estimate's error. The error bound also checks: \(r''(t)=2\), so take \(M=2\). With one interval of width 2, the bound is \(2(2^3)/12=4/3\) units; with two intervals of width 1, it is \(2(1^3+1^3)/12=1/3\) unit. In this example both bounds equal the actual errors.
Choosing and Reporting an Estimate
A rectangle estimate can be informative when there is a meaningful reason to treat the rate as constant over each interval, or when a one-sided estimate is specifically useful. If the rate is increasing, left rectangles fall below the accumulated change and right rectangles rise above it; if the rate is decreasing, the roles reverse. These comparisons require monotonicity throughout the intervals, not just a visual trend between a few measurements.
The trapezoidal estimate uses both endpoint measurements and often gives a reasonable approximation when the rate changes gradually. Yet it is not automatically more accurate for every set of data. In particular, knowing that endpoint values differ does not show whether the rate between them is nearly linear, sharply curved, or variable in some other way. More frequent measurements reduce the width over which such unobserved behavior can occur, but no method can recover details that the observations and assumptions do not determine.
When reporting a cumulative prediction, state the method and the sampling intervals, include units, and distinguish estimated change from the final cumulative total. For instance, if a stock begins at \(C(t_0)\), its estimated final value is \(C(t_0)+T\) when \(T\) is the trapezoidal estimate of net change. Do not report the estimate with unjustified precision: the arithmetic may be exact while the approximation of the unmeasured rate remains uncertain.
A Common Calculation Error
A frequent mistake is to average endpoint rates for a trapezoid but forget to multiply by the time interval. In the first example, the three average rates are \(4\), \(4.5\), and \(3\) L/min. Adding them gives \(11.5\), but this is still a sum of rates, not a volume. Each interval is two minutes long, so the correct calculation is
Always multiply a representative rate by its own interval length before adding interval contributions. This also prevents a second error: using one common width when the measurement times are unevenly spaced.
Check Your Understanding
Try each question before checking the formulas above.
- For rates \(2\), \(6\), and \(4\) units per minute measured at minutes 0, 1, and 3, calculate the left-rectangle, right-rectangle, and trapezoidal estimates.
- Why must the trapezoidal calculation use separate interval lengths when measurement times are not equally spaced?
- Under what assumption is a trapezoidal contribution exact for the rate on an interval?
- For an increasing rate throughout an interval, which rectangle estimate is above the true accumulated change, and which is below?
- What information about the rate is needed to apply the stated trapezoidal error bound?