Why Piecewise Models Need Careful Endpoint Values
A piecewise-defined function uses different formulas on different parts of its domain. This is useful when one model describes several regimes: a cost may change after a threshold, or a rule may change at a particular input value.
To find an average rate of change, the key question is not how many formulas the interval crosses. It is what the function’s actual values are at the two endpoints. A formula may change inside the interval without changing the definition of average rate.
The main source of care is the breakpoint: the input where the function’s rule changes. The piecewise definition specifies which formula applies at the breakpoint itself. Use that formula when evaluating the function there.
Average Rate on an Interval
This definition requires only that \(f(a)\) and \(f(b)\) exist and that \(a\ne b\). It does not require \(f\) to have the same formula throughout the interval, or even to be continuous there. The value \(b-a\) is the total input change, and \(f(b)-f(a)\) is the total output change.
For a piecewise-defined function, evaluate \(f(a)\) and \(f(b)\) using the stated branch conditions. Then substitute those values into the average-rate formula. In particular, if an endpoint is a breakpoint, check whether the definition assigns that endpoint to the piece on the left or the piece on the right.
An Interval Within One Piece
If both endpoints are in a region where the same formula applies, the calculation is the same as for that formula alone. The piecewise definition still matters: it tells us that this is the correct rule to use at the endpoints.
Worked Example: An Interval Within One Piece
Let \(f\) be defined by
Find the average rate of change from \(x=0\) to \(x=1\).
Step 1: Choose the branch at each endpoint. Both \(0\) and \(1\) are less than \(2\), so use \(f(x)=2x+1\).
Step 2: Evaluate the endpoint values.
Step 3: Calculate the average rate.
Check: The input increases by \(1-0=1\). A rate of \(2\) gives an output change of \(2\cdot1=2\), which agrees with \(f(1)-f(0)=3-1=2\).
When the Interval Crosses a Breakpoint
Suppose the interval starts in one piece and ends in another. The average rate is still computed from the two endpoint values. Do not replace the piecewise function by one of its formulas over the entire interval unless that formula actually applies at both endpoints.
A breakpoint inside the interval may be useful for understanding how the model behaves, but it does not change the definition of the overall average rate. The calculation uses the entire change in output over the entire change in input.
Worked Example: An Interval Crossing Two Breakpoints
Consider the function
Find its average rate of change from \(x=0\) to \(x=4\). This interval crosses the breakpoints at \(1\) and \(3\).
Step 1: Evaluate the left endpoint. Since \(0<1\), use the first rule:
Step 2: Evaluate the right endpoint. Since \(4>3\), use the third rule:
Step 3: Use the full interval in the average-rate formula.
Check: The total input change is \(4\), and the calculated rate is \(\frac{7}{4}\). Their product is \(\frac{7}{4}\cdot4=7\), equal to the output change \(9-2=7\).
The formulas at the breakpoints are not needed to calculate this overall rate, because neither breakpoint is an endpoint. The actual endpoint values determine the answer.
When an Endpoint Is a Breakpoint
If an endpoint is exactly at a breakpoint, its value must be found from the branch whose condition includes that input. For example, \(x\ge 2\) includes \(x=2\), while \(x<2\) does not. The left-hand formula may describe values just below \(2\), but it is not the rule for evaluating \(f(2)\) in this definition.
Worked Example: Starting at a Breakpoint
Let
Find the average rate of change from \(x=2\) to \(x=5\).
Step 1: Use the assigned branch at \(x=2\). The condition \(x\ge2\) includes the endpoint, so
Step 2: Evaluate the other endpoint. Since \(5\ge2\), the same branch applies:
Step 3: Calculate the rate.
Check: The input change is \(3\). A rate of \(3\) gives an output change of \(3\cdot3=9\), and \(h(5)-h(2)=14-5=9\).
Why the Endpoint Method Works
The average rate is defined by the total output change divided by the total input change. That definition remains valid whether the formula is constant across the interval or changes one or more times. The following argument also explains why splitting an interval, when convenient, does not change the overall answer.
When an interval crosses several pieces, the function’s values at those interior breakpoints can help describe the individual changes. But the overall rate remains \(\frac{f(b)-f(a)}{b-a}\). Do not confuse that overall rate with a rate on just one of the subintervals.
A Common Mistake: Extending a Branch Beyond Its Domain
A frequent error is to select a formula based on where the interval begins and then use it at both endpoints, even though its condition excludes the second endpoint. The formula is only part of the piecewise definition; the branch condition matters just as much as the algebraic expression.
Worked Example: Correcting a Branch-Selection Error
Suppose
Find the average rate of change from \(x=0\) to \(x=2\).
Incorrect calculation: Using \(2x+1\) at both endpoints gives \(p(0)=1\) and a supposed value \(p(2)=2(2)+1=5\). This produces \(\frac{5-1}{2-0}=2\), but it is wrong: \(2\) does not satisfy the condition \(x<1\).
Correct calculation: At \(x=0\), use the first branch, and at \(x=2\), use the second:
Therefore,
Check: The input change is \(2\), so the calculated rate \(\frac{5}{2}\) gives an output change of \(\frac{5}{2}\cdot2=5\), which equals \(6-1=5\).
A Reliable Calculation Routine
For any piecewise model and any interval with distinct endpoints, use a consistent sequence of steps:
Identify the two inputs \(a\) and \(b\), and note their order.
Determine which formula applies at \(a\) and which applies at \(b\). Pay particular attention to equality signs at breakpoints.
Calculate \(f(a)\) and \(f(b)\) using the selected branches.
Calculate \(\frac{f(b)-f(a)}{b-a}\), using the original interval endpoints.
Multiply the rate by \(b-a\) and confirm that the product equals \(f(b)-f(a)\).
Why This Matters
Piecewise models describe systems whose rules change at thresholds. The average rate over a time period, price range, or other input interval summarizes the net change across that entire interval. It remains well-defined whenever the function has values at both endpoints and the endpoints are distinct.
The most important practical safeguard is to keep the branch conditions attached to their formulas. A calculation can be algebraically correct and still be wrong if it uses a formula outside the part of the domain where that formula applies. Once the true endpoint values have been identified, the average-rate calculation is direct.
Check Your Understanding
Use the piecewise definition carefully in each question.
- If an interval’s endpoints lie in different pieces, what values determine its overall average rate?
- For \(q(x)=\begin{cases}x+1,&x<2,\\2x,&x\ge2,\end{cases}\) find the average rate from \(x=1\) to \(x=3\).
- In the same definition, which branch must be used to evaluate \(q(2)\), and why?
- What two quantities should be compared in the check of a calculated average rate?
- Does the average-rate formula require the function to be continuous throughout the interval? State what it does require.