When the Current Stock Changes Its Own Rate
A stock is an amount that can increase or decrease over time: for example, the volume of water in a tank, the quantity of a stored material, or the number of active users in a system. In a basic stock balance, inflows add to the amount and outflows subtract from it. In many systems, however, a flow itself changes as the stock changes. A larger stock may create more opportunity for removal, or it may alter how strongly replenishment responds.
This is a feedback model: the current amount helps determine its own rate of change. The modeling task is to express that relationship clearly, preserve the direction of each flow, and check that the proposed rate laws make sense over the range where they will be used. The goal here is to construct and interpret these differential models, not to solve them.
Start With a Stock Balance
Let \(S(t)\) denote the amount of a stock at time \(t\). Assume that \(S\) is differentiable on the time interval being modeled. Let \(I(S(t),t)\) be the total inflow rate and \(O(S(t),t)\) the total outflow rate. Both rates are written as nonnegative amounts per unit time; the outflow is subtracted because it removes stock.
The notation makes an important distinction. \(S(t)\) is an amount, while \(\frac{dS}{dt}\) is a rate. A flow law such as \(O(S)=kS\) gives a rate only when the units of \(k\) convert an amount into an amount per time.
Why the Balance Equation Has This Form
The balance equation follows from accounting for the change over a time interval. If the inflow and outflow rates are continuous, the net amount added between times \(t\) and \(t+h\) is the accumulated inflow minus the accumulated outflow. Therefore, for \(h\) small enough to stay in the modeled interval,
Divide by \(h\), then let \(h\) approach zero. By the definition of the derivative and the average-value limit for a continuous integrand, the left side tends to \(S'(t)\), and the right side tends to the instantaneous net flow at time \(t\). Thus
This argument explains why the equation uses the rates at the current stock: the stock during the interval may vary, but in the instantaneous limit the rate is evaluated at its current value \(S(t)\). If there are several inflows or outflows, add all inflow rates and subtract all outflow rates.
Proportional Removal
A common feedback law says that the removal rate is proportional to the amount currently present. If \(k>0\) is the proportionality constant, write
For example, this can describe a fixed fraction of a well-mixed stock being removed per unit time. If \(S\) is measured in liters and time in hours, then \(k\) has units of inverse hours: \((\text{hours})^{-1}\). Multiplying \(k\) by liters gives liters per hour. The parameter \(k\) must be nonnegative for this interpretation as an outflow.
With a constant inflow \(a\), where \(a\geq 0\), the stock balance is
The removal term has a minus sign because it leaves the stock. This model says that the removal rate falls when the stock falls; it does not say that the stock itself falls at a constant rate.
Worked Example: Constant Supply With Proportional Removal
A tank receives water at \(1.5\) liters per hour. Its removal rate is proportional to the current volume, with \(k=0.025\) per hour. Construct the model and calculate the instantaneous net rate when the tank contains \(60\) liters.
Let \(S(t)\) be the volume in liters and \(t\) the time in hours. The inflow is \(I=1.5\) liters per hour. The outflow law is
Its units are \((0.025\ \text{per hour})(S\ \text{liters})\), or liters per hour. Subtracting the outflow from the inflow gives
At \(S=60\) liters, the outflow is \(0.025(60)=1.5\) liters per hour. Hence
Check: the calculated inflow and outflow are both \(1.5\) liters per hour, so their difference is zero, as the model predicts. This is an instantaneous rate calculation; it does not require finding \(S(t)\).
Replenishment That Depends on Stock
Replenishment need not be constant. A rule might specify that the replenishment rate changes in response to the current stock. For instance, a controller may replenish more strongly when a stock is low and less strongly when it is high. Over a specified range, one possible rate law is affine:
where \(a\) is a baseline rate and \(b\) describes how the rate changes with stock. If \(S\) is an amount and time is measured in days, then \(a\) has units of amount per day and \(b\) has units of inverse days. For this to represent a nonnegative replenishment flow, the chosen values and the modeled stock range must satisfy \(a-bS\geq 0\). A formula should not be used beyond the range in which that condition and the modeling assumptions hold.
If a constant withdrawal \(c\geq 0\) also occurs, the balance is \(\frac{dS}{dt}=R(S)-c\). The dependence of \(R\) on \(S\) belongs in the inflow term; it does not change the rule that outflows are subtracted.
Worked Example: Replenishment That Weakens as Stock Rises
A reserve is replenished at \(R(S)=9-0.1S\) kilograms per day and used at a constant rate of \(4\) kilograms per day. The replenishment rule is intended for \(0\leq S\leq 90\) kilograms. Construct the model and find the net rate at \(S=30\) kilograms and \(S=70\) kilograms.
First check the stated range. At its lower endpoint, \(R(0)=9\) kilograms per day. At its upper endpoint, \(R(90)=9-0.1(90)=0\) kilograms per day. Thus the replenishment rate is nonnegative throughout this range. The coefficient \(0.1\) has units of inverse days, so \(0.1S\) has units of kilograms per day.
Subtract the use rate from the replenishment rate:
At \(S=30\) kilograms, replenishment is \(9-0.1(30)=6\) kilograms per day. The net rate is \(6-4=2\) kilograms per day. Substitution into the model gives \(5-0.1(30)=5-3=2\) kilograms per day, confirming the calculation.
At \(S=70\) kilograms, replenishment is \(9-0.1(70)=2\) kilograms per day. The net rate is \(2-4=-2\) kilograms per day. The model gives \(5-0.1(70)=5-7=-2\) kilograms per day, again matching the separate flow calculation. The negative sign means the stock is decreasing at that instant.
Two Stock-Proportional Flows
Sometimes both replenishment and removal depend proportionally on the current stock. A replenishment term proportional to stock can represent a process in which a larger existing stock generates more additions. Whether this interpretation is appropriate depends on the application; a positive proportional term is not automatically a suitable description of every replenishment system.
For a baseline inflow \(a\), stock-proportional replenishment \(gS\), and stock-proportional removal \(kS\), with \(a,g,k\geq 0\), the balance is
Here \(g\) and \(k\) have units of inverse time. Keeping the two flow terms visible before combining them helps make the direction of each process clear. The combined coefficient \(g-k\) indicates the net effect of the two stock-dependent flows, but it does not make either flow disappear from the underlying interpretation.
Worked Example: Proportional Replenishment and Removal
A user population has a baseline addition rate of \(3\) users per day. Referrals add users at \(0.04S\) users per day, while departures remove users at \(0.07S\) users per day. Treating \(S\) as a continuous stock, construct the model and calculate its net rate at \(S=50\) and \(S=100\) users.
The rates are \(I(S)=3+0.04S\) users per day and \(O(S)=0.07S\) users per day. The coefficients \(0.04\) and \(0.07\) have units of inverse days. The balance equation is
At \(S=50\), referrals add \(0.04(50)=2\) users per day, so total additions are \(3+2=5\) users per day. Departures are \(0.07(50)=3.5\) users per day. The net rate is \(5-3.5=1.5\) users per day. Substitution gives \(3-0.03(50)=3-1.5=1.5\) users per day, which checks the result.
At \(S=100\), referrals add \(0.04(100)=4\) users per day, so total additions are \(3+4=7\) users per day. Departures are \(0.07(100)=7\) users per day. The net rate is \(7-7=0\) users per day. Substitution gives \(3-0.03(100)=3-3=0\) users per day. The flows balance at this stock value, so the instantaneous rate of change is zero.
Check the Law Before Using It
A feedback equation is only as useful as its flow assumptions. Before interpreting its predictions, check the meaning and range of each term.
- Check the units. Every term being added or subtracted in the stock-balance equation must be a rate with the same units.
- Keep the direction clear. Inflows add stock; outflows subtract it. Write the separate flows before simplifying.
- Check nonnegativity. A quantity described as a physical replenishment or removal rate should be nonnegative over its intended range.
- State the valid range. A linear feedback law may be a useful approximation only over a particular range of stock values.
- Check the boundary stock. If the stock cannot be negative, ask whether the proposed flows would still make sense near zero. A model whose outflow exceeds all available stock may need a more careful interpretation in that region.
These checks are part of constructing a model, not optional details added after the calculation. A rate law can be dimensionally consistent and still be inappropriate if its assumptions or range do not match the system.
Common Sign Error: Reversing Inflow and Outflow
Suppose replenishment is \(6\) liters per hour and removal is \(4\) liters per hour. The incorrect calculation \(4-6= -2\) liters per hour treats removal minus replenishment as the stock’s rate of change. It predicts a decrease even though more water enters than leaves.
Interpreting the Model Without Solving It
At any specified stock value, the differential equation gives an instantaneous prediction. If its right-hand side is positive, the stock is increasing at that moment; if it is negative, the stock is decreasing; if it is zero, the modeled inflows and outflows balance at that moment. These statements concern the local rate, not the full future trajectory.
For example, in the reserve model, the net rate at \(30\) kilograms is positive and at \(70\) kilograms it is negative. That comparison shows how the proposed feedback law changes the direction of the predicted motion across those stock values. It does not by itself establish what the stock will be at a later time. Determining the time course would require solving or numerically approximating the differential equation, which is a separate task.
The main modeling habit is to begin with the physical balance, represent each flow as a function of the current stock when appropriate, and then test the result with units, signs, and sample values. This keeps the equation connected to the system it is meant to describe.
Check Your Understanding
For each question, identify the flow assumptions before simplifying any equation.
- A stock is measured in kilograms and time in hours. What units must the coefficient \(k\) have in the removal law \(O(S)=kS\)?
- A stock has inflow \(I(S)=8-0.2S\) kilograms per day and constant outflow \(3\) kilograms per day. Write its stock-balance model and state the range in which the inflow is nonnegative.
- For the model in Question 2, calculate the net rate at \(S=10\) kilograms by computing the separate inflow and outflow, then check by substitution into the simplified equation.
- Explain why a zero value of \(\frac{dS}{dt}\) at one stock value means the modeled flows balance at that instant, but does not by itself give the stock at later times.
- Give one reason a stock-dependent replenishment formula should be checked over its intended range rather than assumed valid for every possible stock value.