Differential Equations Systems
Equations that say how things change become flows: follow the arrows and you get trajectories, equilibria, and the long-run fate of the system.
Why Does This Exist?
Machine learning trains by flows, samples by flows, and models time with flows. Gradient descent is a discretised flow down the loss. Diffusion models reverse a stochastic flow to generate images. Neural ODEs integrate a learned flow to handle irregular time series. Each case asks the same dynamical questions: where does motion stop, which stops attract, how fast, and what does discretisation break.
Differential equations write the local rule; dynamical systems study the global fate: equilibria, stability, cycles, and bifurcations. This page maps that territory. The single-variable rule family gets its own page in ODEs; how to step these rules on a computer is in numerical ODE solvers; whether equilibria attract or repel is in stability analysis.
The one idea you need first
assigns every state an arrow , where means the rate of change of with time and is the rule giving that rate at state . A trajectory follows the arrows: it moves where the field points, fast where arrows are long. Fixed points sit where ; everything else is transit.
Think of It Like This
A landscape of streams after rain
Rain on hills runs downhill everywhere at once: each puddle's path follows the local slope, rivulets merge in valleys, and lakes sit where no slope remains. The slope rule is the differential equation; the full pattern of streams and lakes is the dynamical system.
A lake that pulls nearby water in is a stable equilibrium; a ridge crest shedding water both ways is unstable; a mountain pass is a saddle. Changing the landscape slowly can create or destroy lakes (bifurcation), and stepping downhill in big jumps can overshoot the lake entirely (what bad solvers do).
Where the analogy stops: real state spaces have many dimensions with cycles and chaos that no hillside shows, and stochastic systems add diffusion to the drift.
How It Actually Works
Rules. ODEs evolve finite states ( variables, arrows). PDEs evolve fields (temperature at every point). Stochastic differential equations add noise to the drift. Delay equations and discrete maps change the clock itself.
Fates. Fixed points (), limit cycles (isolated closed orbits), attractors (sets that pull neighbours in), basins (which starts drain where), bifurcations (qualitative change as a parameter moves). Chaos is bounded aperiodic motion with sensitive dependence: same rules, unpredictable addresses.
Analyses. Linearise at equilibria and read Jacobian eigenvalues (stability); draw portraits and nullclines (geometry); integrate numerically with step control (simulation); study conservation and Lyapunov functions (certificates that a fate really holds).
Worked example
Decay from . Separate and integrate: . At :
At : .
The fixed point is (where ), and linearisation gives , so it is stable: every start drains to it, fast early (arrow at ) and slow near (arrow at ). Each unit of time removes nine-tenths of the remaining distance — the signature of linear stability.
Code
Euler stepping on the worked example, against the analytic answer. Ten steps of multiply by each time, so against the true : even a stable equation with a reasonable step carries visible error, which is why step control matters.
import math
analytic = 3 * math.exp(-2 * 1) # decay solution at t = 1print(round(analytic, 3)) # -> 0.406
x, dt = 3.0, 0.1for _ in range(10): x += dt * (-2 * x) # Euler step on dx/dt = -2xprint(round(x, 3)) # -> 0.322 undershoots the true 0.406Watch Out For
Assuming solutions exist, stay unique, and follow the picture
With rough (square roots, absolute values, switches), trajectories can branch, merge, or refuse to start: uniqueness needs Lipschitz continuity, and existence needs tamer growth than textbooks admit. Switching controllers in ML live exactly in this rough regime.
Symptom: solvers disagree qualitatively (one sticks at zero, another leaves), or adaptive steppers shrink to zero near a kink. Fix: check Lipschitz continuity at equilibria and switches, smooth or regularise the kink, and distrust any portrait drawn through a non-Lipschitz point.
Confusing the flow with its discretisation
The ODE can be stable while Euler with a big step oscillates or explodes: stability regions belong to the method, not the equation. Stiff systems (fast and slow modes together) punish explicit steppers hardest.
Symptom: shrinking the step flips the answer from blow-up to calm, or implicit methods succeed where explicit ones die at any step. Fix: match the solver to stiffness (implicit or exponential integrators), respect step bounds from the fastest mode, and test refinement before believing any simulated fate.
The Quick Version
- Differential equations write local arrows; dynamical systems study where following them leads.
- Fates include fixed points, cycles, attractors, basins, bifurcations, and chaos.
- Decay from 3 under reaches 0.41 at and 0.055 at , toward the stable point 0.
- Euler with step 0.1 reaches only 0.322 at : discretisation error is real even when stable.
- Existence and uniqueness need Lipschitz rules; switches break naive pictures.
- Discretisation has its own stability: match the solver to stiffness and refine.