Omni Calculator logo

The Lotka-Volterra calculator enables you to understand and simulate the dynamics of populations in a generic biologic system. But there's much more to it! Keep reading to learn:

  • What the Lotka-Volterra equations are and the predator-prey model;
  • The differential equations defining the dynamics of a predator and prey population;
  • Real-life examples of the Lotka-Volterra predator-prey model;
  • How to use our Lotka-Volterra model calculator;
  • And much more!

What are the Lotka-Volterra equations? Population dynamics

The Lotka-Volterra equations in the competitive case are a system of two differential equations that describe the dynamics of a biological system where a predator species coexist with a prey population. The system models the oscillation of the populations in time.

🙋 The Lotka-Volterra equations take the name of the two scientists, Alfred Lotka and Vito Volterra, who independently developed the equations to describe phenomena of their interest between 1925 and 1926.

Observations of real-life systems confirmed the existence of a correlation between the sizes of populations of predators and prey. They are highly dependent on each other, making this model one of the first development of mathematical biology. We find evidence of the correctness of the Lotka-Volterra model everywhere: from rabbit populations to the constant fight of bacteria and the viruses bacteriophages (you can discover how quickly bacteria multiply by visiting the generation time calculator), but also in economy, and other sciences.

To introduce the model, we need to explain the assumptions used in its definition:

  • The prey population has access to unlimited food supplies;
  • The food supply of the predator population consists only of the prey population;
  • Bigger populations grow faster than small populations (the rate of change of a population depends on its size);
  • Environmental and genetic effects are excluded or assumed to be negligible; and
  • Predators won't stop feeding on the prey population.

Once the assumptions are clear, we can introduce the elements of the model:

  • The prey population, with a number of individuals xx; and
  • The predator population, with a number of individuals yy.

Here are the equations of the Lotka-Volterra model for a predator-prey competition:

dxdt=αxβxydydt=δxyγy\begin{split} \frac{\mathrm{d}x}{\rm{d}t}& = \alpha x - \beta x y\\[1em] \frac{\mathrm{d}y}{\rm{d}t}&=\delta x y -\gamma y \end{split}

Let's take a deeper look at these equations. The first thing we notice is that on the left-hand side, the populations appear differentiated in time. As these equations are differential equations, we are studying the evolution of the population in time. While technically, we can find the instantaneous value of these quantities (it would correspond to the variation of a given population for a set of parameters), we are more interested in calculating the Lotka-Volterra model as it evolves with time.

On the right-hand side, we see the populations in their familiar form: instantaneous number of individuals; here we can also identify four characteristic quantities of the Lotka-Volterra model) and their interactions with the populations:

  • αx\alpha x — This term represents the exponential growth of a population under an unlimited supply of resources. We discussed a similar quantity in our exponential growth calculator.

  • βxy\beta x y — This factor models the rate of predation. Its magnitude depends on the size of both the prey and the predator population. Notice how we add a negative sign.

  • δxy\delta x y — In the case of the variation of the predator population, we model a growth that depends on the size of both the prey and the predator population. As the food supply is limited, we must consider this (when the prey population dwindles, the predator one also follows suit).

  • γy\gamma y — The reduction of the size of the predator population depends on this term. Here we assume that the predator population is subject to a decrease due to natural death or other causes. Notice how this factor properly models the natural behavior of predators' populations, and it doesn't apply to the prey one.

We can assign names to the parameters of the equations:

  • α\alpha — The natural reproduction rate of the prey in absence of predation. If you want to know something about a realistic model for this parameter, visit our carrying capacity calculator.

  • β\beta — The death rate per encounter between predator and prey (how many hunts are successful).

  • γ\gamma — The natural death rate of the predator population in absence of resources.

  • δ\delta — The resource conversion rate in new individuals (how many new predators can find sustainment at each encounter).

🙋 Do you know you can simulate more than predators and prey with the Lotka-Volterra model? We did it with our humans vs. vampires calculator.

How do I calculate the Lotka-Volterra model for a predator-prey population?

When we "calculate the Lotka-Volterra model," we are computing its behavior over time. To do so, we need to solve simultaneously the two equations (as they interact with each other). There are techniques that allow you to do so precisely, but they are limited to specific points of the dynamics: the Lotka-Volterra model is usually solved by numerical means. In this case, we need to follow some simple steps:

  1. Define the initial conditions of the problem. In our case, defining the initial populations of prey and predator will suffice.

  2. Apply any implicit or explicit iterator that takes the values of the population at each moment in time and calculates the next step. Commonly used iterative methods are the Runge-Kutta methods.

  3. Proceed until you reach the desired number of iterations or until the populations collapse to a stable state (e.g., both species go extinct).

What is an iterative method?

An iterative method is a numerical technique used to solve differential equations or systems of differential equations. Iterative methods, both explicitly and implicitly, approximate the solution to the desired equation(s) starting from its value at a given initial point (the initial conditions). Though they differ in execution, the purpose is to find the value of f(x+dt)f(x+\mathrm{d}t), ff being the function of interest, starting from f(x)f(x). The value of dt\mathrm{d}t is the step size and corresponds to the "resolution" of the final result.

Iterative methods vary in complexity, from simple ones such as the Euler method to the powerful yet computationally expensive 6th Runge-Kutta method implemented with an adaptive step size. The choice of which one to use is up to you!

Our calculator does exactly this, iterating the equations with the conditions and parameters you passed to the tool. Is there something you can calculate by hand in the Lotka-Volterra model?

Fixed points in the Lotka-Volterra equations

There are two possible fixed points in any system described by Lotka-Volterra's equations. A fixed point is a state where the system's dynamics stop, and, in the case of populations, the number of individuals doesn't change. You can find two types of fixed points:

  • Stable fixed points where the stability resists small perturbations (think of a static pendulum).

  • Unstable fixed points where the system is not resistant against perturbation: a small change and the system moves, usually toward a stable point (think of a broom balanced vertically).

In the case of the Lotka-Volterra predator-prey model, we can find a trivial stable fixed point corresponding to the state:

npreysx=0npredatorsy=0\begin{split} n_\mathrm{preys} &\equiv x = 0\\ n_\mathrm{predators}& \equiv y = 0\\ \end{split}

Once both populations reach that point, the dynamics stop. The other point is more intriguing, as it represents a situation where the populations can reach stable numbers, from where, neglecting oscillations, the dynamics would stop.

To reach a stable point from an oscillatory model like the one we implemented in our tool, you would need to introduce a generic dissipation-like term in the equations that would contribute to the damping of the dynamics in the direction of stability.

The atto-fox problem

The description of populations using the Lotka-Volterra equations suffers from an annoying problem that was rather funnily named the atto-fox problem. Atto is the metric prefix for 101810^{-18}.

The populations described by the Lotka-Volterra predator-prey model tend to recover even when their numbers dwindle to extreme lows (for example, the unrealistic 101810^{-18} fraction of a fox). In real-life, small populations with very few individuals (in particular prey ones) can quickly become extinct due to environmental factors, diseases, or even sheer bad luck. How do we deal with this problem? We consider a population with a single individual to be doomed: if the preys drop below 11, the species go extinct. Notice how this would happen necessarily after reaching the first peak if the conditions are adequate.

How to represent the Lotka-Volterra equations?

The Lotka-Volterra equations depend on time: this makes their representation straightforward: place the time (or the number of iterations) on the horizontal axis, and plot the population drawing a dot for each data point. In this way, you can easily see the periodic behavior of the predator-prey model. If you choose the correct parameters, you may find situations where the model behaves astonishingly like a simple harmonic motion calculator. In fact, in these cases, the predator population is nothing but a rescaled copy of the prey population shifted by 90°.

However, we can find another representation of the evolution of the populations: the representation in the phase space. In the phase space, both the horizontal and vertical axis are associated with populations, and the relationship between the predator and the prey becomes easy to visualize.

In a phase diagram representation, we must assign a direction for the evolution of the dynamics, using arrows, for example. Otherwise, by following the curves in this wrong direction, we may get the impression that an increase in the number of predators may happen without justification, followed by a decline of the prey in the absence of predators.

How to use our calculator for the Lotka-Volterra equations

Our Lotka-Volterra calculator for the model of predator-prey populations is a simple tool. Input six fundamental values:

  • α\alpha, β\beta, γ\gamma, and δ\delta — The four parameters of the simulation; and

  • The initial conditions, that is, the initial number of predators and prey.

At the bottom of the calculator, you can find additional parameters that can help you tune your simulation: the duration of the simulation, if you want to include extinction or not, and the time scale of your graph.

Play with our tool, and see what the results are! But be careful: you can easily stumble upon unsatisfactory conditions: as for many biological systems, the predator-prey dynamics is exceptionally sensitive to the set-up of the problem!

🙋 We set up our calculator with initial conditions that produce a dynamics with a period of almost half a year and tuned the graph to frame its feature in the best possible way. Changing the initial conditions may cause the dynamics to change by a lot: tune the graphic visualization with the variable end of the simulation. Changing the time scale will also return more manageable labels on the horizontal axis for a better understanding.

If you click on advanced mode, you can also find the variable timestep. Choosing a value will force the simulation to run with the "resolution" you want. Don't increase it too much, or the details of the dynamics will go missing.

🙋 Under the plot of the dynamics, we added an additional representation of the Lotka-Volterra predator-prey model: the phase space representation of the dynamics! Change the parameters, and observe the trajectories (or orbits) change. Do you see the orbits shrinking? Where are they going to shrink? You are correct if you are thinking "in the stable point"!

At the bottom of our tool, you can find a link to download a file containing the points of your simulation. Download it, and use it in your projects!

FAQ

What are the Lotka-Volterra equations?

The Lotka-Volterra equations are a couple of nonlinear differential equations that describe the dynamics of a population of prey hunted by a population of predators. The Lotka-Volterra equations are:

dx/dt = αx - ßxy

dy/dt = δxy - γy

where:

  • α, ß, δ, and γParameters related to growth and predation;
  • x and y — The size of the pupulations; and
  • dx/dt and dy/dt — The time derivatives of the populations' sizes.

How does a population of prey interact with a predator population?

A population of prey interacts with a population of predators in multiple ways.

  1. The population of prey tends to grow in an uncontrollable fashion (exponential growth).
  2. The predators keep the prey in check by hunting it. A given fraction of each encounter between the two species results in successful predation.
  3. Predators convert prey into new predators.
  4. Predators naturally die out in the absence of prey.

Putting together all these "rules", we can see how the populations peak and decrease in an almost alternating fashion.

How do I calculate the stable points of the Lotka-Volterra model?

To calculate the stable points of the Lotka-Volterra model, follow these easy steps:

  1. Be sure to know the parameters of the Lotka-Volterra equations. These are four numbers that multiply combinations of the populations' sizes: α, ß, δ, and γ.

  2. To find the stable prey population, divide the coefficients of the predator dynamics:

    stable prey population = α/ß

  3. To find the predator population that doesn't oscillate with time, consider the coefficients of the prey's dynamics:

    stable predator population = γ/δ

What are the assumptions of the Lotka-Volterra model?

The Lotka-Volterra model uses multiple assumptions to allow a satisfying simulation of predator-prey dynamics:

  • Natural resources for the prey are unlimited.
  • The predator population gets its only sustainment from the prey population.
  • The rate of change of the populations' sizes depends on the size of the initial populations.
  • External factors don't affect the dynamics.
  • The predators keep predating the population at a constant rate.
Davide Borchia
Equations parameters
Reproduction rate of prey (α)
Mortality rate of predator per prey (ß)
Reproduction rate of predator per prey (δ)
Mortality rate of predator (γ)
Initial number of preys
Initial number of predators
Fixed point populations
Stable prey population
Stable predator population
Simulation parameters
End of the simulation
days
Extinction allowed?
No
Time scale
Days
Chart scale
Linear
Simulate?
Don't simulate: wait!
Check out 29 similar ecology calculators
Bag footprintBooks vs e-booksCarrying capacity… 26 more
People also viewed…

Christmas tree footprint

How much CO₂ does your Christmas tree produce? Could you produce less CO₂ by using an alternative?

Fish mercury

The fish mercury calculator will tell you how much mercury is in the fish you eat and how much you can safely consume in a week.

Humans vs vampires

Vampire apocalypse calculator shows what would happen if vampires were among us using the predator - prey model.

Secretary problem (Valentine's day)

Use the dating theory calculator to enhance your chances of picking the best lifetime partner.
Copyright by Omni Calculator sp. z o.o.
Privacy, Cookies & Terms of Service