Differential Equations › Section E · Systems of differential equations › Topic E.10
Modeling with systems
When two quantities affect each other, such as salt in connected tanks, predators and their prey, or masses joined by springs, one equation is not enough. This topic shows how to turn each situation into a system, which assumptions the model rests on, and what its eigenvalues say.
Why one equation is not enough
In the topic Modeling with first order equations, a single unknown, such as the salt in one tank, changed at a rate that depended only on itself. Many real situations couple two or more unknowns: the salt in one tank depends on what flows in from a second, and the second depends on the first. Each unknown gets its own equation, and the equations share variables. The modelling work has three steps: name the unknowns and their units, write a rate equation for each from the physics or biology, and list the assumptions that make those equations valid. Solving then uses the tools of this section, or, for nonlinear systems, the qualitative tools that follow it.
Connected tanks: assumptions and equations
Let \(Q_1(t)\) and \(Q_2(t)\) be the grams of salt in two tanks connected by pipes. The model assumes: 1. Each tank's inflow equals its outflow, so each volume stays constant. 2. Each tank is perfectly mixed, so its concentration is the same everywhere. 3. Liquid leaving a tank carries that tank's concentration. Under these assumptions each equation reads
where every rate is a flow rate times a concentration, and the concentration in tank \(k\) is \(Q_k\) divided by its volume. Without assumption 1 the volumes change with time and the coefficients stop being constant; without assumption 2 the model needs partial differential equations.
Worked example: two tanks
Tank 1 holds 200 L and tank 2 holds 100 L. Brine at 2 g/L enters tank 1 at 6 L/min, tank 1 pumps 8 L/min into tank 2, tank 2 pumps 2 L/min back, and 6 L/min drains from tank 2. 1. Check volumes: tank 1 gains \(6 + 2 = 8\) and loses 8; tank 2 gains 8 and loses \(2 + 6 = 8\). 2. Tank 1:
3. Tank 2:
4. Equilibrium: the second equation gives \(Q_1 = 2Q_2\), then the first gives \(Q_2 = 200\) g and \(Q_1 = 400\) g. 5. Check: both tanks end at 2 g/L, the concentration of the incoming brine, as they should.
Reading the eigenvalues
The coefficient matrix of the tank system has rows \((-0.04, 0.02)\) and \((0.04, -0.08)\). Its trace is \(-0.12\) and its determinant is \(0.0024\), so the eigenvalues are
Both are negative, so every solution approaches the equilibrium. The slow eigenvalue, the one closer to zero, controls how long that takes: its term shrinks like \(e^{-0.0254t}\), which falls to 5% when \(t = \frac{\ln 20}{0.0254} \approx 118\) minutes. The fast mode has faded long before then. Estimating a settling time from the fast eigenvalue would suggest about 32 minutes, far too optimistic.
Predator and prey
Let \(x(t)\) be the prey population and \(y(t)\) the predator population. Assume: 1. Without predators, prey grow at a rate proportional to their number. 2. Without prey, predators die off at a rate proportional to their number. 3. Encounters happen at a rate proportional to the product \(xy\). 4. Each encounter lowers the prey and raises the predators. Then, with positive constants \(a, b, c, d\),
This is the Lotka-Volterra model. The \(xy\) terms make it nonlinear, so the eigenvalue methods of this section do not solve it. The topic Applications of nonlinear dynamics studies its behaviour.
Masses joined by springs
Two masses \(m_1\) and \(m_2\) sit in a line between two walls, joined wall to mass to mass to wall by springs with constants \(k_1, k_2, k_3\). Assume the surface is frictionless, the springs are massless and obey Hooke's law, and \(x_1, x_2\) measure displacements from the rest positions, positive to the right. The middle spring is stretched by \(x_2 - x_1\), so it pulls \(m_1\) with force \(k_2(x_2 - x_1)\) and \(m_2\) with the opposite force. Newton's second law gives
where \(F_1, F_2\) are external forces. Checking a case where \(x_2 < x_1\) confirms the signs still hold.
Converting to a first order system
To use the methods of this section, set \(u_1 = x_1\), \(u_2 = x_1'\), \(u_3 = x_2\), \(u_4 = x_2'\). Then \(u_1' = u_2\) and \(u_3' = u_4\), and the spring equations supply \(u_2'\) and \(u_4'\). With no external forces,
Two second order equations become four first order ones. External forces add the vector \((0, F_1/m_1, 0, F_2/m_2)\), making the system nonhomogeneous.
Worked example: normal modes
Take \(m_1 = m_2 = 1\) kg and \(k_1 = k_2 = k_3 = 4\) N/m, with no external force. 1. The equations become \(x_1'' = -8x_1 + 4x_2\) and \(x_2'' = 4x_1 - 8x_2\). 2. Try \(\mathbf{x} = \mathbf{v}\cos\omega t\); then \(-\omega^2\mathbf{v} = K\mathbf{v}\), where \(K\) has rows \((-8, 4)\) and \((4, -8)\). 3. The eigenvalues of \(K\) are \(-4\), with \(\mathbf{v} = (1, 1)\), and \(-12\), with \(\mathbf{v} = (1, -1)\). 4. So \(\omega^2 = 4\) or 12, giving \(\omega = 2\) rad/s for the in-phase mode and \(\omega = 2\sqrt{3} \approx 3.46\) rad/s for the out-of-phase mode. 5. Check: moving together leaves the middle spring unstretched, so the motion is slower; moving oppositely stretches it too, so the motion is faster. Every free motion is a combination of these two normal modes.
Common mistakes to avoid
First, multiplying a flow rate by the amount of salt instead of by the concentration, amount divided by volume. Second, using constant-coefficient equations when a tank's inflow and outflow differ, so its volume is changing. Third, a sign error in the middle spring: the force on \(m_1\) is \(+k_2(x_2 - x_1)\), and the force on \(m_2\) is its negative. Fourth, estimating how long a system takes to settle from the fast eigenvalue; the slow one governs. Fifth, treating the predator-prey model as linear because it looks simple: the \(xy\) terms rule out superposition.
Key takeaways
A system model needs named unknowns, one rate equation for each, and a clear list of assumptions. Connected tanks with constant volumes and perfect mixing give a linear system, often nonhomogeneous because of an inflow; its equilibrium matches the inflow concentration and its slow eigenvalue sets the settling time. Predator-prey interactions give the nonlinear Lotka-Volterra system. Two masses and three springs give two second order equations, which become a four-equation first order system, and their free motion combines in-phase and out-of-phase normal modes.
Flashcards
Flashcard
Q′ = rate in − rate out
Test your understanding
Question 1 of 5
A tank holds a constant 50 L of well-mixed brine containing Q grams of salt, and liquid leaves at 5 L/min. At what rate does salt leave?
Question 2 of 5
A linear tank system has eigenvalues −0.02 and −0.5 per minute. Which eigenvalue mainly sets how long it takes to settle near equilibrium?
Question 3 of 5
Two masses are joined by a middle spring with constant k₂, and x₁, x₂ are displacements to the right. What force does the middle spring exert on m₁?
Question 4 of 5
Two 2 kg masses are joined wall to mass to mass to wall by three springs, each with k = 8 N/m, on a frictionless surface. What are the normal-mode angular frequencies?
Question 5 of 5
In the predator-prey model x′ = ax − bxy, y′ = −cy + dxy, with x the prey, what does the term −bxy describe?
