Nonlinear Dynamics, Stability & Chaos

Dynamical systems theory studies how states evolve. Learn state space and phase portraits, equilibria and linearisation with the Jacobian, classification of fixed points (nodes, saddles, spirals, centres), Lyapunov stability, limit cycles, bifurcations, and chaos with sensitive dependence — using pendulums, oscillators and the logistic map.

Linear systems are predictable: double the input, double the output. Real systems — pendulums swinging high, power grids, flutter, chemical reactors, populations — are nonlinear, and can jump between states, oscillate on their own or behave chaotically.

Instead of hunting for formulas, dynamical systems theory asks qualitative questions: Where are the equilibria? Are they stable? What happens as a parameter changes? This geometric view is essential for safe design.

An analogy

Think of a ball rolling on a landscape: valleys are stable equilibria, hilltops unstable, mountain passes saddles. Changing a parameter reshapes the landscape — valleys can merge or vanish (bifurcations).

State space and equilibria

Write any ODE system as first-order ẋ = f(x). A pendulum θ̈ + (g/L)sin θ = 0 becomes x₁ = θ, x₂ = θ̇. Equilibria are points where everything stops: hanging down (θ = 0) and balanced upright (θ = π).

Linearise and classify

Near an equilibrium, f(x) ≈ J(x* )δx. The eigenvalues of J decide: both negative → stable node; complex with negative real part → stable spiral (damped oscillation); opposite signs → saddle; purely imaginary → centre (linearisation inconclusive). The upright pendulum has λ = ±√(g/L): a saddle, hence unstable.

Limit cycles and bifurcations

Nonlinear systems can oscillate at a fixed amplitude regardless of initial conditions — a limit cycle (Van der Pol oscillator, heart rhythm, machine-tool chatter). As a parameter varies, equilibria can appear/disappear (saddle-node), exchange stability (transcritical), split (pitchfork — e.g. buckling), or give birth to oscillations (Hopf — e.g. aircraft flutter).

Chaos

Chaos is bounded, aperiodic behaviour with sensitive dependence on initial conditions (positive Lyapunov exponent). It needs at least three dimensions for continuous flows (Lorenz system) or one for maps (logistic map). Chaotic systems are still deterministic and can be controlled by small, well-timed inputs (OGY control).

Formulas

Worked example: Damped oscillator classification

Given: ẋ = y, ẏ = −x − 0.5y

Find: Type of equilibrium.

Answer: Stable spiral

Worked example: Inverted pendulum

Given: θ̈ = (g/L) sin θ − … about θ = π

Find: Stability.

Answer: Saddle → unstable (needs active control)

Worked example: Logistic fixed point

Given: r = 2.8

Find: x* and stability.

Answer: Stable fixed point (oscillating approach)

Logistic map: from equilibrium to chaos

import numpy as np

# Logistic map x_{k+1} = r x_k (1 - x_k): long-term behaviour vs r
for r in (2.8, 3.2, 3.5, 3.9):
    x = 0.2
    for _ in range(1000):                  # discard transient
        x = r * x * (1 - x)
    orbit = set()
    for _ in range(64):
        x = r * x * (1 - x)
        orbit.add(round(x, 4))
    kind = f"period {len(orbit)}" if len(orbit) <= 8 else "chaotic"
    print(f"r = {r}: {kind:9s} e.g. {sorted(orbit)[:4]}")

# Sensitive dependence: two starts 1e-10 apart at r = 3.9
a, b = 0.2, 0.2 + 1e-10
for k in range(60):
    a, b = 3.9 * a * (1 - a), 3.9 * b * (1 - b)
    if abs(a - b) > 0.1:
        print(f"trajectories diverge (> 0.1) after {k + 1} iterations")
        break
# r = 2.8: period 1  e.g. [0.6429]
# r = 3.2: period 2  e.g. [0.513, 0.7995]
# r = 3.5: period 4  e.g. [0.3828, 0.5009, 0.8269, 0.875]
# r = 3.9: chaotic   e.g. [0.1013, 0.1023, 0.1069, 0.1072]
# trajectories diverge (> 0.1) after 37 iterations

A one-line deterministic rule produces period doubling and then chaos. A 10⁻¹⁰ difference grows to order one in 37 steps — why long-range weather prediction is fundamentally limited.

Common mistakes

Applications

Key takeaways

Going further