Differential Equations: Systems of ODEs
Differential Equations: Systems of ODEs
Many real systems do not evolve through a single variable. Populations compete, electrical circuits exchange energy between components, chemical species react in networks, and mechanical structures vibrate in coupled modes. These problems naturally lead to systems of ordinary differential equations (ODEs): multiple time-dependent unknowns connected through differential relationships. Learning to solve and interpret these coupled equations is less about memorizing tricks and more about adopting the right language for dynamics: vectors, matrices, eigenvalues, and geometry in phase space.
What is a system of ODEs?
A system of ODEs tracks a vector of unknown functions: \[ \mathbf{x}(t) = \begin{bmatrix} x1(t) \\ x2(t) \\ \vdots \\ x_n(t) \end{bmatrix} \] and relates its derivative to the current state: \[ \mathbf{x}'(t) = \mathbf{f}(t, \mathbf{x}(t)). \]
When depends linearly on , the system is linear. The most important baseline case is the autonomous linear system \[ \mathbf{x}' = A\mathbf{x}, \] where is a constant matrix. Even when a real model is nonlinear, linear systems are central because they describe behavior near equilibrium points and often provide accurate approximations.
Matrix methods for linear systems
The matrix exponential and the general solution
For , the solution can be written compactly using the matrix exponential: \[ \mathbf{x}(t) = e^{At}\mathbf{x}(0). \] This mirrors the scalar solution , but now is a matrix defined by a power series: \[ e^{At} = I + At + \frac{(At)^2}{2!} + \frac{(At)^3}{3!} + \cdots \] In practice, you rarely compute this series directly. Instead, you exploit the structure of using eigenvalues, diagonalization, or related decompositions.
Solving via eigenvalues and eigenvectors
If has a full set of linearly independent eigenvectors, it is diagonalizable: \[ A = PDP^{-1}, \] where is diagonal with eigenvalues . Then \[ e^{At} = Pe^{Dt}P^{-1}, \] and is easy: it places on the diagonal.
Each eigenpair generates a solution of the form \[ \mathbf{x}(t) = e^{\lambda t}\mathbf{v}. \] The general solution is a linear combination of these modes. This is more than algebra: it reveals how the system decomposes into independent “directions” of growth, decay, and oscillation.
When matrices are not diagonalizable
Some matrices lack enough eigenvectors. Then solutions involve generalized eigenvectors and polynomial factors like . The main qualitative takeaway remains: eigenvalues still govern stability and long-term behavior, while the missing eigenvectors affect how trajectories approach or depart from equilibria.
Forced systems and steady-state response
Many models include external inputs: \[ \mathbf{x}' = A\mathbf{x} + \mathbf{g}(t). \] Solutions combine the homogeneous response (from ) and a particular response driven by . For constant inputs , a steady equilibrium satisfies (when is invertible). For sinusoidal forcing, resonance and frequency response appear, closely tied to eigenvalues and natural modes.
Phase portraits: seeing dynamics instead of just computing
A defining advantage of systems is that you can visualize their behavior in phase space. For two-dimensional systems \[ \begin{cases} x' = f(x,y) \\ y' = g(x,y), \end{cases} \] a phase portrait is a collection of trajectories in the plane. Each point is a state, and the vector field indicates where the system flows next.
Phase portraits answer practical questions that closed-form formulas may obscure:
- Do trajectories spiral in, spiral out, or approach along straight directions?
- Are there separatrices that divide qualitatively different behaviors?
- How do solutions depend on initial conditions?
For linear planar systems , phase portraits can be classified almost entirely using eigenvalues of .
Stability and equilibrium behavior
Equilibria and why stability matters
An equilibrium (or critical point) is a state where (for autonomous systems, ). Stability asks what happens after a small perturbation: does the system return, drift away, or do something in between?
In engineering, stability can mean a controlled device returns to its setpoint. In ecology, it can mean populations persist rather than explode or collapse. In mechanics, it can mean vibrations decay rather than amplify.
Linear stability for
For the equilibrium at the origin:
- If all eigenvalues satisfy , trajectories decay to the origin. The equilibrium is asymptotically stable (a sink).
- If any eigenvalue has , trajectories grow away in some direction. The equilibrium is unstable (a source or saddle-like behavior).
- If eigenvalues have , the conclusion depends on finer structure; linear analysis may be inconclusive.
In 2D, common cases include:
- Stable node: two real negative eigenvalues. Trajectories approach without oscillation.
- Unstable node: two real positive eigenvalues. Trajectories diverge.
- Saddle: one positive and one negative real eigenvalue. Some initial conditions approach, most diverge.
- Spiral (focus): complex conjugate eigenvalues . If , it spirals in; if , it spirals out.
- Center: purely imaginary eigenvalues (in ideal linear systems). Trajectories form closed orbits; small perturbations neither decay nor grow.
Nonlinear systems and linearization
For nonlinear systems , eigenvalues still play a central role through linearization. Near an equilibrium , approximate \[ \mathbf{x}' \approx J(\mathbf{x}^)(\mathbf{x}-\mathbf{x}^), \] where is the Jacobian matrix of partial derivatives. The eigenvalues of typically determine local behavior, making matrix methods and phase portraits directly useful beyond purely linear models.
Practical examples of coupled dynamics
Coupled masses and springs
A two-mass spring system produces coupled second-order equations. Converting to first-order form yields a system where eigenvalues reflect natural frequencies and damping rates. Eigenvectors correspond to vibration modes: one mode might move masses together, another in opposition. This modal viewpoint is exactly the eigenvector decomposition.
Interacting populations
In simple competition or predator-prey settings, the state vector might be with and representing species levels. Even when the equations are nonlinear, phase portraits show cycles, equilibria, and thresholds. Linearization near equilibria tells whether coexistence is stable or fragile under perturbations.
Electrical circuits and state-space models
RLC circuits with multiple energy-storing elements lead to systems of ODEs in currents and voltages. Writing them as is standard in control theory. Stability, transient response, and resonance map cleanly onto eigenvalues of and the structure of the input.
How to approach a system of ODEs in practice
- Write the system in vector-matrix form when possible. Even for two equations, clarifies structure.
- Find equilibria (solve ). For linear systems, the origin may be the key equilibrium; with forcing, shift the equilibrium.
- Compute eigenvalues (and eigenvectors if needed). Use them to predict growth/decay and oscillations.
- Sketch or compute a phase portrait in 2D. It often reveals behavior faster than solving explicitly.
- Check stability: for linear systems, use ; for nonlinear systems, use the Jacobian at equilibria.
- Interpret modes physically. Eigenvectors are not just math objects; they describe coordinated patterns in the components of the