Systems of ODEs & State Space
Coupled equations describe interacting parts: two-tank systems, predator–prey, multi-mass vibrations, electrical networks. Learn elimination, matrix form x′ = Ax, eigenvalue solutions, converting higher-order ODEs to first-order systems, state-space models and stability from eigenvalues.
Real systems rarely have one variable. Writing them as x′ = Ax + Bu organises the equations, enables matrix methods and numerical solvers, and is the standard form in modern control engineering.
An analogy
A system of ODEs is like several dancers holding hands: each one's movement depends on the others. Eigenvectors are the special moves where they all move together in step.
Elimination
Differentiate one equation and substitute to get a single higher-order equation — fine for 2×2 systems but messy beyond.
Matrix method
Find eigenvalues of A; each gives a mode e^(λt) along its eigenvector. Complex eigenvalues produce oscillating modes; real negative ones decay.
State space
Any n-th order linear ODE becomes n first-order equations. Outputs y = Cx + Du. This form feeds directly into simulation (ode45, solve_ivp) and control design.
Non-linear systems
Linearise around equilibria (Jacobian matrix) and inspect eigenvalues for local stability; phase-plane analysis shows global behaviour (M24).
Formulas
- Matrix form:
x′ = Ax (+ Bu) - Eigen-solution:
x = c₁e^(λ₁t)v₁ + c₂e^(λ₂t)v₂ - Order reduction:
y″ + a y′ + b y = u → x₁ = y, x₂ = y′: x₁′ = x₂, x₂′ = −b x₁ − a x₂ + u - Stability:
Stable ⇔ all Re(λ) < 0
Worked example: Eigenvalue solution
Given: x′ = 3x + 4y, y′ = 4x − 3y
Find: Eigenvalues and stability.
- det(A − λI) = λ² − 25 = 0 → λ = ±5
- λ = 5 > 0
Answer: Unstable saddle (one growing mode e^(5t))
Worked example: State-space form
Given: 2x″ + 8x′ + 50x = F(t)
Find: A, B.
- x₁ = x, x₂ = x′
- x₂′ = −25x₁ − 4x₂ + F/2
Answer: A = [[0, 1], [−25, −4]], B = [0, 0.5]ᵀ
Common mistakes
- Wrong: Judging stability from one equation. — Right: Use eigenvalues of the full matrix.
- Wrong: Forgetting B scaling by mass. — Right: Divide the forcing by the leading coefficient.
Applications
- Control systems: State-space design and observers.
- Multi-DOF vibration: Mode shapes and frequencies.
- Chemical processes: Coupled reactors and tanks.
Key takeaways
- Write coupled ODEs as x′ = Ax + Bu.
- Eigenvalues give modes and stability.
- Any n-th-order ODE → n first-order states.
- Re(λ) < 0 for stability.
Going further
- Matrix exponential: x(t) = e^(At)x(0).
- Controllability & observability: Kalman rank tests (M13).
- Stiff systems: Widely separated eigenvalues need implicit solvers.