Two rooms exchange a conserved tracer. Let x and y be the tracer amounts, with transfer from the first room proportional to x and reverse transfer proportional to y. Under constant positive rates a and b, the equations are x′=−ax+by and y′=ax−by.
Before solving, add the equations. The total N=x+y is constant. This simple invariant is a powerful check on both the model derivation and any later numerical implementation.
Predict
If transfer out of the first room is twice as fast as transfer out of the second, should equilibrium put equal amounts in the rooms? Use the equality of opposing fluxes rather than guessing from the conserved total.
Experiment
Take a=2,b=1 and N=12. At equilibrium 2x=y, so x=4 and y=8. Substituting y=12−x gives x′=12−3x.
State x
State y
x′
Direction
0
12
12
Into the first room
4
8
0
Balanced
12
0
−24
Out of the first room
The exact solution is x=4+(x₀−4)e^(−3t), with y=12−x. Verify its initial condition, derivative and total. A fitted decay rate of 3 identifies the sum a+b in this example; identifying each rate separately also requires equilibrium information or another measurement.
Understand
For general positive a,b, the reduced equation is x′=bN−(a+b)x. Its equilibrium is bN/(a+b), and the relaxation rate is a+b. The two parameters influence both the equilibrium partition and the transient speed. Which combinations can be estimated depends on what is observed, not merely on how many parameter symbols appear in the equations.
Nonnegative initial states stay nonnegative. On the boundary x=0 with y nonnegative, x′=by is nonnegative; on y=0, y′=ax is nonnegative. The vector field points inward or tangent, and uniqueness for the linear system prevents an outward crossing. Together with conservation, trajectories stay in the compact segment x+y=N in the nonnegative quadrant.
If an external source enters x or a loss leaves y, the total is no longer constant. Add those terms to the relevant equations and derive the new total balance. Do not enforce a conserved total in code after introducing an open boundary: that would solve a different model.
Compartment models assume that each compartment can be represented by one state, often through mixing or averaging. If internal gradients matter on the observation time scale, additional compartments or a spatial PDE may be needed. Increasing the number of compartments can improve representation but also creates more parameters and possible identifiability problems.
Apply
Construct a two-compartment model for a bounded resource rather than a real clinical intervention. Prove its total balance and positivity, solve one closed-system case, and propose an observation that would challenge the well-mixed assumption. Report state units and rate units separately. Use the exact transient as a reference for any numerical computation.
Continue
A stochastic state model describes probabilities of transitions rather than a deterministic path of amounts. The next lesson makes that distinction explicit and checks the assumptions behind a finite Markov chain.
Apply · explain · revise
Practice and reasoning
Drafts save locally as you type. Reveal worked solutions when useful; the site remembers that exposure. Automatic matches check the requested answer, while written arguments require review against the rubric.
Two compartments have x=8,y=2 with exchange rates a=1/4,b=1/2. For x′=−ax+by, find x′.
Integers, fractions and finite decimals are accepted. Expressions such as sqrt(2) are not parsed by this checker.
For total x+y=12 and equilibrium ax=by with a=1,b=2, find x.
Integers, fractions and finite decimals are accepted. Expressions such as sqrt(2) are not parsed by this checker.
Prove x+y is conserved for x′=−ax+by,y′=ax−by.
Structure your argument and preserve revisions
These optional planning fields save locally. Recording your response saves an immutable copy of the argument and these fields. Older records may contain only first/latest responses; missing intermediate revisions are not reconstructed.
Each field allows 2,000 characters. Keep a specific claim, state where it applies, cite the facts you use, and explain what still needs checking. Blank fields are allowed and are not evidence of mastery.
Explain why nonnegative initial states remain nonnegative for positive exchange rates.
Structure your argument and preserve revisions
These optional planning fields save locally. Recording your response saves an immutable copy of the argument and these fields. Older records may contain only first/latest responses; missing intermediate revisions are not reconstructed.
Each field allows 2,000 characters. Keep a specific claim, state where it applies, cite the facts you use, and explain what still needs checking. Blank fields are allowed and are not evidence of mastery.
Reduce the closed two-compartment model to one scalar equation.
Structure your argument and preserve revisions
These optional planning fields save locally. Recording your response saves an immutable copy of the argument and these fields. Older records may contain only first/latest responses; missing intermediate revisions are not reconstructed.
Each field allows 2,000 characters. Keep a specific claim, state where it applies, cite the facts you use, and explain what still needs checking. Blank fields are allowed and are not evidence of mastery.
Modify the model for measured external inflow and irreversible loss.
Structure your argument and preserve revisions
These optional planning fields save locally. Recording your response saves an immutable copy of the argument and these fields. Older records may contain only first/latest responses; missing intermediate revisions are not reconstructed.
Each field allows 2,000 characters. Keep a specific claim, state where it applies, cite the facts you use, and explain what still needs checking. Blank fields are allowed and are not evidence of mastery.
Reflect and continue
Before marking this lesson complete, explain one key idea without the worked solution and identify a condition that matters. Marking complete records participation, not independent mastery.