About the Lotka-Volterra Predator-Prey Model

This simulation animates the classic Lotka-Volterra equations, a pair of coupled differential equations describing how prey (rabbits) and predator (foxes) populations rise and fall over time. Prey increase at growth rate r and are consumed in proportion to encounters; predators grow by eating prey and decline by natural death. The trajectory is integrated numerically with a fourth-order Runge-Kutta (RK4) method at a step of 0.02 years.

The sliders set prey growth r, predation rate α, predator conversion efficiency β, predator death rate m, and the initial populations H₀ and P₀. View options switch between population-versus-time curves, the phase portrait with nullclines, or both at once. Such models underpin theoretical ecology, fisheries management and the historical study of fur-trapping records like the lynx-hare cycles.

Frequently Asked Questions

What does this simulation show?

It shows the Lotka-Volterra predator-prey model, where a prey population and a predator population oscillate in repeating cycles. You can watch the populations over time, view the closed orbit in the phase plane, or display both views side by side.

What are the two equations behind the model?

Prey change as dH/dt = r·H − α·H·P, and predators change as dP/dt = β·α·H·P − m·P. Prey grow exponentially but are eaten on contact with predators; predators grow by converting eaten prey into offspring and die at a constant rate.

What do the controls do?

The sliders set prey growth rate r, predation rate α, predator efficiency β, predator death rate m, and the starting numbers of prey and predators. Adjusting any value reshapes the cycle and shifts the equilibrium point shown in the panel.

Where is the equilibrium point?

The non-trivial equilibrium is H* = m/(β·α) for prey and P* = r/α for predators. At these values both populations stop changing. The simulation marks this point in the phase portrait and reports H* and P* in the equilibrium panel.

Why do the populations keep cycling forever?

The equilibrium is a neutral centre rather than an attractor, so trajectories form closed loops that neither grow nor decay. Each starting condition traces its own orbit, and the cycle amplitude depends on how far the initial populations sit from equilibrium. There is no damping in the basic model.

Why do predator peaks lag behind prey peaks?

Prey must become abundant before predators have enough food to multiply, so the predator wave rises after the prey wave. The growing predator numbers then crash the prey, which in turn starves the predators. This quarter-cycle phase lag is the signature shape of the oscillation.

What is the phase portrait and the nullclines?

The phase portrait plots prey on the horizontal axis against predators on the vertical axis, so the cycle appears as a closed loop. The nullclines are the lines where each population is momentarily steady: the prey nullcline is the horizontal line P = r/α and the predator nullcline is the vertical line H = m/(β·α).

How accurate is the model biologically?

It captures the qualitative push and pull between predators and prey but makes strong simplifications. It ignores carrying capacity, spatial movement, age structure, alternative food and random events, and its perfectly repeating cycles are unrealistically fragile. Ecologists treat it as a conceptual baseline rather than a precise forecast.

What numerical method is used and why?

The simulation integrates the equations with a fourth-order Runge-Kutta (RK4) scheme using a time step of 0.02 years. RK4 is far more accurate than a simple Euler step for the same effort, which keeps the closed orbits from artificially drifting inward or outward over the eighty-year run.

How is the cycle period estimated?

The code detects successive peaks in the prey curve and averages the time between them to report the cycle period in years. Near equilibrium the period approaches 2π divided by the square root of r times m, but the displayed value is measured directly from the simulated trajectory.

Where is the Lotka-Volterra model used in the real world?

It appears in ecology and conservation planning, fisheries and pest management, and the classic analysis of the lynx-hare fur records from Hudson Bay. Mathematically similar equations also describe oscillating chemical reactions, economic boom-and-bust cycles and some epidemiological systems.