Why Piecewise Rates Need Careful Sampling
A rate may follow one rule during one part of a time period and a different rule later. For example, a tank may fill at one rate before a valve setting changes, then fill at another rate afterward. A rectangle-sum estimate must account for both rules, but the key question is not which formulas occur somewhere in a rectangle’s interval. It is which formula gives the rate at the rectangle’s sample point.
This distinction matters when a partition interval crosses the time at which the formula changes. The interval still has the width specified by the partition. Its rectangle height is found by evaluating the piecewise rate at the requested sample point, using the formula whose domain contains that point.
Reading a Piecewise Rate
A piecewise function is defined by giving different formulas on different parts of its domain. The domains matter: they specify when each formula is used and ensure that the rate has an unambiguous value at each relevant time.
For instance, consider a rate \(r\), measured in liters per minute, defined for \(0\le t\le 5\) by
At \(t=1\), the first formula applies, so \(r(1)=2+1=3\). At \(t=2\), the first domain no longer applies, while the second one does, so \(r(2)=6\). The boundary convention is part of the definition. It is not a matter of choosing whichever formula seems more convenient.
A partition divides the time interval into subintervals. For a rectangle sum, each subinterval has a width and a selected sample point. A left sum uses the left endpoint of each subinterval; a right sum uses the right endpoint; a midpoint sum uses its midpoint. Those choices determine where to evaluate the rate.
If \(r\) is measured in liters per minute and \(t\) in minutes, then \(r(c_i)\Delta t_i\) is measured in liters. The sum combines the estimated contributions from all the subintervals.
A Reliable Calculation Process
Before doing arithmetic, list the subintervals, their widths, and their sample points. Then evaluate the rate at each sample point, checking its domain before substituting into a formula. This prevents a common error: selecting a formula because of where a subinterval begins or ends, rather than because of where the sample point lies.
Write each subinterval and calculate its width by subtracting its left endpoint from its right endpoint.
Use the left endpoint, right endpoint, or midpoint required by the sum.
Locate the sample point in the domains shown in the piecewise definition. Pay particular attention to included and excluded boundary points.
Multiply each sampled rate by its subinterval width, then add the products and state the resulting units.
Worked Examples
Worked Example: A Left Sum with a Boundary in the Partition
A tank fills at the piecewise rate
where \(t\) is in minutes and \(r(t)\) is in liters per minute. Estimate the accumulated amount from \(t=0\) to \(t=5\) using a left sum on the partition \(0,1,2,4,5\).
The subintervals are \([0,1]\), \([1,2]\), \([2,4]\), and \([4,5]\). Their widths are \(1\), \(1\), \(2\), and \(1\) minute. The left sample points are \(0\), \(1\), \(2\), and \(4\).
At \(t=0\), the first formula applies: \(r(0)=2+0=2\). At \(t=1\), it also applies: \(r(1)=2+1=3\). At \(t=2\), the second formula applies because its domain includes \(2\): \(r(2)=6\). At \(t=4\), the second formula applies as well: \(r(4)=6\).
Check the products: the four subinterval contributions are \(2\), \(3\), \(12\), and \(6\) liters, and their sum is \(23\) liters. In particular, the rectangle on \([2,4]\) has height \(r(2)=6\), not a value from the earlier formula.
Worked Example: A Midpoint at the Formula Change
Suppose a flow rate is
in liters per minute. Use a midpoint sum on the partition \(0,1,3,5\) to estimate the amount that flows from \(t=0\) to \(t=5\).
The subintervals are \([0,1]\), \([1,3]\), and \([3,5]\), with widths \(1\), \(2\), and \(2\) minutes. Their midpoints are \(0.5\), \(2\), and \(4\). The middle subinterval crosses the formula boundary at \(t=2\), and its midpoint lies exactly at that boundary.
For the first midpoint, \(0.5<2\), so use the first formula: \(r(0.5)=5-0.5=4.5\). For the second midpoint, \(t=2\), the second formula applies: \(r(2)=2+4=6\). For the third midpoint, \(4\ge2\), so again use the second formula: \(r(4)=4+4=8\).
Check the contributions: \(4.5\) liters, \(12\) liters, and \(16\) liters add to \(32.5\) liters. The middle rectangle uses width \(2\) and height \(r(2)=6\). It is not split at \(t=2\), because the requested partition contains the single subinterval \([1,3]\).
Worked Example: A Right Sum with an Interval Crossing the Boundary
Let a rate be
in liters per minute. Find the right-sum estimate on the partition \(0,1.5,3,5\).
The subintervals are \([0,1.5]\), \([1.5,3]\), and \([3,5]\). Their widths are \(1.5\), \(1.5\), and \(2\) minutes. The right endpoints, and therefore the right sample points, are \(1.5\), \(3\), and \(5\).
Since \(1.5<2\), use the first formula at the first sample point: \(r(1.5)=2(1.5)+1=3+1=4\). The second subinterval crosses \(t=2\), but its right sample point is \(3\), which is in the second formula’s domain. Thus \(r(3)=7-3=4\). At the final sample point, \(5\), the second formula gives \(r(5)=7-5=2\).
Check the products: \(4\cdot1.5=6\), \(4\cdot1.5=6\), and \(2\cdot2=4\); their total is \(16\) liters. The middle rectangle keeps its full width of \(1.5\) minutes and uses the rate at its right endpoint.
Why the Rectangle Sum Has This Form
On subinterval \(i\), the rectangle-sum method represents the rate by one sampled value, \(r(c_i)\), across the entire width \(\Delta t_i\). The contribution assigned to that subinterval is therefore the rectangle’s height multiplied by its width. Adding these contributions gives the total estimate across the partition.
This reasoning applies whether the rate has one formula or several. For a piecewise rate, the definition of the function supplies the height: evaluate the formula assigned to \(c_i\). The formula change does not, by itself, change the given width or the chosen sample point.
These sums are estimates based on sampled rates. They need not equal the actual accumulated amount. The calculation answers a specific question: what estimate results from the stated partition and sampling rule? Changing the partition or the sample points can change that estimate.
Common Mistake: Choosing a Formula from the Interval Instead of the Sample
In the midpoint example, the middle interval is \([1,3]\), and its midpoint is \(2\). A tempting but incorrect calculation is to notice that the interval starts below \(2\), use the first formula, and write \(r(2)=5-2=3\). This gives a middle contribution of \(3(2)=6\) liters and an incorrect total of \(4.5+6+16=26.5\) liters.
The error is that the first formula is defined only for \(0\le t<2\). It does not apply at \(t=2\). The correct value is \(r(2)=2+4=6\), using the second formula. The middle contribution is \(6(2)=12\) liters, so the correct sum is \(4.5+12+16=32.5\) liters.
Why This Skill Matters
Piecewise rates arise whenever a process changes conditions: a flow rate may change when a pump setting changes, or a production rate may follow different rules during different shifts. A rectangle-sum calculation is reliable only if each sampled rate is evaluated under the correct rule. Keeping the partition, sample locations, formula domains, and units visible makes the estimate easier to check and the source of any error easier to locate.
Before finishing a calculation, verify that every sample point belongs to a stated formula domain, every width is positive and matches its subinterval, and every product has units of accumulated amount. If a sample lies exactly at a boundary, follow the inclusion convention in the definition.
Check Your Understanding
For each question, use the stated sampling rule and pay attention to the formula domains.
- A rate is \(r(t)=3\) for \(0\le t<1\) and \(r(t)=5\) for \(1\le t\le3\). Which formula gives \(r(1)\), and what is its value?
- A midpoint sum uses the subinterval \([0,2]\), whose midpoint is \(1\). The rate changes formula at \(t=1\). What information determines which formula supplies the rectangle height?
- In a right sum, a subinterval crosses a formula boundary, but its right endpoint is after the boundary. Should the height be chosen from the formula at the left endpoint, or from the formula at the right sample point?
- A rectangle has rate height \(4\) liters per minute and width \(2.5\) minutes. What is its contribution, including units?
- Why should a subinterval that crosses a formula boundary not automatically be split when evaluating a sum on a specified partition?