Tutorials › Calculus I › Average Rates Across Piecewise Models

Rates of Change and Tangents · Tutorial 311 of 1495

Average Rates Across Piecewise Models

Learn how to find an average rate across a piecewise model by evaluating the function at the interval’s endpoints, even when its formula changes in between.

Beginner 9 min read

What You'll Learn

  • State the average-rate formula for an interval with distinct endpoints.
  • Identify which branch of a piecewise definition applies at each endpoint.
  • Calculate an average rate when an interval stays within one piece.
  • Calculate an average rate when an interval crosses one or more breakpoints.
  • Check a calculated rate by verifying the total change in output.
  • Recognize why using an interior branch formula at an endpoint can give the wrong result.

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

Definition: If \(f\) is defined at two distinct inputs \(a\) and \(b\), its average rate of change from \(a\) to \(b\) is the change in output divided by the change in input: $$ \frac{f(b)-f(a)}{b-a}. $$ For an interval with \(a<b\), this is the slope of the secant line through \((a,f(a))\) and \((b,f(b))\).

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

$$ f(x)= \begin{cases} 2x+1, & x<2,\\ x^2-1, & x\ge 2. \end{cases} $$

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.

$$ f(0)=2(0)+1=1, \qquad f(1)=2(1)+1=3. $$

Step 3: Calculate the average rate.

$$ \frac{f(1)-f(0)}{1-0} = \frac{3-1}{1} = 2. $$

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

$$ g(x)= \begin{cases} x+2, & x<1,\\ 3x-1, & 1\le x\le 3,\\ x+5, & x>3. \end{cases} $$

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:

$$ g(0)=0+2=2. $$

Step 2: Evaluate the right endpoint. Since \(4>3\), use the third rule:

$$ g(4)=4+5=9. $$

Step 3: Use the full interval in the average-rate formula.

$$ \frac{g(4)-g(0)}{4-0} = \frac{9-2}{4} = \frac{7}{4}. $$

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

$$ h(x)= \begin{cases} x^2+1, & x<2,\\ 3x-1, & x\ge 2. \end{cases} $$

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

$$ h(2)=3(2)-1=6-1=5. $$

Step 2: Evaluate the other endpoint. Since \(5\ge2\), the same branch applies:

$$ h(5)=3(5)-1=15-1=14. $$

Step 3: Calculate the rate.

$$ \frac{h(5)-h(2)}{5-2} = \frac{14-5}{3} = \frac{9}{3} = 3. $$

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.

Justification: Suppose \(a<c<b\), and \(f\) is defined at \(a\), \(c\), and \(b\). The output changes on the two subintervals add to the total output change: $$ \bigl(f(c)-f(a)\bigr)+\bigl(f(b)-f(c)\bigr)=f(b)-f(a). $$ The input changes add in the same way: $$ (c-a)+(b-c)=b-a. $$ Thus the overall average rate is the total endpoint output change divided by the total endpoint input change. This reasoning uses endpoint values and algebra; it does not require continuity at \(c\).

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

$$ p(x)= \begin{cases} 2x+1, & x<1,\\ x+4, & x\ge1. \end{cases} $$

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:

$$ p(0)=2(0)+1=1, \qquad p(2)=2+4=6. $$

Therefore,

$$ \frac{p(2)-p(0)}{2-0} = \frac{6-1}{2} = \frac{5}{2}. $$

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:

1
Record the endpoints.
Identify the two inputs \(a\) and \(b\), and note their order.
2
Check each branch condition.
Determine which formula applies at \(a\) and which applies at \(b\). Pay particular attention to equality signs at breakpoints.
3
Evaluate the actual endpoint values.
Calculate \(f(a)\) and \(f(b)\) using the selected branches.
4
Divide total output change by total input change.
Calculate \(\frac{f(b)-f(a)}{b-a}\), using the original interval endpoints.
5
Check the result.
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.

  1. If an interval’s endpoints lie in different pieces, what values determine its overall average rate?
  2. For \(q(x)=\begin{cases}x+1,&x<2,\\2x,&x\ge2,\end{cases}\) find the average rate from \(x=1\) to \(x=3\).
  3. In the same definition, which branch must be used to evaluate \(q(2)\), and why?
  4. What two quantities should be compared in the check of a calculated average rate?
  5. Does the average-rate formula require the function to be continuous throughout the interval? State what it does require.

Test yourself: Calculus I final exam practice

Ready to check what you know? Work a full-length practice final, then open the complete worked solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers the full Calculus AB & BC curriculum (the core of Calculus I and II): full review, every practice question, and step-by-step solutions to each one.

QR code to download the Calc Pass app

Get the Calc Pass App

Scan to download and practice on the go, with instant scoring.

Calc Pass Volume 1: 1,114 Practice Questions book cover

Vol. 1: 1,114 Questions

The complete practice question bank, organized by AB & BC topic.

View on Amazon
Calc Pass Volume 2: Solutions Manual book cover

Vol. 2: Solutions Manual

Fully worked solutions to every question in Volume 1.

View on Amazon