Lecture slides for UCLA LS 30B, Spring 2020
License: GPL3
Image: ubuntu2004
Modeling dynamical systems using differential equations
Begin by choosing your state variables. For example:
Then set up the differential equations. The basic idea is, for each state variable , write an equation of the form:
So for our example above with lynx and hares, we might say
For this example, we'll use the following assumptions:
In the absence of predators, the snowshoe hare population grows at a per-capita rate of 30% per year.
Each lynx consumes hares at a rate that's proportional to the hare population, with a proportionality constant of 0.02.
The birth rate of the lynx is proportional to how much food they're consuming, with a proportionality constant of 0.5.
The lynx die at a per-capita rate of 20% per year.
This yields the following differential equations:
Important point: We can think of a differential equation as a function, that takes the state variables as inputs, and gives the rates of change as outputs.
For a single-variable differential equation, this is as simple as .
For example, for the following differential equation (an example of the logistic model): the function is .
That is, the function is just the right-hand side of the differential equation.
For a multi-variable differential equation like our lynx-and-hares example above:
we begin by rewriting it in “vector form” as follows:
So if we want to think of this differential equation as a function, that function is
To begin to visualize how models behave, we first think of the state space:
This is a space in which each state variable gets its own axis, so that each state the system can be in corresponds to a point in the state space.
For each state (point) in the state space, we can plug the corresponding values of and into the differential equations, and we get a change vector .
If we draw the change vector at each point, we get the vector field of the differential equations:
Think back briefly to what we said about how a differential equation is a function: it takes a state as input, and gives a change vector as output.
That is, its domain is the state space of the model, and its codomain is the space of all possible change vectors, which we call the tangent space of the model.
In short, it's a function that can be described by
In LS 30A, this was just an abstract concept. This quarter, we will rely on this concept a lot more.
From the vector field, it's easy to see the behavior of the system: if the system starts at the state as shown below, it will move through the state space by following the change vectors.
The resulting curve is called a trajectory of the system (shown in red above). It's a visual representation of a solution of the differential equations.
(Remember that there's another way to visualize a solution of the differential equations: time series. The time series plots of a solution are graphs of the state variables as functions of time.
From looking at the vector field, it's easy to visualize where the trajectory goes. But how do we compute this trajectory? That is, how do we compute the solution of the differential equation?
Most of the time, it's impossible to compute it exactly using just algebra and calculus techniques. (That is, it's impossible to come up with a formula for and as functions of time, .)
So instead, we approximate them using Euler's method.
Euler's method:
So we can use Euler's method to numerically approximate solutions (trajectories and/or time series) of a differential equation. This is called simulation.
But another very important tool we can use to study the behavior of a model is to analyze its equilibrium points.
Equilibrium points
Definition: A differential equation has an equilibrium point at the state (point) if the change vector is exactly 0 at that point. That is, if
So, to find equilibrium points of a differential equation, just set the right-hand side of each equation to 0, and solve. (If there are multiple variables and multiple equations, you have to solve simultaneously.)
But remember, not all equilibrium points are created equal.
Some equilibrium points are stable, some are unstable. And even within these broad classifications, there can be different types.
One significance of equilibrium points is that the stable equilibrium points often dictate the long term behavior of the system.
Example: The Allee effect model
The equilibrium points at and are stable. The one at is unstable.
For higher dimensional systems, there are several types of stable and unstable equilibrium points:
Recall that, by the end of LS 30A, we had no way, other than simulation, to distinguish between the three “rotating” types of equilibrium points: stable spiral, center, and unstable spiral.
Even with simulation, it's sometimes very difficult to distinguish between an equilibrium point that's a stable spiral and one that's an unstable spiral!
Is the equilibrium point below a stable spiral, or an unstable one? The trajectory is spiraling in towards the equilibrium point... at first. But does it keep spiralling inward, and eventually “fill in” that little hole that we see? Or would a trajectory that starts very close to the equilibrium point actually spiral outward a little bit?
This is a major unanswered question for us, which we will finally solve near the end of this quarter!
Finally, if a differential equation has a parameter in it, say , then we can vary that parameter and see how the behavior of the system changes.
Definition: A bifurcation occurs when varying a parameter of the model causes a change in the overall behavior of the model. Usually, this means a change in the number and/or stability of equilibrium points.
This quarter, we will (very soon!) learn about some new types of bifurcations.