1.00
0.100
0.020
0.50
40
5
1.5×

More information about Predator–Prey

Predator–Prey

When prey is plentiful, predators thrive; when predators thrive, prey runs short; when prey runs short, predators starve and the prey recovers. The Lotka-Volterra equations turn this endless cycle into two lines of maths. Watch the hares (blue) and the lynx (orange) chase each other through time and round a closed loop. Press Play and watch the hares (blue) and the lynx (orange) rise and fall. The predator peaks always come just after the prey peaks, and the phase plane traces a closed loop. Change the rates r, a, b and m, or pick a preset such as Lynx & snowshoe hare. Turn on Information to see the equations and the current values.

How it works

  1. Press Play. The hares (blue) and the lynx (orange) rise and fall in waves, and the predator peak always comes a little after the prey peak.
  2. Follow the white dot in the phase plane: it goes round the same closed loop again and again.
  3. Pick a preset such as Lynx & snowshoe hare, or change r, a, b, m and the starting numbers, and see how the cycle changes.

The cycle in five steps

Plenty of prey means plenty of food, so more predators survive and their numbers grow. More predators eat more prey than are born, so the prey collapses. With too little food the predators starve and decline. With fewer predators the prey recovers, and the cycle starts again.

The Lotka-Volterra equations

The prey N grows by rN and is eaten at the rate aNP: dN/dt = rN - aNP. The predator P grows by bNP from what it eats and dies at the rate mP: dP/dt = bNP - mP. The app solves both equations step by step with the fourth-order Runge-Kutta method.

Why the orbit is closed

The populations balance at N* = m/b and P* = r/a. Away from that point they circle round it on a closed loop in the phase plane, so the same cycle repeats for ever. Small cycles last about 2π/√(rm); bigger ones take longer and swing more wildly.

Frequently asked questions

Why does the predator peak come after the prey peak?

Predators need food before they can breed. Their numbers keep rising as long as there is plenty of prey, so they peak only after the prey has begun to fall.

Is the lynx and hare cycle real?

Yes. Fur records of the Hudson's Bay Company show that Canada lynx and snowshoe hare numbers rose and fell in cycles of about ten years for more than a century.

Can one of the populations die out?

In the exact equations, no: the numbers can get very small but never reach zero. Real populations are made of whole animals, so a deep crash like the one in Boom and bust could wipe them out.

Does this upload anything?

No. Everything is calculated and drawn on a canvas in your browser. Save downloads a PNG. Edit opens that image in the PictorX editor.

Ready to try it?

Open PictorX in your browser — no install, no credit card required to start.

Go to Editor