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.
How it works
- 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.
- Follow the white dot in the phase plane: it goes round the same closed loop again and again.
- 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: \(\dd N/\dd t\) = rN - aNP. The predator P grows by bNP from what it eats and dies at the rate mP: \(\dd P/\dd t\) = 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\pi /\sqrt{rm}\); bigger ones take longer and swing more wildly.
Using the app
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.
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.
What happens if the prey breed faster?
On average, the prey do not become more common. Averaged over a full cycle the numbers equal their balance points, N* = \(m/b\) and P* = \(r/a\), so raising Prey growth rate r raises the average number of predators instead. The cycles also get shorter, since small ones last about \(2\pi /\sqrt{rm}\).
What are the assumptions of the Lotka-Volterra model?
Without predators the prey grows without limit; the predators eat nothing else and die out without prey; prey are eaten in proportion to how often the two meet, \(a\times N\times P\); and the rates r, a, b and m never change. Real populations also face crowding, disease and chance, so real cycles are less regular.
掠食者–獵物: how do I record a video?
Press the red Record button in the playback bar: it films what the stage shows. Press it again to stop, and the video is saved to your device.Recording is free; you only need to sign in. Without a subscription the video carries a small PictorX logo in a corner.The button beside Record opens the video options: the shape (as shown, square, story 9:16 or wide 16:9), the length (until you stop, or 5, 10, 15 or 30 seconds for social media) and the file: MP4, WebM or an animated GIF.For the sound, choose the app's own sounds or one of three music tracks: calm, bright or beat.
Ready to try it?
Open PictorX in your browser — no install, no credit card required to start.
前往編輯器