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.

Bifurcation normal forms#

Saddle-node, pitchfork, and Hopf bifurcations.

Saddle-node, pitchfork, and Hopf bifurcation diagrams

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.

Lorenz’s butterfly effect: deterministic chaos

Lorenz's butterfly effect: deterministic chaos

The Rossler attractor

The Rossler attractor

Epidemic models#

The Kermack-McKendrick SIR model, its threshold, and its final size.

The Kermack-McKendrick SIR model

The Kermack-McKendrick SIR model

Excitable systems#

The FitzHugh-Nagumo neuron: excitability and periodic spiking.

FitzHugh-Nagumo: excitability and spiking

FitzHugh-Nagumo: excitability and spiking

Limit cycles#

The Van der Pol oscillator’s amplitude-independent limit cycle.

The Van der Pol limit cycle

The Van der Pol limit cycle

Bendixson’s negative criterion

Bendixson's negative criterion

The Brusselator’s Hopf bifurcation

The Brusselator's Hopf bifurcation

The logistic map#

The period-doubling route to chaos and the Feigenbaum constant.

Feigenbaum’s universal constant in the period-doubling cascade

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

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

Poincare sections of the driven Duffing oscillator

Population models#

Verhulst’s logistic growth and the Lotka-Volterra predator-prey cycles.

Verhulst’s logistic growth

Verhulst's logistic growth

Lotka-Volterra predator-prey cycles

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

Poincaré's classification of fixed points: nodes, saddles, spirals, centers

Lyapunov’s direct method

Lyapunov's direct method

Synchronization#

The Kuramoto model’s transition from incoherence to collective synchrony.

The Kuramoto synchronization transition

The Kuramoto synchronization transition

Gallery generated by Sphinx-Gallery