Tutorials › Calculus I › Piecewise Rates Across Operating Regimes

Calculus-Based Model Construction · Tutorial 1466 of 1495

Piecewise Rates Across Operating Regimes

Represent scheduled operating-rate changes with a piecewise function and compute cumulative totals consistently across every regime boundary.

Advanced 9 min read

What You'll Learn

  • Define a rate using separate formulas on scheduled time intervals
  • Build a cumulative total from an initial baseline and rate contributions
  • Calculate totals when the observation time falls inside a regime
  • Handle rate jumps without resetting the accumulated quantity
  • Identify and correct boundary double-counting errors

Why Scheduled Rate Changes Need Care

A process may operate under different conditions at different scheduled times. A machine could run at one rate during setup, another during normal operation, and a third during a reduced-speed period. The rate changes when the operating regime changes, but the amount accumulated before that time remains part of the total.

The key modeling task is to keep two ideas distinct: the rate describes what is happening now, while the cumulative total records what has happened over the whole elapsed interval. A jump in rate does not itself create an extra amount, and it does not erase the amount already accumulated.

Central principle: Define the rate on each scheduled time interval, then accumulate each regime’s contribution over only the time spent in that regime. At a regime boundary, carry forward the existing cumulative total.

Piecewise Rates and Regime Boundaries

Let the scheduled change times be \(t_0<t_1<\cdots<t_n\). These times divide the operating period into regimes. A rate function \(r(t)\) is piecewise-defined when it has a specified formula on each regime, such as a constant rate on one interval and a different formula on the next.

Definition: For a finite schedule \(t_0<t_1<\cdots<t_n\), a piecewise rate assigns a rate formula \(r_i(t)\) to each interval \([t_i,t_{i+1})\). The last interval may continue beyond \(t_n\). The half-open intervals assign each switch time to exactly one regime; using the other adjacent convention at an endpoint does not change a cumulative integral.

The rate’s units must be amount per unit time. For example, if \(r(t)\) is measured in items per minute, integrating it over a time interval gives an amount measured in items. The rate can jump at a scheduled time, so its left-hand and right-hand values need not agree there.

Let \(C(t)\) denote the cumulative amount at time \(t\), with initial amount \(C(t_0)=C_0\). If \(r\) is integrable on the time interval, then the model is

$$ C(t)=C_0+\int_{t_0}^{t}r(s)\,ds. $$

The integration variable \(s\) is a dummy variable: it ranges over elapsed time, while \(t\) is the endpoint at which the total is being evaluated. When the rate is piecewise-defined, split the integral at every scheduled boundary between \(t_0\) and \(t\).

The Accumulation Formula Across Regimes

Suppose the observation time \(t\) falls in regime \(j\), so \(t_j\le t<t_{j+1}\). If the rate on regime \(i\) is \(r_i\), then the cumulative total is

$$ C(t) = C_0 +\sum_{i=0}^{j-1}\int_{t_i}^{t_{i+1}}r_i(s)\,ds +\int_{t_j}^{t}r_j(s)\,ds. $$

Each complete regime contributes its full integral. The current regime contributes only from its start time up to the observation time. If \(t\) is exactly a scheduled boundary, the contribution from the next regime is zero so far.

Boundary rule: At a switch time \(t_k\), the cumulative value is the initial amount plus the contributions from completed regimes only: $$ C(t_k)=C_0+\sum_{i=0}^{k-1}\int_{t_i}^{t_{i+1}}r_i(s)\,ds. $$ The rate may change at \(t_k\), but the cumulative value is carried through the switch.

Why the Contributions Add

The formula follows from additivity of the definite integral. If \(a<b<c\) and the rate is integrable, then

$$ \int_a^c r(s)\,ds = \int_a^b r(s)\,ds+\int_b^c r(s)\,ds. $$

Applying this identity at each scheduled change time splits the total accumulation into nonoverlapping pieces. On each piece, use the formula assigned to that regime. No elapsed time is omitted, and no interval is counted twice.

1
Locate the observation time.
Identify every scheduled boundary between the initial time and the time at which the cumulative total is requested.
2
Accumulate complete regimes.
Integrate each regime’s rate from its start to its scheduled end.
3
Accumulate the partial regime.
Integrate the current regime’s rate only up to the observation time.
4
Add the baseline.
Add \(C_0\) once, then check the units and boundary accounting.

This derivation also explains why the cumulative quantity does not jump just because the rate does. Over an interval whose length tends to zero, the accumulated contribution tends to zero when the rate remains bounded near the switch. The rate can have different values on the two sides, but the integral still joins the contributions on either side at the same cumulative value.

Worked Example: Constant Rates on Three Regimes

Worked Example: Constant Rates on Three Regimes

A counter starts at \(C(0)=10\) items. Its rate is \(4\) items per minute from time \(0\) to \(3\) minutes, \(7\) items per minute from \(3\) to \(5\) minutes, and \(2\) items per minute from \(5\) to \(8\) minutes. Find the cumulative total at \(t=8\) minutes.

Write the piecewise rate as

$$ r(t)= \begin{cases} 4, & 0\le t<3,\\ 7, & 3\le t<5,\\ 2, & 5\le t\le 8. \end{cases} $$

The first regime lasts \(3-0=3\) minutes, so its contribution is \(4(3)=12\) items. The second lasts \(5-3=2\) minutes, contributing \(7(2)=14\) items. The third lasts \(8-5=3\) minutes, contributing \(2(3)=6\) items. Therefore,

$$ C(8)=10+12+14+6=42\text{ items}. $$

Check: The three elapsed durations add to \(3+2+3=8\) minutes, and the accumulated amount above the baseline is \(12+14+6=32\) items. Adding the starting \(10\) items gives \(42\) items. The units also check: items per minute multiplied by minutes gives items.

Worked Example: A Time-Varying Rate Within Each Regime

Worked Example: A Time-Varying Rate Within Each Regime

A cumulative quantity starts at \(C(0)=3\) units. Its rate, in units per hour, is \(r(t)=2+t\) for \(0\le t<2\), then \(r(t)=8-t\) for \(2\le t\le4\). Find \(C(4)\).

Integrate the first regime over its full interval:

$$ \int_0^2(2+s)\,ds = \left[2s+\frac{s^2}{2}\right]_0^2 = \left(4+2\right)-0 = 6\text{ units}. $$

Then integrate the second regime from \(2\) to \(4\):

$$ \int_2^4(8-s)\,ds = \left[8s-\frac{s^2}{2}\right]_2^4 = \left(32-8\right)-\left(16-2\right) = 24-14 = 10\text{ units}. $$

Add both contributions to the initial value:

$$ C(4)=3+6+10=19\text{ units}. $$

Check: The antiderivatives differentiate back correctly: \(\frac{d}{ds}(2s+s^2/2)=2+s\), and \(\frac{d}{ds}(8s-s^2/2)=8-s\). The first regime contributes \(6\) units, the second \(10\), and the initial amount is \(3\), giving \(19\) units in total.

Worked Example: Evaluating Exactly at a Switch

Worked Example: Evaluating Exactly at a Switch

A signed rate is \(5\) units per hour from \(t=0\) to \(t=2\), \(-3\) units per hour from \(t=2\) to \(t=5\), and \(2\) units per hour from \(t=5\) to \(t=7\). The initial cumulative value is \(C(0)=20\) units. Find the value at the switch time \(t=5\).

By time \(5\), the first regime has lasted \(2\) hours and the second has lasted \(5-2=3\) hours. The third regime has just begun, so its elapsed duration is zero. Thus

$$ C(5) = 20+(5)(2)+(-3)(3)+ (2)(0) = 20+10-9+0 = 21\text{ units}. $$

Check: From time \(0\) to \(2\), the total increases from \(20\) to \(20+10=30\). From time \(2\) to \(5\), it changes by \(-9\), reaching \(30-9=21\). The rate after time \(5\) has not yet contributed. Its value at the single endpoint cannot add an amount without elapsed time.

A Common Boundary Error

A frequent mistake is to include a full contribution from the regime that begins at the observation time. For example, in the first example, the total at \(t=3\) minutes is not \(10+4(3)+7(2)\). That incorrect calculation includes two minutes of the second regime even though the observation is at its start.

$$ \text{Incorrect: }10+4(3)+7(2)=36, \qquad \text{correct: }C(3)=10+4(3)=22. $$

The correction is to measure each contribution from its own regime interval. At \(t=3\), the first interval is complete and the second interval has length \(3-3=0\). The value \(C(3)=22\) is then carried forward as the starting cumulative value for the next regime. Do not restart the cumulative total at the boundary.

Takeaway: A scheduled change determines which rate formula applies next; it does not reset the clock for accumulation or create an instantaneous extra amount. Use the time spent in each regime, including zero time for a regime that has just begun.

Check Your Understanding

For each question, identify the regime intervals carefully before calculating.

  1. A quantity starts at \(6\) units and increases at \(3\) units per minute for \(2\) minutes, then \(5\) units per minute for \(4\) minutes. What is its cumulative value at the end?
  2. If a rate changes at time \(t=4\), which regimes contribute to the cumulative total at exactly \(t=4\)?
  3. A rate is \(r(t)=t\) on \(0\le t<2\) and \(r(t)=4\) on \(2\le t\le3\). With initial value \(C(0)=0\), find \(C(3)\).
  4. Explain why changing the value assigned to the rate at one isolated switch time does not change the cumulative integral.
  5. In a signed-rate model, what does a negative contribution do to the cumulative value?

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