1. Classic lynx-and-hare cycle
Ecology instructorBackground
A lecture needs a textbook closed orbit with a clear equilibrium and a period near the linearized estimate.
Problem
Show coexistence at (40, 50), quarter-cycle lag, and a readable cycle without writing custom RK4 code.
How to use
Set r = 0.5, a = 0.01, b = 0.01, m = 0.4, N₀ = 60, P₀ = 30, and tMax = 60.
rPrey=0.5, aPred=0.01, bConv=0.01, mPred=0.4, n0=60, p0=30, tMax=60Outcome
Equilibrium at (40, 50), measured period near 15 (linearized ≈ 14.05), prey 18.5–73.9 and predators 25.3–87.0 on a closed orbit with Hamiltonian drift at ~1e-12.