Introduction to first-order systems - · PDF fileIntroduction to first-order systems ......

22
Chapter 3 Introduction to first-order systems :INTRO-TO-SYTEMS In many physical and biological situations there are multiple quantities that are changing, and whose change is dependent on each other. For example, we may have two populations competing for the same resources or habitat. Or we may have a one population preying upon another. We can model such situations using a system of dierential equations. A first order system consists of a list of equations of the form dy 1 dt = f 1 (y 1 ,...,y n ) dy 2 dt = f 1 (y 1 ,...,y n ) . . . dy 1 dt = f 1 (y 1 ,...,y n ), (3.0.1) where y 1 ,...,y n are unknown functions and f 1 ,...,f n are functions describ- ing the “right hand sides” of the equations. We will focus our attention on autonomous equations, where the independent variable t does not explic- itly appear. Example 3.0.1. Suppose we have a population P growing according to a logistic model with carrying capacity K and growth rate r P , as well as a second population R that grows according to the basic growth model with 73

Transcript of Introduction to first-order systems - · PDF fileIntroduction to first-order systems ......

Chapter 3

Introduction to first-ordersystems

CH:INTRO-TO-SYTEMSIn many physical and biological situations there are multiple quantities thatare changing, and whose change is dependent on each other. For example,we may have two populations competing for the same resources or habitat.Or we may have a one population preying upon another.

We can model such situations using a system of di↵erential equations.A first order system consists of a list of equations of the form

dy1

dt= f

1

(y1

, . . . , yn)

dy2

dt= f

1

(y1

, . . . , yn)

...

dy1

dt= f

1

(y1

, . . . , yn),

(3.0.1)

where y1

, . . . , yn are unknown functions and f1

, . . . , fn are functions describ-ing the “right hand sides” of the equations. We will focus our attention onautonomous equations, where the independent variable t does not explic-itly appear.

Example 3.0.1. Suppose we have a population P growing according to alogistic model with carrying capacity K and growth rate rP , as well as asecond population R that grows according to the basic growth model with

73

74 CHAPTER 3. INTRODUCTION TO FIRST-ORDER SYSTEMS

growth rate rR The di↵erential equations describing these populations are

dP

dt= rPP

✓1� P

K

◆,

dR

dt= rRR.

The two equations are independent, in the sense that we can solve eachwithout solving the other.

We now modify the equations to describe some interaction between thetwo populations. We suppose that P represents a population of prey and Rrepresents a population of predators. We expect that the presence of R tohave a negative impact on the population P , while the presence of P willhave a positive impact on the population R. We assume that these impactsare proportional to the size of each population. The system of di↵erentialequations that describes this situation is

dP

dt= rPP

✓1� P

K

◆+ ↵PR,

dR

dt= rRR+ �PR,

(3.0.2) predator-prey

where the constant ↵ is negative and the constant � is positive. The system(3.0.2) is called a predator-prey model. It is typically assumed that rP > 0,meaning that in the absence of predators, the population of prey increases; itis also typically assumed that rR < 0, meaning that in the absence of prey,the population of predators decreases.

Example 3.0.2. Suppose we have two populations P1

and P2

competingfor the same resource. We can model this by making a modification of thelogistic model as follows. If there is no competition, then the growth of thetwo populations is described by

dP1

dt= r

1

P1

✓1� P

1

K

◆,

dP2

dt= r

2

P2

✓1� P

2

K

◆.

We now modify this system by replacing the terms

✓1� P

1

K

◆and

✓1� P

2

K

3.1. PARAMETRIC CURVES 75

by ✓1� P

1

+ P2

K

◆.

This modification as represents the assumption that the “occupied habitat”is the sum of P

1

and P2

. The resulting system is

dP1

dt= r

1

P1

✓1� P

1

+ P2

K

◆,

dP2

dt= r

2

P2

✓1� P

1

+ P2

K

◆.

We can algebraically rearrange this system in to the form

dP1

dt= r

1

P1

✓1� P

1

K

◆� r

1

KP1

P2

,

dP2

dt= r

2

P2

✓1� P

2

K

◆� r

2

KP1

P2

.

Letting ↵1

= r1

/K and ↵2

= r2

/K, the system takes the form

dP1

dt= r

1

P1

✓1� P

1

K

◆� ↵

1

P1

P2

,

dP2

dt= r

2

P2

✓1� P

2

K

◆� ↵

2

P1

P2

.

(3.0.3) competition

The system (3.0.3) is an example of a competition model.

3.1 Parametric curvessection:parametric-curves

The solution to a system of equations

dy1

dt= f

1

(y1

, y2

)dy

2

dt= f

2

(y1

, y2

)

consists of two functions y1

(t) and y2

(t). In this section we develop severalways to visualize such a solution.

Of course, one way to visualize the two functions is simply make indi-vidual plots of each: one plot of y

1

versus t and one plot of y2

versus t. Theproblem with having two separate plots is that it is somewhat di�cult tounderstand the impact that y

1

and y2

have on one another. This motivatesus to try to find a way to plot both functions together.

76 CHAPTER 3. INTRODUCTION TO FIRST-ORDER SYSTEMS

The issue is that we can’t draw a two-dimensional plot that has a t axis,a y

1

axis, and also a y2

axis. The resolution is to simply not include a taxis. Rather, for each time t, we plot the point (y

1

(t), y2

(t)) on the y1

– y2

plane. As t changes, the values of y1

and y2

change accordingly; the result isthat we obtain a path in the plane, telling “where” (in y

1

–y2

land) we are ateach time. The y

1

–y2

plane is often called state space or phase space orconfiguration space, because each point in the plane is a possible “state”or “configuration” of the two functions y

1

and y2

. The paths (y1

(t), y2

(t))are a parametric curve or parametric plot in state space.

Figure 3.1.1: Parametric plot of functions in Example 3.1.1. fig:parametric-plot1

ex:first-parametric Example 3.1.1. Suppose

y1

(t) = cos(t) y2

(t) = sin(t).

Let’s make a plot of several points along the parametric curve that thesefunctions describe.

t (y1

(t), y2

(t))0 (cos(0), sin(0)) = (1, 0)⇡/4 (cos(⇡/4), sin(⇡/4)) = (

p2/2,

p2/2)

⇡/2 (cos(⇡/2), sin(⇡/2)) = (0, 1)3⇡/4 (cos(3⇡/4), sin(3⇡/4)) = (�p

2/2,p2/2)

etc.

3.1. PARAMETRIC CURVES 77

If we plot these points, we see that the curve is simply traversing the unitcircle in a counter clockwise direction; see Figure 3.1.1.

activity:parametric-1 Activity 3.1.1. Make a parametric plot of the functions y1

(t) = et, y2

(t) =e2t. You should find that the resulting curve is a parabola!

activity:parametric-2 Activity 3.1.2. Make a parametric plot of the functions y1

(t) = 2e�t,y2

(t) = 5e�t. You should find that the resulting curve is a straight line!What happens as t ! 1? What happens as t ! �1?

Figure 3.1.2: Parametric plot for Example 3.1.2. fig:parametric-plot2

The following example shows that it is relatively straightfoward to haveSage draw parametric plots.

ex:sage-parametric-plot Example 3.1.2. Suppose we want Sage to make a parametric plot of thefunctions

y1

(t) = sin(2t) y2

(t) = sin(3t)

for 0 t 2⇡. We can accomplish this with the following code:

var(’t’)

y1(t) = sin (2*t)

y2(t) = sin (3*t)

parPlot=parametric_plot( (y1(t),y2(t)),(t,0,2*pi),

axes_labels =[’$y_1$ ’,’$y_2$ ’])

parPlot.show()

The resulting plot appears in Figure 3.1.2

78 CHAPTER 3. INTRODUCTION TO FIRST-ORDER SYSTEMS

Activity 3.1.3. Have Sage plot the parametric curves defined by the func-tions in Activity 3.1.1.

Activity 3.1.4. Have Sage plot the parametric curves defined by the func-tions in Activity 3.1.2.

It can be instructive to compare the parametric plot of y1

(t) and y2

(t)with the individual plots ofy

1

and y2

. For example, compare the plots inFigure 3.1.3 with the parametric plot in Figure 3.1.2. If you are given oneof the plots, can you reconstruct the other?

Figure 3.1.3: Plots of the functions y1

(t) (in blue) and y2

(t) (in red) fromExample 3.1.2. fig:parametric-plot1-yy

Activity 3.1.5. Consider the functions y1

(t) and y2

(t) whose plots appearin Figure 3.1.4. Based on that figure, construct the parametric plot of thesefunctions.

Activity 3.1.6. Consider the parametric plot in Figure 3.1.5. Based onthat figure, make one possible pair of plots of the corresponding functionsy1

(t) and y2

(t).

MakeMeAMatch Exercise 3.1.1. Match the pictures in Figure 3.1.6 with the parametricequations below. You can use Mathematica to prompt you in the rightdirection. Make sure that in the end you learn something that can help youdo such exercises without any help of “technology”.

3.1. PARAMETRIC CURVES 79

Figure 3.1.4: A plot of the functions y1

(t) in blue and y2

(t) in red. Whatdoes the corresponding parametric plot look like? fig:parametric-plot-engineering

1. x(t) = cos(2t), y(t) = sin(2t);

2. x(t) = 2 cos(t), y(t) = sin(t);

3. x(t) = e�t cos(t), y(t) = e�t sin(t);

4. x(t) = e�t sin(t), y(t) = e�t cos(t);

5. x(t) = (1 + cos2(5t)) cos(t), y(t) = (1 + cos2(5t)) sin(t);

6. x(t) = et, y(t) = �et;

7. x(t) = cos(t), y(t) = cos(t);

8. x(t) = cos(t), y(t) = t;

9. x(t) = t, y(t) = cos(2t).

DrawCurves Exercise 3.1.2. Draw the curves with the following parametric equations;indicate the direction in which t increases. You can use Mathematica toprompt you in the right direction. Make sure that in the end you find a wayof making the drawing without any use of “technology”.

1. x(t) = cos�t2

�, y(t) = sin

�t2

�;

2. x(t) = et cos(t), y(t) = et sin(t);

80 CHAPTER 3. INTRODUCTION TO FIRST-ORDER SYSTEMS

Figure 3.1.5: The parametric plot for some functions y1

and y2

. Can youuse this plot in order to construct one possible pair of plots of the functionsy1

and y2

? fig:parametric-plot-reverse-engineering

3. x(t) = t cos(t), y(t) = t sin(t);

4. x(t) = 2et, y(t) = �3et;

5. x(t) = e�t, y(t) = 2e�t.

3.2 Vector fields

Suppose we have a parametric curve given by the functions y1

(t) and y2

(t).We visualize this curve as tracing out a path in the plane, having coordinates(y

1

(t), y2

(t)) at time t. At any given time, the derivatives dy1dt and dy2

dt tellus infinitesimal change in y

1

and y2

; the two derivatives together tell usthe infinitesimal change in location. This infinitesimal change in location iscalled the tangent vector to the curve. One common notation is

⌧dy

1

dt,dy

2

dt

�.

It is important that along the curve, we have one tangent vector at eachtime.

3.2. VECTOR FIELDS 81

For example, consider the curve given by y1

(t) = et and y2

(t) = e2t. Thetangent vector at time t is

het, 2e2ti.Thus at time t = 0 the tangent vector is

h1, 2i,

while at t = 1 the tangent vector is

he, 2e2i.

It is convenient to think of the tangent vector at time t as telling thepath which way to go at time t. Thus the tangent vector has a location (thepoint where the path is at that time) as well as a direction (where the curveis going) and magnitude (how fast it is going). Thus in the example above,at time t = 0 the location of the path is (1, 1) and curve is moving at rate1 in the y

1

direction and rate 2 in the y2

direction. Using the Pythagoreantheorem, we see that the “speed” along the path at that time is

p3. It is

typical to draw tangent such a vector by drawing a tiny arrow at the point(1, 1) pointing in a direction that is twice as much in the y

2

direction as itis in the y

1

direction, and such that the length of the arrow isp3.

Suppose, now, that we are given a system of di↵erential equations of theform

dy1

dt= f

1

(y1

, y2

),dy

2

dt= f

2

(y1

, y2

).

Suppose that we have a solution that passes through the point (y1

, y2

) =(3, 7). The di↵erential equation tells us that the tangent vector to the solu-tion at that point must be given by

hf1

(3, 7), f2

(3, 7)i.

Thus, from a geometric point of view, the functions f1

and f2

are tellingthe parametric plot of the solution how to move in state space. (This isexactly analogous to how the slope field of a single di↵erential equation“tells” solutions how to move in the t–y plane.) Thus we can obtain aqualitative picture of how solutions to systems of di↵erential equations willbehave by simply choosing a lot of points in the y

1

–y2

plane and using thesystem of equations to draw tangent vectors at those points. Solutions willfollow the arrows accordingly.

82 CHAPTER 3. INTRODUCTION TO FIRST-ORDER SYSTEMS

ex:nonlinear-system-1 Example 3.2.1. Consider the system

dy1

dt= y

1

� y21

� y1

y2

dy2

dt= �y

2

+ 2y1

y2

.

The vector field consisting of tangent vectors is given by

hy1

� y21

� y1

y2

,�y2

+ y1

y2

i.

Thus at the point (y1

, y2

) = (1, 2) we have the vector h�2, 0i. Similarly, atthe point (�1,�1) we have vector h�3, 2i. Plotting arrows for large numbersof points yields the following plot:

The Sage code used to generate the plot is

var(’y1 ,y2’)

vectorField = vector ([y1- y1^2 - y1*y2,-y2+2*y1*y2])

vfPlot = plot_vector_field(vectorField ,(y1 ,-2,2) ,(y2 ,-2,2),

axes_labels =[’$y_1$ ’,’$y_2$ ’])

vfPlot.show()

Notice that the plot doesn’t show a lot of detail in the first quadrant. Oneoption is to change the domain and “zoom in” on that region.

Another option is to ask Sage to change the lengths of all the arrows tobe the same size. This can be accomplished with this code:

var(’y1 ,y2’)

vectorField = vector ([y1- y1^2 - y1*y2,-y2+2*y1*y2])

3.2. VECTOR FIELDS 83

normalizedField = vectorField/vectorField.norm()

vfPlot = plot_vector_field(normalizedField ,(y1 ,-2,2) ,(y2

,-2,2),axes_labels =[’$y_1$ ’,’$y_2$ ’])

vfPlot.show()

The resulting plot is the following:

With this plot we clearly see that most of the interesting features lie in asmaller region. . . try zooming in to find a range of y

1

and y2

values thatbetter illustrates the features of this vector field. I found that having both y

1

and y1

between �0.2 and 1.2 worked very well. . .

At this point we introduce some convenient notation, called columnnotation. Rather than write a point in the y

1

–y2

plane as (y1

, y2

) wearrange the two coordinates in to a column:

(y1

, y2

) $✓y1

y2

◆.

The LaTeX code for this is

\begin{pmatrix} y_1 \\ y_2 \end{pmatrix}

We can given this point a single name, Y . Thus we have

Y =

✓y1

y2

◆.

84 CHAPTER 3. INTRODUCTION TO FIRST-ORDER SYSTEMS

Suppose we now have a parametric curve given by the functions y1

(t)and y

2

(t). We can given the parametric curve as a whole the name Y (t) andwrite

Y (t) =

✓y1

(t)y2

(t)

◆.

Thus the curve in Example 3.1.1 is written

Y (t) =

✓cos(t)sin(t)

◆. (3.2.1) vector:parametric-curve

We also write tangent vectors in column notation. (When we do this,the vectors are called column vectors.) If

Y (t) =

✓y1

(t)y2

(t)

then

Y 0(t) =

✓y01

(t)y02

(t)

is the tangent vector along the curve. Tthe following all represent the samething:

d

dtY (t) = Y 0(t) =

✓y01

(t)y02

(t)

◆= hy0

1

(t), y02

(t)i.

Thus the tangent vector for the curve (3.2.1) is

d

dtY =

✓� sin(t)cos(t)

◆.

At this stage we need to make an important, if subtle, point. We areusing the column notation both for points in state space and also for tangentvectors to paths in state space. It is important to keep mind, from context,whether a symbol such as ✓

3�5

represents the location (3, 5) or the vector h3, 5i.We can use column vector notation to write systems of di↵erential equa-

tions. For example, we can the vector field in Example ?? as

✓y1

� y21

� y1

y2

�y2

+ y1

y2

◆.

3.2. VECTOR FIELDS 85

Then the di↵erential equation from that example

d

dt

✓y1

y2

◆=

✓y1

� y21

� y1

y2

�y2

+ y1

y2

◆.

If we give the vector field the name F (Y ), then we may simply write thedi↵erential equation as

d

dtY = F (Y ).

Example 3.2.2. The predator-prey system (3.0.2) is written in column no-tation as

d

dt

✓PR

◆=

✓rPP

�1� P

K

�+ ↵PR

rRR+ �PR

◆.

Activity 3.2.1. Write down the competition system (3.0.3) in column no-tation.

Activity 3.2.2. Consider the predator-prey system

dP

dt= P (1� P )� 100PR,

dR

dt= � 1

27R+

1

9PR.

Write the system in column notation. Then plot the corresponding vectorfield.

ParticleMan Exercise 3.2.1. A particle traverses a curve with parametric equations(x(t), y(t)). We know that

x(0) = 1,dx

dt(0) = �1 y(0) = 2,

dy

dt(0) = �4.

Use this information to estimate the particle’s location at time t = 0.2.Draw a picture that illustrates your reasoning.

MVP-Last Exercise 3.2.2. A particle is moving in a plane. We know that particlestarted from the point (1, 1) and that when the particle is located at the

point (p, q) its velocity vector is

✓q�p

◆. Estimate the particle’s trajectory.

Draw a picture of your estimated trajectory.

YouKnowWhatImTalkingAbout Exercise 3.2.3. Match the graphs in Figure 3.2.1 with the correspondingphase diagrams in Figure 3.2.2.

86 CHAPTER 3. INTRODUCTION TO FIRST-ORDER SYSTEMS

SunriseOverWater Exercise 3.2.4. Use Sage to draw the vector fields of the following systemof di↵erential equations:

dx

dt= x+ 2y,

dy

dt= �x� y.

Then eyeball several solution curves in the x–y plane. Sketch the corre-sponding graphs of x(t) and y(t) as functions of t.

Exercise 3.2.5. Use Sage to draw the vector fields of the following systemof di↵erential equations:

dx

dt= x(1� x� 10xy,

dy

dt= � 1

27y +

1

9xy.

Then eyeball several solution curves in the x–y plane. Sketch the corre-sponding graphs of x(t) and y(t) as functions of t.

QualExtra-Last Exercise 3.2.6. Use Sage to create the vector field plots of the followingsystem of di↵erential equations:

dx

dt= x+ 2y,

dy

dt= 4x+ 3y.

Then eyeball several solution curves curves in the x–y plane. Sketch thecorresponding graphs of x(t) and y(t) as functions of t.

3.3 The initial value problem for systems

Suppose we have a system of di↵erential equations

d

dtY = F (Y ). (3.3.1) generic-system

The initial value problem for this system is the problem of finding a functionY (t) such that

d

dtY = F (Y ) Y (0) = Y

0

(3.3.2) ivp-for-systems

for some initial location Y0

in state space.There is a version of FTODE that applies to (3.3.2), exactly analogous

to the theorem for equations with one variable, stating that of all of the firstderivatives of F are continuous in a neighborhood of Y

0

, then there exists aunique solution to (3.3.2).

Just as in the case of a single equation, an important consequenceFTODE is that solutions do not cross. In particular, if F (Y ) is globallysmooth, then there cannot be two di↵erent parametric curves, each repre-senting solutions to (3.3.1) that meet at some point in state space.

3.3. THE INITIAL VALUE PROBLEM FOR SYSTEMS 87

Example 3.3.1. Consider the equation in Example 3.2.1, which we writeas

d

dt

✓y1

y2

◆=

✓y1

� y21

� y1

y2

�y2

+ 2y1

y2

with initial condition✓y1

(0)y2

(0)

◆=

✓0.10.1

◆.

There exists exactly one solution Y (t) to this initial value problem.

We can plot the solution curve Y (t) in the y1

–y2

plane. The resultingplot is the following, where we have drawn the solution curve superimposedon the vector field for the di↵erential equation.

If we consider another solution with initial condtion

✓y1

(0)y2

(0)

◆=

✓0.10.2

then the two solutions approach one another, but never intersect. Here is aplot of the two solutions; the first in red, the second in blue:

88 CHAPTER 3. INTRODUCTION TO FIRST-ORDER SYSTEMS

The two solutions in the previous example seem to be tending towardsthe point

Y⇤ =

✓.5.5

◆.

If we evaluate the vector field

F (Y ) =

✓y1

� y21

� y1

y2

�y2

+ 2y1

y2

at that point, we see that

F

✓.5.5

◆=

✓00

◆.

Thus the point

Y⇤ =

✓.5.5

◆.

is an equilibrium point of the system, meaning that

Y (t) = Y⇤ =

✓.5.5

is a constant solution. We see in the example that the two solution curves(red and blue) both tend towards this equilibrium as t progresses. We mightwonder in this case if the equilibrium is stable, which would mean that all

3.3. THE INITIAL VALUE PROBLEM FOR SYSTEMS 89

near by solutions move towards it. However, the analysis of stability in thecase of a system is much more complicated than in the case of a single equa-tion. We can imagine situations where solutions may be moving towards anequilibrium point from several directions and moving away in other direc-tions. Furthermore, as in the case of the example considered here, solutionsmay not “directly” approach an equiloibrium point, but may twist and turnin state space. In the next chapter we analyze stability of equilibrium solu-tions for a very simple class of systems; in the subsequent chapter we showhow to use that analysis in order to analyze more complicated systems suchas the one appearing above.

We conclude this section by discussing the Sage code used to generatethe plots above. The plots shown are actually numerical approximations,generated using the Runge-Kutta algorithm. The code is constructed asfollows:

First we declare variables t, y1

, y2

. We also define the function F that de-termines the right hand side, set the initial condition to be (t

0

, y1

(t0

), y2

(t0

)) =(0, 0.1, 0.1), and tell the computer that we we want to run the simulationuntil time t = 20:

var(’t,y1 ,y2’)

F = [y1 - y1^2 - y1*y2 ,-y2+2*y1*y2]

initCond = [0,.1, .1]

endTime = 20

Next we construct a variable numSoln which is the numerical solution.

var(’t,y1 ,y2’)

F = [y1 - y1^2 - y1*y2 ,-y2+2*y1*y2]

initCond = [0,.1, .1]

endTime = 20

numSoln = desolve_system_rk4(F,[y1 ,y2],ics=initCond , ivar=t,

end_points=endTime)

The object numSoln consists of triples [i,j,k] that represent (ti, y1,i, y2,i).In order to construct a parametric plot, we only need the y

1

and y2

val-ues. These we store in an object called parList. We subsequently make aparametric plot from that list.

var(’t,y1 ,y2’)

F = [y1 - y1^2 - y1*y2 ,-y2+2*y1*y2]

initCond = [0,.1, .1]

90 CHAPTER 3. INTRODUCTION TO FIRST-ORDER SYSTEMS

endTime = 20

numSoln = desolve_system_rk4(F,[y1 ,y2],ics=initCond , ivar=t,

end_points=endTime)

parList = [ [j,k] for i,j,k in numSoln]

parPlot = list_plot(parList , color=’red’, plotjoined=true ,

thickness =2)

Next we want to plot a vector field as before. To do this we need to constructa vector version of F. We do this and then build the plot.

var(’t,y1 ,y2’)

F = [y1- y1^2 - y1*y2 ,-y2+2*y1*y2]

initCond = [0,.1, .1]

endTime = 20

numSoln = desolve_system_rk4(F,[y1 ,y2],ics=initCond , ivar=t,

end_points=endTime)

parList = [ [j,k] for i,j,k in numSoln]

parPlot = list_plot(parList , color=’red’, plotjoined=true ,

thickness =2)

vectorF = vector(F)

normalF = vectorF/vectorF.norm()

vfPlot = plot_vector_field(normalF ,(y1 ,-.2,1.2) ,(y2 ,-.2,1.2)

,axes_labels =[’$y_1$ ’,’$y_2$ ’])

mainPlot = vfPlot + parPlot

mainPlot.show()

In order to plot two di↵erent solutions at once, I defined two di↵erent ini-tial conditions initCond1 and initCond2. These were used to constructnumSoln1 and numSoln2, etc.

AskBobbyDylan Exercise 3.3.1. Find all equilibrium solutions of the simple predator-preymodel:

dP

dt= 2P � PR

dR

dt= �R+ 4PR.

Have Sage plot the vector field for the system in a neighborhood of eachequilibrium. Determine which equilibria look stable and which appear to beunstable.

3.3. THE INITIAL VALUE PROBLEM FOR SYSTEMS 91

Finally, have Sage construct a numerical approximation of the solutionhaving initial conditions (P

0

, R0

) = (1, 1).

AskTheBeatles Exercise 3.3.2. Find all equilibrium solutions of the predator-prey model:

dP

dt= P

�1� P

�� 10PR

dR

dt= � 1

27R+

1

9PR.

Have Sage plot the vector field for the system in a neighborhood of eachequilibrium. Determine which equilibria look stable and which appear to beunstable.

Finally, have Sage construct a numerical approximation of the solutionhaving initial conditions (P

0

, R0

) = (.5, .5).

92 CHAPTER 3. INTRODUCTION TO FIRST-ORDER SYSTEMS

1.

-4 -3 -2 -1 0 1 2 3 4 5

-3

-2

-1

1

2

3

2.

-4 -3 -2 -1 0 1 2 3 4 5

-3

-2

-1

1

2

3

3.

-4 -3 -2 -1 0 1 2 3 4 5

-3

-2

-1

1

2

3

4.

-4 -3 -2 -1 0 1 2 3 4 5

-3

-2

-1

1

2

3

5.

-4 -3 -2 -1 0 1 2 3 4 5

-3

-2

-1

1

2

3

6.

-4 -3 -2 -1 0 1 2 3 4 5

-3

-2

-1

1

2

3

7.

-4 -3 -2 -1 0 1 2 3 4 5

-3

-2

-1

1

2

3

8.

-4 -3 -2 -1 0 1 2 3 4 5

-3

-2

-1

1

2

3

9.

-4 -3 -2 -1 0 1 2 3 4 5

-3

-2

-1

1

2

3

Figure 3.1.6: Parametric curves corresponding to the functions in Exercise3.1.1. MatchParametric

3.3. THE INITIAL VALUE PROBLEM FOR SYSTEMS 93

1.

0 4 8 12 16 20 24 28 32 36 40 44 48

-2.5

0

2.5

5

2.

0

0.4

0.8

1.2

1.6 2

2.4

2.8

3.2

3.6 4

4.4

4.8

-0.8

-0.4

0

0.4

0.8

1.2

1.6

2

3.

0 4 8 12 16 20 24 28 32 36 40 44 48

-3

-2

-1

0

1

2

3

4.-10

-7.5 -5

-2.5 0

2.5 5

7.5 10

0

2.5

5

7.5

10

12.5

15

5.

-10

-7.5 -5

-2.5 0

2.5 5

7.5 10

0

2.5

5

7.5

10

12.5

15

Figure 3.2.1: Graphs of the functions x(t) and y(t) Graphs

94 CHAPTER 3. INTRODUCTION TO FIRST-ORDER SYSTEMS

1.

-4 -3 -2 -1 0 1 2 3 4 5

-3

-2

-1

1

2

3

2.

-4 -3 -2 -1 0 1 2 3 4 5

-3

-2

-1

1

2

3

3.

0 0.4 0.8 1.2 1.6 2 2.4 2.8 3.2 3.6 4 4.4 4.8

0.8

1.6

2.4

3.2

4

4.8

4.

-4 -3 -2 -1 0 1 2 3 4 5

-3

-2

-1

1

2

3

5.

0 1 2 3 4 5 6 7 8 9 10

-5

-2.5

2.5

5

Figure 3.2.2: Phase diagrams showing the trajectories (x(t), y(t)). PhaseDiagrams