Examples#
This gallery walks through every public feature of mathematicskit.ode_dynamics:
fixed-point stability classification, phase portraits, the logistic
map’s route to chaos, canonical bifurcation normal forms, the Van der
Pol limit cycle, Poincare sections of the driven Duffing oscillator,
Lyapunov functions and Bendixson’s criterion, population, epidemic,
neuron, and chemical models, Kuramoto synchronization, and the Lorenz and
Rossler attractors.
See also the narrative tutorials:
Each script in this gallery is self-contained and can be run directly with
python examples/ode_dynamics/<section>/<script>.py.
Sections#
stability – Jacobian linearization, the trace-determinant classification of node/saddle/spiral/center fixed points, and quadratic Lyapunov functions.
phase_portrait – linear and nonlinear planar flows, and vector-field quiver plots.
logistic_map – the period-doubling bifurcation cascade and an estimate of the Feigenbaum constant.
bifurcations – saddle-node, pitchfork, and Hopf normal forms.
limit_cycles – the Van der Pol oscillator’s amplitude-independent limit cycle, Bendixson’s negative criterion, and the Brusselator’s Hopf bifurcation.
poincare – stroboscopic Poincare sections of the periodically driven Duffing oscillator.
population – Verhulst’s logistic growth and Lotka-Volterra predator-prey cycles.
epidemics – the Kermack-McKendrick SIR model’s threshold, peak, and final size.
excitable – the FitzHugh-Nagumo neuron’s excitability and spiking.
synchronization – the Kuramoto model’s synchronization transition.
chaotic_flows – the Lorenz attractor and its butterfly effect, and the Rossler attractor and its return map.
integrators – Euler’s method, Runge-Kutta, Stormer-Verlet, Dormand-Prince adaptive stepping, Yoshida’s symplectic composition, and Adams-Bashforth multistep methods.
stiffness – Dahlquist’s A-stability, Curtiss and Hirschfelder’s BDF, Robertson’s stiff kinetics, Radau IIA, and collocation for boundary-value problems.
Bifurcation normal forms#
Saddle-node, pitchfork, and Hopf bifurcations.
Saddle-node, pitchfork, and Hopf bifurcation diagrams
Chaotic flows#
Lorenz’s butterfly attractor and its sensitive dependence on initial conditions, and the Rossler attractor, a minimal three-dimensional chaotic flow.
Epidemic models#
The Kermack-McKendrick SIR model, its threshold, and its final size.
Excitable systems#
The FitzHugh-Nagumo neuron: excitability and periodic spiking.
Numerical integration#
The explicit integrators behind every trajectory in this gallery: Euler’s method, Runge-Kutta, Stormer-Verlet, Dormand-Prince adaptive stepping, Yoshida’s symplectic composition, and the Adams-Bashforth multistep methods and their stability regions.
Stormer-Verlet: bounded energy error over long times
Dormand-Prince: embedded pairs and adaptive step size
Yoshida’s symplectic composition: fourth order from leapfrog
Limit cycles#
The Van der Pol oscillator’s amplitude-independent limit cycle.
The logistic map#
The period-doubling route to chaos and the Feigenbaum constant, and an animated cobweb diagram as \(r\) grows.
Feigenbaum’s universal constant in the period-doubling cascade
Phase portraits#
Linear and nonlinear planar flows and their vector fields.
Poincaré’s qualitative method: the pendulum’s phase portrait
Poincare sections#
Stroboscopic Poincare sections of the periodically driven Duffing oscillator.
Poincare sections of the driven Duffing oscillator
Population models#
Verhulst’s logistic growth and the Lotka-Volterra predator-prey cycles.
Fixed-point stability#
Jacobian linearization and the trace-determinant classification of node/saddle/spiral/center fixed points.
Poincaré’s classification of fixed points: nodes, saddles, spirals, centers
Stiffness and boundary-value problems#
Why explicit integrators stall on stiff systems: Dahlquist’s A-stability, Curtiss and Hirschfelder’s BDF, Robertson’s stiff kinetics, Radau IIA implicit Runge-Kutta, and boundary-value problems by collocation.
Butcher, Ehle and Radau IIA: L-stable implicit Runge-Kutta
De Boor and Swartz: collocation for boundary-value problems
Synchronization#
The Kuramoto model’s transition from incoherence to collective synchrony.