Download as pdf or txt
Download as pdf or txt
You are on page 1of 10

LS50, Section #3 Handout

September 29, 2015

Dynamical systems

1. one-dimensional dynamical systems


We do not allow f to depend on time, be-
In class you modeled the behavior of a fish farm, which is an example
cause time-dependent equations of the
of a one-dimensional dynamical system. Such one-dimensional (or first- form ẋ = f ( x, t) are more complicated
order) system is described by a single equation of the form: and one needs two pieces of informa-
tion x and t to predict the future state
dx of the system. Therefore ẋ = f ( x, t) is
= ẋ = f ( x ) (1) really regarded as a two-dimensional, or
dt second-order system. In class, we do
not cover systems for which f ( x, t), but
Here x (t) depends on time t, and f ( x ) depends on the value of x, but those who are curious can read Steven
not on time. Strogatz, Nonlinear Dynamics and Chaos.

graphical approach: phase planes


Phase planes capture qualitatively how the system behaves in time if
it starts from arbitrary initial conditions. 1 But phase plane means that 1
The system only “lives" in one-
we consider 2 dimensions (x and y axes) – how does this fit with one- dimension: if you start from an arbi-
trary initial condition x0 , you can only
dimensional system with one variable of interest (x, say the number of move along the x −axis. So in principle
fish)?. Well, our variable of interest takes up one axis in the plane (x-axis), you can draw the phase plane as just the
x −axis. But you get a lot out of know-
freeing us to use the second axis in the plane to plot some more informa- ing f ( x ) and it is useful to plot it on
tion. The second axis then usually shows the function f ( x ), which deter- the y−axis, and you can do that because
mines the magnitude and the sign of change in x, because dx/dt = f ( x ). f ( x ) is a function of x.

To make things more concrete consider the phase plane below. I’ve
sketched an arbitrary f ( x ). When f ( x ) > 0 ( f ( x ) is above the x-axis) the
change in x is positive, and when f ( x ) < 0 ( f ( x ) is below the x-axis) the
change in x is negative. f ( x ) crosses the x −axis at two points, x f 1 , x f 2
which are the fixed points (dx/dt = 0).

Figure 1: Phase portrait of a hypothet-


ical one-dimensional system. There are
two fixed points ( f ( x ) crosses x twice),
labeled with 1 and 2. Increase in x is
shown as red arrows to the right ( f ( x ) >
0), and decrease in x is shown as blue
arrows to the left ( f ( x ) < 0). The flow
is towards 1, so 1 is a stable fixed point
(marked as a filled circle). The flow is
away from 2, so 2 is an unstable fixed
point (marked with an empty circle).
ls50, section #3 handout 2

It is important to realize that for any initial value x0 , you can answer
the question: “How would x0 change in the next time step?" by either
looking at the graph, or by calculating2 : 2
this notation tells you that you are look-
ing for the change in x0 by evaluating

dx f ( x ) at x0
= f ( x0 )
dt x
0
Consider the examples:
To make this even more explicit, if the time step is ∆t, then the above i. x01 - at x01 , f ( x ) is positive, so
in the next time step, x increases.
equation becomes: This statement is represented by a
x (∆t) − x0 = f ( x0 ) red arrow to the right.
ii. x02 - at x02 , f ( x ) is negative, so
which can be rearranged: in the next time step, x decreases.
This statement is represented by a
x (∆t) = x0 + f ( x0 ) blue arrow to the left.

It is also important to realize that each arrow on the plot is actually


a vector, which has a magnitude and direction given by f ( x ). Thus, the
“flows” are actually vector fields. For now, you are only concerned with
the direction of the change in x, which is given by the sign of f ( x ). The
magnitude of f ( x ) tells you how much x changes in a time step, but you
can get a pretty good qualitative picture just by considering the sign of
the change and leaving the magnitude computations to Matlab or such.
When you populate the phase plane with the fixed points and flows,
you can get the following useful information for the system:
i. Fixed points, which are the crossings of f ( x ) with the x-axis. At
these points, dx/dt = ẋ = 0 and there is no kind of change in x.
Consider the examples:
ii. Stability of the fixed points. The stability of the fixed points tells
i. x01 - if you start at x01 you will
you something about how the whole system behaves in the long move to the right and keep moving
run (i.e. when t → ∞). This is where the flows come into play: to the right until you end up in the
stable fixed point x f 1 .
when the flows point towards a fixed point, this point is stable (x f 1
ii. x02 - if you start at x02 you will
in the figure); when the flows point away from a fixed point, this move to the left and keep moving
point is unstable (x f 2 in the figure). In the long run systems end up to the left until you end up in the
in stable fixed points when they start from initial conditions that stable fixed point x f 1 .

follow flows (trajectories) that lead them to the fixed points. On iii. x03 - assuming that f ( x ) remains
positive for all values of x > x03 ,
the other hand, if you start at an unstable fixed point, any small you will keep moving to the right
change will cause you to move away from it and you will never until x → ∞
come back. For one-dimensional systems there are two kinds of
fixed points: stable and unstable.
ls50, section #3 handout 3

2. one-dimensional dynamical systems: examples

Problem 1. (Terminal velocity)


The velocity v(t) of a skydiver falling to the ground is governed by:
dv
m = mv̇ = mg − kv2
dt
where m is the mass of the skydiver, g is the acceleration due to grav-
ity, and k > 0 is a constant related to the amount of air resistance.
a . Find the fixed points of this equation and classify their stability.
p
b . Sketch the graph for v(t) for two initial values v0 = 0 and v0 > mg/k.
Figure 2: Phase plane analysis.
Answer:

a . To find the fixed points, we set v̇ = f (v∗ ) = 0

f (v∗ ) = mg − kv∗2 = 0

and solve for v∗ to get the fixed points:


r
∗ mg
v =±
k
To classify the stability of the fixed points, we need to plot f (v) = Figure 3: v(t) forp
two starting conditions
∗ v0 = 0 and v0 > mg/k.
q − kv; f (v) is a parabola centered at the origin with two roots v =
mg
mg
k as shown in Figure 2. Now, the velocity cannot be negative,
because the skydiver cannot fall upwards and he did not jump upwards
first (so that v0 < 0). So the phase portrait excludes the region where
v < 0, which is therefore grayed out. For the region where v > 0, the
q f (v) > 0 and to the right where f (v) < 0.
flow is to the left where
mg
The fixed point v = kis a stable fixed point.
q
mg
b . Both initial conditions lead to v∗ = k in the long run. See Fig-
ure 3.

Problem 2. (Population growth)


The simplest model for the growth of a population of organisms is:
dN
= Ṅ = rN
dt
where N (t) is the population at time t, and r > is the growth rate. This
model predicts exponential population growth N (t) = N0 ert , where N0
is the population at time t = 0. Of course such exponential growth can-
not go on forever. More appropriate description is given by the logistic
equation:  
N
Ṅ = rN 1 −
K
ls50, section #3 handout 4

where K > 0 is the carrying capacity.


a . Find the fixed points of this equation and classify their stability.
b . Sketch the graph for N (t) for three initial values N0 = 0, N0 is just
above 0, and N0 > K.

Answer:

a . To find the fixed points, we set Ṅ = 0, i.e.


 
N
rN 1 − =0
K
Figure 4: Phase plane analysis.
which gives the fixed points N ∗ = 0 and N ∗ = K. The plot of Ṅ is a
parabola with roots N ∗ (See Figure 4).
By looking at the flow in Figure 4, we see that N ∗ is unstable fixed
point, and N ∗ = K is a stable fixed point. In biological terms, N = 0
is an unstable equilibrium: a small population will grow exponentially
fast and run away from N = 0. On the other hand if N is disturbed
slightly from the carrying capacity K, the disturbance will decay and
in the long run the population will return to K.
b . When N = 0 the population remains at zero (there is no population),
as long as there is at least one individual in the beginning, the pop-
ulation will end up at the carrying capacity K in the long run. See Figure 5: N (t) for three starting con-
ditions. Note that the initial condition
Figure 5. N0 = 0 is plotted as a dashed line to be
distinguished from the x −axis.

Time for tricks


You can see that the logistic equation is the difference of two positive
terms: rN > 0 and rN 2 /K > 0. In the beginning of the section, we
mentioned that we will use the y− axis to plot useful information about
how the variable of interest (it was x then, now it’s N) changes. So far,
we have been plotting the full derivative. But we can also plot the two
terms separately! You will see why in a moment, first let’s introduce
some notation so that there is no confusion.

rN 2
Ṅ = rN − = f+ (N) − f− (N)
K
Both functions f + and f − are positive for all N > 0, the subscript just Figure 6: Alternative phase diagram
denotes that f + has positive contribution to Ṅ while f − has a negative where the positive and negative contri-
contribution to Ṅ (because we subtract f − ). butions to the change in N are visualized
separately.
We can now draw an alternative phase diagram in which the positive
and negative contributions to the change in N are visualized separately
(see Figure 6). In this diagram, we plot both functions f + and f − , which
are both positive functions of N. When f + > f − , the positive contribu-
tion to Ṅ is greater than the negative, so N increases in this region (green
ls50, section #3 handout 5

arrows to the right). When f + < f − , the negative contribution to Ṅ is


greater than the positive, so N decreases in this region (green arrows
to the left). When f + = f − , the net contribution to Ṅ is zero, and this
corresponds to the fixed point K.
Why was this useful? This is useful sometimes when the form of the
function f ( x ) is complicated, but it can be broken down as a difference
of two simpler positive terms. But more importantly, it visualizes the
contributions from different physical processes: f + is the contribution of
growth to Ṅ and f − is the contribution of death in the population.

you have seen this before ...


You have already seen such phase portrait when you learned about
the bistability of the lac operon.
For the lac operon, the concentration of inducer inside the cell (intra-
cellular) [ I ]i changes according to the following differential equation:
!
d [ I ]i [ I ]2i
= k in − k out [ I ]i
dt [ I ]2i + Kt2

where Kt is a Michaelis constant for transport, k in is the rate constant for


transport in, and k out is the rate constant for transport out. Both of the
terms in the equation are positive functions of [ I ]i , and the equation can
be rewritten in the notation we introduced above:
d [ I ]i
= f + ([ I ]i ) − f − ([ I ]i )
dt
so now the phase plane for [ I ]i should be less cryptic (see Figure 7). Figure 7: Bistability in the lac operon.

3. two-dimensional dynamical systems


In class you modeled the behavior of rabbits and sheep, which is an
example of a two-dimensional dynamical system. Such two-dimensional
system is described by a system of equations of the form:

dx
= ẋ = f ( x, y)
dt
dy
= ẏ = g( x, y)
dt
where x (t) and y(t) depend on time t, and f ( x, y) and g( x, y) depend
on the values of x and y, but not on time. It is rather difficult to give
a general treatment of two-dimensional systems without evoking linear
algebra (you are welcome to read Steven Strogatz’s book “Nonlinear dy-
namics and chaos" if you are curious). Instead, we will get the main
points across by example: namely, how to find fixed points and deter-
mine their stability, what are limit cycles, and what is the trajectory of
the system if it starts at some initial conditions ( x0 , y0 ).
ls50, section #3 handout 6

4. two-dimensional linear dynamical systems: examples

Example 1. (Rabbits vs sheep)3 3


A second rabbits vs sheep example is
Consider the following “rabbits vs sheep" model, where x, y ≥ 0. worked out in similar detail in the an-
swer key to the practice midterm

ẋ = x (3 − x − y )
ẏ = y (2 − x − y )

(nullclines) In one dimension we found the fixed points by setting the


time derivative to zero. Here, we have two time derivatives which are
zeros along the so-called nullclines:

ẋ = x (3 − x − y) = 0, when x = 0, and x = 3 − y, which are the nullclines

ẏ = y(2 − x − y) = 0, when y = 0, and y = 2 − x, which are the nullclines


These are shown in Figure 8. The nullclines for which ẋ = 0 are shown
in blue, and the nullclines for which ẏ = 0 are shown in green. Impor-
tantly, the phase portrait consists of the values that the two variables x
Figure 8: Nullclines. Note that x = 0
and y can have: we are making use of both dimensions. We will see how and y = 0 are plotted as dashed lines so
to visualize the information about the sign of the time derivatives shortly. as to be distinguished from the axes.

(fixed points) The individual derivatives are zero along their respective
nullclines, however, the fixed points of the system are given by the points
where ( ẋ, ẏ) = (0, 0). These points are intersections of the y and x null-
clines, i.e. the intersections of the differently colored nullclines as shown
in Figure 9.

(flow vectors) In one dimension, we calculated the flow vector f ( x ) = ẋ.


The same idea applies to two-dimensional systems. Each point ( x, y) in
the phase plane has associated flow vector ( ẋ, ẏ). The horizontal com-
ponent of this vector is ẋ = f ( x, y), and the vertical component of this
vector is ẏ = g( x, y). The magnitude and direction of the horizontal
component tells us how x changes in a time step ∆t, and the magnitude
and direction of the vertical component tells us how y changes in a time Figure 9: Fixed points. There are
step ∆t. three fixed points, which are marked by
empty circles.

(flow vectors and nullclines) The flow vectors originating from points
which lie on nullclines are purely vertical or purely horizontal, depend-
ing on the type of nullcline. Specifically, for points which lie on the ẋ = 0
nullcline, the horizontal component of the flow vector is zero, so the flow
vectors are purely vertical. For points which lie on the ẏ = 0 nullcline,
the vertical component of the flow vector is zero, so the flow vectors are
purely horizontal. What remains to be determined is the sign of the hor-
izontal flow vectors (to the left or to the right?) and the vertical flow
vectors (up or down?)
ls50, section #3 handout 7

Let’s deal with the horizontal flow vectors first. These originate from
the nullclines where ẏ = 0 (blue nullclines in the figure). The sign of
these vectors is determined by the sign of ẋ.

When ẋ > 0, x increases, and the flow vector points to the right
When ẋ < 0, x decreases, and the flow vector points to the left

For our example:

ẋ > 0 , when 0 < x < 3 − y


ẋ < 0 , when x > 3 − y

Note that x = 3 − y is the nullcline (green) where ẋ changes sign, from


Figure 10: Horizontal flow vectors.
the equations above we now know that ẋ > 0 to the left of the nullcline
and ẋ < 0 to the right of the nullcline.
We know the signs of the horizontal flow vectors, so we can draw
them as shown in Figure 10.

Moving on to the vertical flow vectors. These originate from the null-
clines where ẋ = 0 (green nullclines in the figure). The sign of these
vectors is determined by the sign of ẏ.

When ẏ > 0, y increases, and the flow vector points up


When ẏ < 0, y decreases, and the flow vector points down

For our example:

ẏ > 0 , when 0 < y < 2 − x Figure 11: Vertical flow vectors.

ẏ < 0 , when y > 2 − x

Note that y = 2 − x is the nullcline (blue) where ẏ changes sign. From


the equations above now we know that ẏ > 0 below the nullcline, and
ẏ < 0 above the nullcline.
We therefore know the signs of the vertical flow vectors, so we add
them as shown in Figure 11.

(fixed points and stability) We can use the phase portrait to determine
the fixed points and their stability. You can of course keep adding flow
vectors by computing their values at different ( x, y) (note that these are
no longer purely vertical or horizontal) to fill in the phase portrait. How-
ever, you can already tell the stability of the fixed points from the hori-
zontal and vertical flow vectors (see Figure 12). Figure 12: Stability of the fixed points.
Unstable fixed points are shown as
i. Fixed point at (0, 0) - any small deviation from this point causes empty circles. Stable fixed points are
the system to drift away, this point is unstable fixed point. shown as filled circles. Saddle points are
shown as half-filled circles.
ls50, section #3 handout 8

ii. Fixed point at (0, 2) - only initial conditions along the line x = 0
will cause the system to end up at this fixed point, any small
deviation along x will cause the system to drift away. This point
is a saddle point.
iii. Fixed point at (3, 0) - any small deviation away from this point
causes the system to come back, which makes it stable fixed point.

Example 2. Limit cycles and the simple harmonic oscillator


The vibrations of a mass hanging from a linear spring are governed by
the linear differential equation:

m ẍ − kx = 0

where m is the mass, k is the spring constant, and x is the displacement


of the mass from equilibrium. By definition, the velocity of the mass is:

ẋ = v

and the differential equation for the simple harmonic oscillator in terms
of the velocity becomes:
k Figure 13: Nullclines and fixed point.
v̇ = − x
m

a . In the phase plane ( x, v), find the the nullclines and the fixed points.

Setting both derivatives to zero to find the null clines:

ẋ = v = 0, so v = 0 is the nullcline
k
v̇ = − x, so x = 0 is the nullcline
m
The fixed point is the intersection between nullciles, (0, 0), see Fig-
ure 13.
Figure 14: Horizontal and vertical flow
vectors.
b . The system assigns a flow vector ( ẋ, v̇) = (v, − mk x )
at each point
x, v on the phase plane. Can you draw the vectors along the null
clines?

The nullcline ẋ = 0 (blue) has only vertical flow vectors set by v̇ =


− mk x. The nullcline ẏ = 0 (green) has only horizontal flow vectors
set by ẋ = v. See Figure 14.

c . If you start at a location ( x0 , 0) how would you move through phase


space? Physically this corresponds to displacing the mass by x0 from
the equilibrium and letting it go.

Figure 15: Trajectory of the system start-


ing at ( x0 , 0) follows the gray flow vec-
tors
ls50, section #3 handout 9

If you start at location ( x0 , 0) you follow the gray flow lines in a closed
orbit which eventually brings you back to where you started. These
closed orbits are examples of limit cycles. See Figure 15.

d . What can you say about the dynamics of the system?

The phase portrait has a fixed point and closed orbits (limit cycles).
When you start at the fixed point you stay there, if you start anywhere
else you follow a closed orbit and get back to where you started. This
corresponds to the system oscillating (periodic motions). This point is
illustrated in Figure 16.

Figure 16: Phase plane diagram describ-


ing the trajectory of the mass after it has
been displaced by x0 and let go.
ls50, section #3 handout 10

Hopefully, this example helps with some of the confusion regarding


the phase portrait of a simple genetic oscillator you saw in lecture (and
is shown in Figure 17).

Figure 17: Simple genetic oscillator

You might also like