Foxes and rabbits

Tap anywhere on the right-hand picture to choose how many rabbits and foxes you start with, then slide the four rates. The left graph shows both populations against time; the right one plots foxes against rabbits, so time disappears and the whole future is one loop. Try starting right on the grey cross, then just beside it, then far from it. Notice that the loop never spirals in or out, and that the time-averages printed below always land on the cross, wherever you start.

Populations against time

rabbits Rfoxes F

Phase plane: foxes against rabbits (tap to start)

orbitstartnullclines and equilibrium

What's going on

Rabbits R breed at rate a and are eaten at a rate proportional to how often a rabbit meets a fox, bRF. Foxes F die at rate c and breed in proportion to the rabbits they catch, dRF. That gives the Lotka–Volterra equations dR/dt = aR − bRF and dF/dt = −cF + dRF. There is no formula for R(t) and F(t); the demo steps the equations forward numerically (a fourth-order Runge–Kutta scheme, step 0.005) and draws what comes out.

Both derivatives vanish at the equilibrium R* = c/d, F* = a/b, the grey cross. Everywhere else the populations move: lots of rabbits feed a fox boom, the boom eats the rabbits down, the foxes then starve, and the rabbits recover. In the phase plane that is a loop running anticlockwise, and the fox peak lags the rabbit peak by about a quarter of a cycle.

Why a closed loop rather than a spiral? Divide the two equations and separate variables, and you find that V = dR − c ln R + bF − a ln F never changes along a solution. Each loop is a level curve of V, like a contour line on a map. The readout checks how well the numerics keep V constant. Two more facts to test: near the cross the period is close to 2π/√(ac), and the time-average of R over a cycle is exactly c/d, the same for every loop. Cull foxes (raise c) and the average fox population a/b does not change at all. It is the average rabbit population c/d that goes up.

Sheet: Foxes and rabbits. Cousins: an epidemic in a box, another pair of coupled rates, and the logistic map, where one population alone can go chaotic.