In the following we do a complete analysis of a nonlinear
system. This is broken into a number of different
parts:
Let's consider the nonlinear system
![]()
![]()
which might model some sort of populations, or might have just been pulled out of thin air.
direction field and equilibrium points
To get a quick sense of what this does, let's first generate a direction field. I'm using Mathematica, so this involves the commands
![[Graphics:mmaimages/nlsys2_gr_3.gif]](mmaimages/nlsys2_gr_3.gif)
![[Graphics:mmaimages/nlsys2_gr_4.gif]](mmaimages/nlsys2_gr_4.gif)
We see that the points (0,0), (2,0), somewhere around (0, 2.8), somewhere around (1.8, 1.25), and maybe also somewhere around (0.5, 2) are interesting. We suspect that these are the critical points (equilibrium solutions, because it's autonomous) of the system. To see, we solve the system. Numerical (decimal) values are easier to understand than roots of roots, so I'll use NSolve rather than Solve:
![[Graphics:mmaimages/nlsys2_gr_6.gif]](mmaimages/nlsys2_gr_6.gif)
So we were right: the critical points (equilibrium solutions) are
(0, 0), (2, 0), (0, 3), (1.7221, 1.1021), and (0.5807, 1.8979).
(There are a couple of other points, but they are complex-valued, so they don't have any physical significance.) To get a better idea of what is going on around these points, we need to linearize around them and find the behavior there. Before doing that, though, let's look at the system in a different way.
As we saw in lab 5, we can also investigate the behavior of the system by looking at nullclines. These are just where the
and
equations are individually zero, and give where trajectories in the phase plane must be moving only vertically (for the
null clines) or horizontally (for the
).
The
nullclines are when
,
or, when
or ![]()
which is,
or
.
The
nullclines are when
![]()
which is, when
or ![]()
so
or
.
We can plot these to see what they say:
![[Graphics:mmaimages/nlsys2_gr_24.gif]](mmaimages/nlsys2_gr_24.gif)
where the blue curve and the
axis are the
nullclines and the red curves (including the
axis) are the
nullclines. Note that the equilibrium points are
![[Graphics:mmaimages/nlsys2_gr_30.gif]](mmaimages/nlsys2_gr_30.gif)
![[Graphics:mmaimages/nlsys2_gr_31.gif]](mmaimages/nlsys2_gr_31.gif)
So the equlibrium points are, as we expect, at the intersection of the nullclines. It's interesting to superimpose this plot with the direction field
![[Graphics:mmaimages/nlsys2_gr_33.gif]](mmaimages/nlsys2_gr_33.gif)
Note that the direction field arrows do cross the nullclines exactly horizontally (for the
nullclines) or vertically (for the
nullclines), and that the equilibrium points are where we'd expect.
Next, we might want to get a better picture of the behavior of the system at each of the equilibrium points. Let's take these in turn and linearize the system around them. To do this, we find the Jacobian and evaluate it at each equilibrium point. Letting
and ![]()
we need
,
,
and
to evaluate the jacobian. As long as I'm in Mathematica, I'll go ahead and do this with it (fx, fy, gx and gy are, respectively, the derivatives we want):
![[Graphics:mmaimages/nlsys2_gr_43.gif]](mmaimages/nlsys2_gr_43.gif)
Now, let's plug in the various points.
(Let's make all of the arrows that we draw around the equilibrium points be of length 0.375:)
![[Graphics:mmaimages/nlsys2_gr_44.gif]](mmaimages/nlsys2_gr_44.gif)
At (0,0), the coefficient matrix is
![[Graphics:mmaimages/nlsys2_gr_45.gif]](mmaimages/nlsys2_gr_45.gif)
So the linearized system here is
We can find the eigenvalues and eigenvectors of the coefficient matrix
easily with Mathematica:
![[Graphics:mmaimages/nlsys2_gr_49.gif]](mmaimages/nlsys2_gr_49.gif)
The eigenvalues are 2 and 3, and the corresponding eigenvectors are
and
Thus, around (0,0), the behavior is given by
![]()
We can illustrate this with arrows along the eigenlines (which go in the direction of the eigenvectors):
![[Graphics:mmaimages/nlsys2_gr_54.gif]](mmaimages/nlsys2_gr_54.gif)
![[Graphics:mmaimages/nlsys2_gr_55.gif]](mmaimages/nlsys2_gr_55.gif)
![[Graphics:mmaimages/nlsys2_gr_56.gif]](mmaimages/nlsys2_gr_56.gif)
Continuing as before, at (2,0), the coefficient matrix of the linearized system is
![[Graphics:mmaimages/nlsys2_gr_57.gif]](mmaimages/nlsys2_gr_57.gif)
So that the solution of the system is determined by the eigenvalues and eigenvectors of this matrix,
![[Graphics:mmaimages/nlsys2_gr_59.gif]](mmaimages/nlsys2_gr_59.gif)
So the solution near (2,0) is given by
The eigenlines in this case therefore appear something like
![[Graphics:mmaimages/nlsys2_gr_62.gif]](mmaimages/nlsys2_gr_62.gif)
![[Graphics:mmaimages/nlsys2_gr_63.gif]](mmaimages/nlsys2_gr_63.gif)
So the point (2,0) appears to be a saddle point, with trajectories converging towards it in the
direction and leaving along a line that is almost vertical.
Similarly,
![[Graphics:mmaimages/nlsys2_gr_65.gif]](mmaimages/nlsys2_gr_65.gif)
![[Graphics:mmaimages/nlsys2_gr_68.gif]](mmaimages/nlsys2_gr_68.gif)
![[Graphics:mmaimages/nlsys2_gr_69.gif]](mmaimages/nlsys2_gr_69.gif)
Note that the point (0,3) is stable -- all trajectories actually approach it! Can you see this from the direction field?
Again:
![[Graphics:mmaimages/nlsys2_gr_70.gif]](mmaimages/nlsys2_gr_70.gif)
![[Graphics:mmaimages/nlsys2_gr_73.gif]](mmaimages/nlsys2_gr_73.gif)
![[Graphics:mmaimages/nlsys2_gr_74.gif]](mmaimages/nlsys2_gr_74.gif)
![[Graphics:mmaimages/nlsys2_gr_75.gif]](mmaimages/nlsys2_gr_75.gif)
And this, too, is a stable point.
One more time:
![[Graphics:mmaimages/nlsys2_gr_76.gif]](mmaimages/nlsys2_gr_76.gif)
![[Graphics:mmaimages/nlsys2_gr_79.gif]](mmaimages/nlsys2_gr_79.gif)
![[Graphics:mmaimages/nlsys2_gr_80.gif]](mmaimages/nlsys2_gr_80.gif)
![[Graphics:mmaimages/nlsys2_gr_81.gif]](mmaimages/nlsys2_gr_81.gif)
And this is again an unstable saddle.
Each of the linearized problems give us the behavior near one of the equilibrium points. To see how all of this fits together, let's add them all together with the equilibrium points and nullclines (let's also recolor the equilibrium points as green for unstable and blue for stable):
![[Graphics:mmaimages/nlsys2_gr_82.gif]](mmaimages/nlsys2_gr_82.gif)
![[Graphics:mmaimages/nlsys2_gr_83.gif]](mmaimages/nlsys2_gr_83.gif)
![[Graphics:mmaimages/nlsys2_gr_84.gif]](mmaimages/nlsys2_gr_84.gif)
![[Graphics:mmaimages/nlsys2_gr_85.gif]](mmaimages/nlsys2_gr_85.gif)
Could we at this point guess the behavior of different trajectories in the plane? Sure! Note that because there are two attracting equilibrium points, however, there will be some trajectories which we won't be able to predict. To put everything that we've done so far together, let's add the direction field to the above plot:
![[Graphics:mmaimages/nlsys2_gr_86.gif]](mmaimages/nlsys2_gr_86.gif)
Be sure that you can tell how each of the different parts of our analysis (finding the direction field, finding equilibrium points, finding nullclines, and the solution of the linearizations at each equilibrium points) tell us similar and different things about the behavior of the system.
Because this is a nonlinear system, we can't actually solve it by hand. So if we want to see what trajectories look like, we have to solve it numerically. Mathematica has a pretty good numerical solver, so we'll just use that a couple of times here (for different initial conditions) and plot the resulting trajectories.
![[Graphics:mmaimages/nlsys2_gr_88.gif]](mmaimages/nlsys2_gr_88.gif)
This is the list of different initial conditions that we'll use: each pair, e.g., {0.1,0.05}, is a pair of values for {
}. So we have 8 different sets of initial conditions in our iclist.
![[Graphics:mmaimages/nlsys2_gr_90.gif]](mmaimages/nlsys2_gr_90.gif)
This is just a convenient way of solving the differential equation (with Mathematica's numerical solver, NDSolve) and plotting the resulting trajectory. By defining a function like this, I save a lot of typing.
![[Graphics:mmaimages/nlsys2_gr_91.gif]](mmaimages/nlsys2_gr_91.gif)
![[Graphics:mmaimages/nlsys2_gr_92.gif]](mmaimages/nlsys2_gr_92.gif)
Ok, drum roll! Let's see them:
![[Graphics:mmaimages/nlsys2_gr_93.gif]](mmaimages/nlsys2_gr_93.gif)
So: if we start at (0.1,0.05) (the initial condition closest to the origin: it's marked below with a red dot)
![[Graphics:mmaimages/nlsys2_gr_95.gif]](mmaimages/nlsys2_gr_95.gif)
We start at (0.1,0.05), and then move up towards the equilbrium point at (0.58,1.89) -- but that's a saddle, so we then swoop away from it and head to the stable equlibrium point at (1.72,1.1).
We can similarly discuss the other 7 trajectories. Let's put them all together with the linearized solutions and equilibrium points:
![[Graphics:mmaimages/nlsys2_gr_97.gif]](mmaimages/nlsys2_gr_97.gif)
And then, just for good measure, let's also add in the direction field and nullclines:
![[Graphics:mmaimages/nlsys2_gr_99.gif]](mmaimages/nlsys2_gr_99.gif)
And how beautiful it is...