mathematics//differential equations//constraint
An equality the variables of a differential equation must satisfy at all times. It either comes out of the equations themselves or is a physical condition the model must respect; it cannot be bolted onto an ODE arbitrarily and expected to hold.
An equality the variables of a differential equation must satisfy at all times. It either comes out of the equations themselves or is a physical condition the model must respect; it cannot be bolted onto an ODE arbitrarily and expected to hold.
In an SIR model the population is fixed, so susceptible plus infected plus recovered equals N. People move between the three groups (well to sick, sick to recovered, recovered to sick again) but the total never changes: R = N minus S minus I.
Three variables tied by one equality restrict the three-dimensional state space to a plane; with non-negativity of each group it is a triangle in the positive octant. Every constraint typically removes one dimension from what the number of variables suggests: three variables, one constraint, a two-dimensional state.
Tangency is the test. If g(x)=0g(x)=0g(x)=0 is to hold along every trajectory, its time derivative must vanish, so the velocity has to be tangent to the constraint surface: ∇g(x)⋅f(x)=0\nabla g(x)\cdot f(x)=0∇g(x)⋅f(x)=0 wherever g(x)=0g(x)=0g(x)=0. In SIR, S˙+I˙+R˙=0\dot S+\dot I+\dot R=0S˙+I˙+R˙=0 because every term that leaves one equation enters another; the constraint is an invariant of the field.
Two legitimate origins. Either the constraint is an invariant of the field, as above, or it is a physical condition imposed on the model, such as conservation of mass or volume (the conserved total of a closed network), non-negativity of a concentration, or a rigid link between coordinates. In the second case the equations have to be written so that the field is tangent to it; if they are not, the constraint is violated the moment the system moves and the model is inconsistent.
Consequences: a constraint lets you eliminate a variable (write R=N−S−IR=N-S-IR=N−S−I and integrate two equations instead of three), it shrinks the space a phase portrait has to show, and in a numerical scheme it drifts unless the integrator preserves it (discretization).