Math 24, Ordinary Differential Equations UCSC Summer Session II

advertisement
Math 24, Ordinary Differential Equations
UCSC Summer Session II, 2003
Instructor: José Agapito
Phase Portrait, ~x0 = A~x, case detA = 0
If detA = 0, then at least one eigenvalue is zero. There are basically three cases to study. This does not
mean that a matrix with determinant equal to zero is going to be one of these cases but its reduced echelon
matrix will be similar to one of the matrices to be shown below or a combination of them.
I) Real and distinct eigenvalues λ1 = α 6= 0, λ2 = 0
A=
µ
α 0
0 0
¶
x01 = αx1
x02 = 0
Equilibrium points. Solve simultaneously αx1 = 0 and 0 = 0. We obtain that x1 = 0. This means that
each point on the line x1 = 0 is an equilibrium point. At any other point (x1 , x2 ), there is no vertical
direction (x02 = 0). Therefore, the phase portrait has a vertical line of equilibrium points and horizontal
arrows pointing towards or away from that vertical line. This will depend on the sign of α. Positive sign
means pointing outwards, negative sign means pointing inwards.
To find the general solution to this system, we have a short way and a long way. Let’s do it the long way.
First, we compute the eigenvectors corresponding to these eigenvalues; i.e. you solve for (u1 , u2 ) in the
system
µµ
¶
µ
¶¶ µ
¶ µ ¶
1 0
u1
α 0
0
(A − λI)~u = ~0 ⇐⇒
−λ
=
0 0
0 1
u2
0
µ
¶µ
¶ µ ¶
0 0
u1
0
=
à u2 = 0, u1 is free. We can then pick, for instance, ~v1 = (1, 0)
λ1 = α :
0 −α
u2
0
as an eigenvector corresponding to λ1 .
µ
¶µ
¶ µ ¶
α 0
u1
0
=
à u1 = 0, u2 is free. We can then pick, for instance, ~v2 = (0, 1)
λ1 = α :
0 0
u2
0
as an eigenvector corresponding to λ2 .
Now, the general solution to the system above is
µ ¶
µ ¶ µ
¶
1
0
c1 eλt
αt
0t
~x(t) = c1 e
+ c2 e
=
.
0
1
c2
What is the short way?
II) Both eigenvalues are zero λ1 = 0, λ2 = 0
A=
µ
0 0
0 0
¶
x01 = 0
x02 = 0
Then, all points are equilibrium points. The general solution is (again, using the long way)
µ ¶
µ ¶ µ
¶
1
0
c1
0t
0t
~x(t) = c1 e
+ c2 e
=
.
0
1
c2
What is the short way?
III) Both eigenvalues are zero, but A is nilpotent λ1 = 0, λ2 = 0
A=
µ
0 1
0 0
¶
x01 = x2
x02 = 0
Equilibrium points. Solve simultaneously x2 = 0 and 0 = 0. We obtain that x1 = 0. This means that each
point on the line x2 = 0 is an equilibrium point. At any other point (x1 , x2 ), there is no vertical direction
(x02 = 0). Therefore, the phase portrait has a horizontal line of equilibrium points and horizontal arrows
pointing left or right depending whether they are above or below x2 = 0.
To find the general solution to this system, we have a short way and a long way. Let’s do it the long way.
Again, we compute the eigenvectors corresponding to these eigenvalues; i.e. you solve for (u1 , u2 ) in the
system
µ
¶µ
¶
µ ¶
0 1
u1
0
=
à u2 = 0, u1 is free. We can then pick, for instance, ~v1 = (1, 0) as an
0 0
u2
0
eigenvector corresponding to λ1 = λ2 = 0. There is no way to compute a second non parallel eigenvector
~v2 . In this case, one computes what is called a generalized eigenvector. That is, one looks for a solution to
the system
(A − λI)~v2 = ~v1 .
We find that ~v2 can be taken to be (0, 1). Then, the general solution is
µ ¶
·
µ ¶
µ ¶¸ µ
¶
1
1
0
c1 + c2 t
0t
0t
0t
~x(t) = c1 e
+ c2 te
+e
=
0
0
1
c2
What is the short way?
Math 24 - Ordinary Differential Equations
Instructor: José A. Agapito Ruiz
e-mail: jarpepe@math.ucsc.edu
Summer Session II - 2003 (July 28 - August 29)
Review Midterm
The following problems have been taken from the textbook and the reference book. For your convenience, I
have written them down explicitly. They are mostly homework, supplementary and miscellaneous problems,
some of them have been slightly modified to fit better our purposes. You should also review your class notes
to complement your preparation and be in better shape for the midterm. You will find the answers to these
problems generally at the back of the two books mentioned. This said, here is a beautiful way of explaining
what I expect from you here, in the midterm, homework and in the final project1 : “In working out your
solutions, pretend you and I are having a discussion and that your job is to convince me, with an argument
that is neither longer nor shorter than necessary, of the correctness of your position. If the right answer is 3
it is never enough to say “3”, but brevity will be rewarded”.
1. Consider the initial value problem
3
y 0 − y = 3t + 2et ,
2
y(0) = yo .
Find the value of yo that separates solutions that grow positively as t → ∞ from those that grow negatively. How does the solution that corresponds to this critical value of yo behave as t → +∞?
2. Show that if a and λ are positive constants, and b is any real number, then every solution of the equation
y 0 + ay = be−λt
has the property that y → 0 as t → +∞. Hint: Consider the cases a = λ and a 6= λ separately.
3. Solve the given differential equation by first, using the method of integrating factor and then, using
variation of parameters.
y 0 − 2y = t2 e2t .
4. Consider the intial value problem
y 0 = ty
(4 − y)
,
3
y(0) = yo .
(a) Determine how the behavior of the solution as t increases depends on the initial value yo .
1 “Introduction
to Bayesian Statistics”, by David Draper, graduate course at UCSC, Winter 2003.
1
(b) Suppose that yo = 0.5. Find the time T at which the solution first reaches the value 3.98.
5. Consider the equation
dy
4x + 3y
=−
.
dx
2x + y
(a) Show that the given equation is homogeneous.
(b) Solve the differential equation.
(c) Draw a direction field and some integral curves. Are they symmetric with respect to the origin?
6. Without solving the problem, determine an interval in which the solution of the given initial value
problem is certain to exist:
(4 − t2 )y 0 + 2ty = 3t2 , y(−3) = 1.
7. (a) Verify that both y1 = 1 − t and y2 (t) = −t2 /4 are solutions of the initial value problem
y0 =
−t + (t2 + 4y)1/2
,
2
y(2) = −1.
Where are these solutions valid?
(b) Explain why the existence of two solutions of the given problem does not contradict the uniqueness
part of Theorem 2.4.2 in the textbook.
(c) Show that y = ct + c2 , where c is an arbitrary constant, satisfies the differential equation in part (a)
for t ≥ −2c. If c=-1, the initial condition is also satisfied, and the solution y = y1 (t) is obtained. Show
that there is no choice of c that gives the second solution y = y2 (t).
8. Sketch the graph of f (y) versus y. Determine the critical (equilibrium) points, and classify each one as
asymptotically stable, unstable, or semistable.
dy
= y(1 − y 2 ),
dt
−∞ < yo < +∞.
9. Construct a direction field for the differential equations:
(a) y 0 = 2y − x.
(b) y 0 = t2 + y 2 − 1.
(c) v 0 = u/2.
(d) x0 = 5x(x − 1).
10. Consider the equation un+1 = ρun (1 − un ), where ρ > 1.
(a) Draw a qualitatively correct stairstep diagram and thereby show that if uo < 0, then un → −∞ as
n → +∞.
(b) In a similar way determine what happens as n → +∞ if uo > 1.
11. Solve the following differential equations and initial value problems:
(a)
dy
x3 − 2y
=
.
dx
x
2
(b) (x + y)dx + (x + 2y)dy = 0,
y(2) = 3.
3
dy
y
, y(0) = 1.
=
dx
1 − 2xy 2
(d) ẍ − 20ẋ + 64x = 0, x(0) = 1, ẋ(0) = 0.
(c)
(e) ẍ − 10ẋ + 25x = 0,
(f) ẍ + ẋ + 2x = 0,
x(−2) = 0, ẋ(−2) = 0.
x(1) = 0, ẋ(1) = 1.
3
Math 24 - Ordinary Differential Equations
Instructor: José A. Agapito Ruiz
Summer Session II - 2003 (July 28 - August 29)
Solution to some Review Midterm problems
3
1. Using variation of parameters, assume y = ϕe 2 t . Then
3
3
3
(ϕ0 e 2 t + 23 ϕe 2 t ) − 23 ϕe 2 t = 3t + 2et .
From here,
1
3
ϕ0 = 3te− 2 t + e− 2 t ,
which leads to
Z
Z
ϕ
=
3te
− 23 t
1
2e− 2 t dt + C
dt +
1
3
3
= −2te− 2 t − 34 e− 2 t − 4e− 2 t + C
Therefore,
3
3
1
3
y(t) = (−2te− 2 t − 34 e− 2 t − 4e− 2 t + C)e 2 t
Using the initial condition,
y0 = − 34 − 4 + C
−→
C = y0 +
which yields to
y(t)
16
3 ,
3
2t
= −2t − 34 − 4et + (y0 + 16
3 )e
³
3
4et
= e 2 t − 2t3 t − 4/3
3t −
3 t + (y0 +
e2
As t → +∞, the solution y(t) → +∞ if yo +
yo = − 16
3 .
e2
16
3
e2
16
3 )
´
> 0; y(t) → −∞ if yo +
16
3
< 0 and y(t) → −∞ if
♠
2. Case 1 (a = λ)
y 0 + λy = be−λt .
Using, for instance, variation of parameters,
y = (bt + C)e−λt .
Case 2 (a 6= λ)
y 0 + ay = be−λt .
In this case,
y=
b
−λt
a−λ e
+ Ce−at .
Since λ and a are positive constants, the solution y(t) → 0 as t → +∞ in both cases.
1
♠
4. Consider the intial value problem
y 0 = ty
(4 − y)
,
3
y(0) = yo .
(a) First of all, right away we can see that there are two equilibrium solutions; namely y = 0 and y = 4.
Now, assume y 6= 0 and y 6= 4. Using separable equations, we get
Z
Z
t
1
dy =
dt
y(4 − y)
3
µZ
1
4
Z
¶
=
t2
+C
6
¯
¯
¯ y ¯
¯
ln ¯¯
4 − y¯
=
2 2
t +C
3
y
4−y
=
Ce 3 t
1
dy +
4−y
1
dy
y
2 2
2 2
y
Using the initial condition,
y0 =
4C
1+C
−→
=
C=
4Ce 3 t
2 2
1 + Ce 3 t
y0
4 − y0 .
Therefore, we can write the solution y(t) as
y(t) = ³
4−y0
y0
´
4
2 2
e− 3 t + 1
.
Conclusion. If y0 = 4, we stay there forever because y(t) = 4 is an equilibrium. If y0 = 0, we stay
there forever again because y(t) = 0 is also an equilibrium. Assuming y0 6= 0 and y0 6= 4, regardless
the value of y0 , the solution y(t) → 4 as t → ∞.
♠
(b) Suppose that yo = 0.5. After a simple evaluation in the formula above and solving for T in
y(T ) = 3.98, we obtain T ≈ 3.296.
♠
5. Consider the equation
4x + 3y
dy
=−
.
dx
2x + y
(a) This equation is homogeneous in the sense that if we divides the right hand side by x, we get
y
4 + 3x
dy
.
=−
dx
2 + xy
That is, the right hand side is a function depending on
2
y
x
only.
♠
(b) Setting v = xy , we solve the corresponding differential equation derived from the original one ,
−
v 2 + 5v + 4
dv
=x ,
v+2
dx
provided v 6= −2 and x 6= 0. Furthermore, suppose v 6= −1, −4. Then
Z
Z
v+2
1
dx
dv = −
(v + 4)(v + 1)
x
and so
2
3
ln |v + 4| +
1
3
ln |v + 1| = − ln |x| + C.
Simplifying and writing at the end everything in terms on x and y, this can be written as
|y + x| |y + 4x|2 = C
where C, as usual, is an arbitrary constant.
♠
(c) Warning. If you use the mathematical visualization toolkit to get an sketch of the direction field
and some integral curves for this differential equation, you will get a nonsense answer. You’d better
dy
dy
= 0 and where dx
does not exist.
off sketching the graph by hand. Hint: Find the points where dx
You will have 4 regions to analize in the plane XY. You should get symmetric integral curves with
respect to the origin.
♠
6. First, we write
(4 − t2 )y 0 + 2ty = 3t2 ,
in standard form. This is
y0 +
y(−3) = 1
3t2
2t
y=
,
2
(4 − t )
(4 − t2 )
y(−3) = 1.
For this to make sense, t 6= ±2. Then, I have three intervals to consider: (−∞, −2), (−2, 2) and (2, +∞).
I take the one containing the initial point t0 = −3; namely (−∞, −2).
♠
7. (a) y1 = 1 − t.
−1 = y10
=
=
−t +
√
t2 + 4 − 4t
2
−t + |t − 2|
2
( −t+t−2
=
2
if t − 2 ≥ 0
−t−t+2
2
if t − 2 < 0
Clearly, the first branch of the expression above is the one that satisfies the differential equation with
the initial condition y(2) = −1. This is solution is valid for t ≥ 2.
2
y2 = − t4 .
− 2t = y20
−t +
=
q
2
t2 + 4(− t4 )
2
= − 2t
3
Here, the initial condition is easily verified. This solution is valid for any t ∈ R.
♠
√2
−t+ t +4y
1
and so fy (t, y) = t2 +4y
. This shows that fy is not continuous at
(b) Notice that f (t, y) =
2
(2, −1); therefore, it does not contradict the uniqueness part of Theorem 2.4.2 in the textbook.
♠
(c) y = ct + c2 .
c=y
0
=
=
=
−t +
√
t2 + 4ct + 4c2
2
−t + |t + 2c|
2
( −t+t+2c
2
if t + 2c ≥ 0
−t−t−2c
2
if t + 2c < 0
Clearly, we need to choose the first branch in the expression above to get the equality claimed. Then,
t ≥ −2c. If c = −1, the initial condition is also satisfied and the solution y = y1 is obtained. If y = y2 ,
this yields to t = −2c. But c is meant to be a constant! Therefore, there is no choice of c that gives the
second solution y = y2 .
♠
8. Use the mathematical visualization toolkit (MVT) or any other graphing device to plot f (y) = y(1 − y 2 )
versus y. Using analisis of phase diagrams as done in class, you have that y = −1 is asymptotically
stable, y = 0 is unstable and y = 1 is also asymptotically stable.
♠
9. Use the MVT or any other graphing device to check your plots. The plots obtained with the MVT are
correct.
♠
11. (c) Forget about this differential equation.
♠
4
Math 24, Ordinary Differential Equations
UCSC Summer Session II, 2003
Instructor: José Agapito
Midterm
Name:
Solution
All 6 questions should be answered on this exam using
the backs of the sheets if necessary. Show all your work
and justify your answers clearly. Be neat.
Do your best!!
^
1
2
3
4
5
6
neat work
Total
/5
/20
/15
/20
/20
/15
/5
/100
1. (5 points) For each of the questions below, indicate if the statement is true or false. Only here, you
do not need to justify your answer. Each correct answer is worth 1 point.
a
b
c
d
e
F
F
T
F
T
(a) The differential equation y 0 + y = y 2 is linear. A first order linear differential equation is of the
form y 0 + p(t)y = g(t).
(b) A second order linear differential equation is homogeneous if it has constant coefficients. A
second order linear differential equation is of the form y 00 + p(t)y 0 + q(t)y = g(t). For this to be
homogeneous, g(t) ≡ 0.
(c) For the differential equation y 0 = t/2, y(t) = 0 is not an equilibrium solution. An equilibrium
solution to a differential equation is of the form y(t) = c, for any t ∈ R.
(d) Given a first order linear differential equation with an initial point, the method of integrating
factor and variation of parameters yield two different solutions. They both produce the same
answer provided the hypotheses of the fundamental theorem of ordinary differential equations
hold (Theorem on the existence and uniqueness of solutions to IVP).
(e) The problem y 0 = 5t(t − 1), y(to ) = yo has a unique solution. Setting f (t, y) = 5t(t − 1), we can
see that both f and fy are continuous on R2 . Therefore, for any initial condition, this problem
has a unique solution.
2. Let α > 1. Suppose y(t) is the solution to a given initial value problem (I.V.P) Where is this solution
valid? Identify the second order linear differential equation that originated the solution y(t) and
describe the behavior of y(t) as t → +∞, t → −∞ and t → 0.
a) (10 points) y(t) = −2eαt + 3e(α−1)t .
First, there is no restriction to impose on t in the solution y(t) described above. Then, this
solution is valid in R. Second, since α is a real number (α > 1) and y(t) is a linear combination
of eαt and e(α−1)t , its corresponding characteristic equation is (r − α)(r − (α − 1)) = 0, which
yields to the homogeneous differential equation
y 00 − (2α − 1)y 0 + α(α − 1)y = 0
Finally, notice that we can also write y(t) as y(t) = eαt (−2 + 3e−t ). Then
lim eαt (−2 + 3e−t ) = −∞
t→+∞
and
,
lim −2eαt + 3e(α−1)t = 0
t→−∞
lim −2eαt + 3e(α−1)t = 1.
t→0
b) (10 points) y(t) = 2eαt − 3e(α−1)t .
First, there is no restriction to impose on t in the solution y(t) described above. Then, this
solution is valid in R. Second, since α is a real number (α > 1) and y(t) is a linear combination
of eαt and e(α−1)t , its corresponding characteristic equation is (r − α)(r − (α − 1)) = 0, which
yields to the homogeneous differential equation
y 00 − (2α − 1)y 0 + α(α − 1)y = 0
Finally, notice that we can also write y(t) as y(t) = eαt (2 − 3e−t ). Then
lim eαt (2 − 3e−t ) = +∞
t→+∞
and
,
lim 2eαt − 3e(α−1)t = 0
t→−∞
lim 2eαt − 3e(α−1)t = −1.
t→0
3. (15 points) Define a second order difference equation. Give an example. How do you find equilibrium
solutions of a second order difference equation? Hint: Get a clue from first order difference equations.
A second order difference equation is an expression of the form yn+1 = f (n, yn , yn−1 ), where n denotes
a natural number. In other words, yn+1 depends, in general, on n, yn and yn−1 , and this dependence
may be linear or not. An example is
yn+1 = yn − yn−1 .
If there is an equilibrium, then there is a n̄ such that for any n > n̄, yn+1 = yn holds. Using this last
equation is how you find equilibrium solutions.
4. Consider the differential equation y 0 + y = y 2 .
a) (10 points) Find all possible solutions to this equation.
2
We can write y 0 + y = y 2 as dy
dt = y − y. Notice that if y = 0 or y = 1, the differential equation
is satisfied. Therefore, they are equilibrium solutions. Now, suppose y 6= 0 and y 6= 1, then
¶
µ
1
1
dy
= dt ⇐⇒
+
dy = dt.
y2 − y
y−1 y
Integrating both sides, we get
ln |y − 1| − ln |y| = t + C,
where C is an arbitrary constant. Now, we exponentiate both sides and get rid of the absolute
value in the left hand side by allowing our arbitrary constant to take negative values too. Then,
y−1
= Cet .
y
We solve for y(t) and get
y(t) =
(1)
1
1 − Cex
(2)
In summary, all possible solutions are y(t) = 0, y(t) = 1 and y(t) as in (2).
b) (5 points) Classify the equilibrium solutions as asymptotically stable, unstable, or semistable.
The diagram below shows that y = 0 is asymptotically stable and y = 1 is unstable.
-
+
0
+
1
Figure 1: Phase diagram of y 0 + y = y 2 .
c) (5 points) Suppose y(0) = 2. Determine y(t) explicitly.
Using Formula (2), we find C = 12 . Therefore, the explicit solution y(t) with the given initial
condition y(0) = 2 is
1
.
y=
1 − 21 et
5. Solve
x2 + y 2
dy
=−
.
dx
2xy − y
We can write the given differential equation as
a) (10 points)
(2xy − y)dy + (x2 + y 2 )dx = 0.
Setting M = x2 + y 2 and N = 2xy − y, we find that My = 2y and Nx = 2y. Therefore, our
differential equation is exact. This means that there exists a function ψ defined on some open
rectangle such that dψ = (2xy − y)dy + (x2 + y 2 )dx. Therefore, we have
ψx = x2 + y 2
and ψy = 2xy − y.
Let us integrate with respect to x; we get
ψ=
x3
+ y 2 x + h(y).
3
And now, let us differentiate ψ with respect to y and use the formula for ψy above, to get
2xy − y = ψy = 2xy +
d
h(y)
dy
d
h(y) = −y.
dy
=⇒
2
Integrating with respect to y we obtain h(y) = − y2 + C. We can choose the constant C to be
zero, there is no harm. In summary, we have
ψ=
y2
x3
+ y2x −
= K,
3
2
where K is an arbitrary constant. This is so because dψ = 0 on an open rectangle. You can
also write
k − 2x3
.
y2 =
6x − 3
b) (10 points) y 00 + 2y 0 + 3y = 0,
y(0) = 1, y 0 (0) = 0.
2
The characteristic equation
√ of this differential equation is r + 2r + 3 = 0. Using the quadratic
formula, we get r = −1 ± 2i. Therefore, the general solution to this homogeneous equation is
√
√
y(t) = C1 e−t cos 2t + C2 e−t sin 2t.
Using the initial conditions we obtain the system
1 = C1
and
0 = −1 +
√
2C2 .
In summary, the solution to this initial value problem is
³
√
√
√ ´
y(t) = e−t cos 2t + 22 sin 2t .
6. Direction fields.
a) (5 points) Does the plot below correspond to an autonomous or non-autonomous differential
equation? Why?
First, the vertical axis corresponds to the dependent variable, say y, and the horizontal to
Figure 2: Plot y vs. t
the independent one, say t, as usual. Thus, we have the plot of the direction field of a nonautonomous differential equation, because the directions (denoted by the arrows) for a given
value of y change as t varies.
b) (10 points) Construct a direction field for y 0 = t2 − y.
Figure 3: Plot y vs. t
Math 24 - Ordinary Differential Equations
Instructor: José A. Agapito Ruiz
e-mail: jarpepe@math.ucsc.edu
Summer Session II - 2003 (July 28 - August 29)
Final
You are free to use any combination of paper/pencil and/or packages like Mathematica, Maple or Matlab for
calculations, graphs, reports, etc. If you know LaTeX, feel free to use it to present your final work. However
you decide to present your work, please be always neat and clear. Remember, in preparing your solutions,
keep in mind the style I mentioned last time as a guide: your job is to convince me, with an argument that
is neither longer nor shorter than necessary, of the correctness of your position. If the right answer is 3 it is
never enough to say “3”, but brevity will be rewarded.
1. (a) Find the general solution of the given system of equations and describe the behavior of the solution
as t → ∞. Also draw a direction field and plot a few trajectories of the system. Remember to justify
your work.
0
(i) ~x =
1 −2
3 −4
0
~x,
(ii) ~x =
1
2
−5 −1
~x,
0
(iii) ~x =
−3
− 52
5
2
2
~x
(b) Solve the given value problem and describe the behavior of the solution as t → ∞.


1 1 2
~x0 =  0 2 2  ~x,
−1 1 3


2
~x(0) =  0 
1
(c) Find the general solution of the given system of equations
x01
= − 45 x1 + 43 x2 + 2t
x02
=
3
4 x1
− 54 x2 + et
2. (Taken from The Boston University Ordinary Differential Equations Project. This is the default
project) Here you will study a nonlinear, first-order system known as the Predator-Prey model. The
equations are
dx
= (9 − αx − 3y)x
dt
dy
= (−2 + x)y
dt
where α ≥ 0 is a parameter. In other words, for different values of α we have different systems. The
variable x is the population (in some scaled units) of prey (rabbits), and y is the population of predators
(foxes). For a given value of α, we want to understand what happens to these populations as t → ∞.
1
Your job is to investigate the phase portraits of these equations for various values of α in the interval
0 ≤ α ≤ 5. To get started, you might want to try α = 0, 1, 2, 3, 4 and 5. Think about what the phase
portrait means in terms of the evolution of the x and y populations. Where are the equilibrium points?
What types are they? What happens to a typical solution curve? Also, consider the behavior of the
special solutions where either x = 0 or y = 0 (that is, solution curves lying on the x- or y-axes).
Determine the bifurcation values of α. Namely, determine the values of α where nearby α’s lead to
different behaviors in the phase portrait. For example, α = 0 is a bifurcation value because, for α = 0,
the long term behavior of the populations is dramatically different from the long term behavior of the
populations if α is slightly positive. (Hint: If the type of an equilibrium point changes at a certain value
of α, then that value of α may be a bifurcation value.)
After you have determined all of the bifurcation values for α in the interval 0 ≤ α ≤ 5, study enough
specific values of α to be able to discuss all of the various population evolution scenarios for these systems.
In your report, you should describe these scenarios using the phase portraits, tx- and ty-graphs. Give an
interpretation of your graphs in terms of the populations. Fundamental calculations should be included
in your essay. Your report should include:
a) A brief discussion of the significance of the various terms in the system. For example, what does
the 9 represent? What does the 3y term represent?
b) A discussion of all bifurcations including the bifurcation at α = 0. What does these bifurcations
mean for the predator population?
c) All fundamental calculations.
You may provide as many illustrations from the computer or your personal art work as you wish, but the
relevance of each illustration must be explained in your report. To get further information on nonlinear
system analysis (using Mathematica) click here.
3. (Extra credit) Solve Problem 18 of Section §7.8 of the textbook. Those of you that did not do well in
the midterm may want to solve this problem for sure.
2
final.nb
Instructor: José Antonio Agapito Ruiz
UCSC Summer Session II, 2003
Math 24
Ordinary Differential Equations
Final Solution
This report does not contain full answers to all questions of the final. Instead, you will find the final is used as an excuse
to get more familiar with Mathematica, version 4.2. Not only some relevant Mathematica code is included but also the
use of notebooks and some of its nice features is shown. At the same time, I use Problem 1 and 2 to clarify some
concepts to you. I hope you will find this useful.
Problem 1.
(a) Find the general solution of the given system of equations and describe the behavior
of the solution as t
. Also draw a direction field and plot a few trajectories of the
system. Remember to justify your work.
i x'
1
3
2
4
x;
Clear a
1
2
a
;
3
4
len Length a ;
IdentityMatrix len
Solve Det a
2 ,
0,
1
Extra. Of course, you can use built-in commands to perform desired computations. Here are some examples.
Eigenvalues a
2,
1
1
Printed by Mathematica for Students
final.nb
Eigensystem a
this command gives eigenvalues in the first column
and its corresponding eigenvectors in the second column
2,
1 ,
2, 3 , 1, 1
CharacteristicPolynomial a,
2
2
3
To find the general solution we type
eq
sol
x1 ' t
x1 t
2 x2 t , x2 ' t
DSolve eq, x1 t , x2 t , t
x1 t
x2 t
2t
3
2
2t
t
3
C 1
C 1
t
1
3 x1 t
2t
2
t
1
2t
3
2
t
4 x2 t
;
C 2 ,
C 2
It is very instructive to compare this answer with the one we can obtain right away from simple inspection by just
looking at the eigenvalues and eigenvectors of the coefficient matrix a. The straightforward answer is
x t
C1 e
2t
2
3
C2 e
t
1
,
1
(1)
where C1 and C2 are arbitrary constants. You may want to apply the commands Simplify or FullSimplify to the answers
given by Mathematica for x1 and x2 to get simpler expressions. I did that but I got the same answers as before
FullSimplify sol
x1 t
x2 t
2t
2t
2
3
3
1
t
t
C 1
C 1
2
1
3 2
t
t
C 2
C 2
,
So, (since I don't know at the moment any other way to do it with Mathematica), I performed the simplification by
hand and obtained
xt
C2
C1 e
2t
2
3
3 C1
3 C2 e
t
1
,
1
which is equivalent to the expression we obtained in (1). Remember, C1 and C2 are arbitrary constants.
Finally, we draw a direction field and plot a few trajectories of the system for different initial conditions.
2
Printed by Mathematica for Students
final.nb
Clear a, b, eq, sol
eq
x1 ' t
x1 t
2 x2 t , x2 ' t
3 x1 t
4 x2 t
sol DSolve Join eq, x1 0
a, x2 0
b ,
x1 t , x2 t , t
FullSimplify
x1 t
x2 t
2t
2t
2a
b 3
2b
2 t
3a 2b
3a
1
t
;
,
t
We let a vary from -12 to 12 in steps of 2, and then we give b first the value 30 and then the value -30:
Clear solset
solset Table sol 1 , a, 12, 12, 2 ;
Map ParametricPlot Evaluate x1 t , x2 t
. solset . b
t, 0, 6 , PlotStyle AbsoluteThickness 0.25 ,
DisplayFunction Identity &, 30, 30 ;
Show %, DisplayFunction $DisplayFunction ;
30
20
10
-20
-10
10
-10
-20
-30
These trajectories are
not spiral. We can also plot a direction field:
3
Printed by Mathematica for Students
20
# ,
final.nb
Clear sol
sol DSolve Join eq, x1 0
10, x2 0
20 , x1 t , x2 t , t ;
Needs "Graphics`PlotField`"
Block $DisplayFunction Identity , g1 PlotVectorField
u 2 v, 3 u 4 v , u, 20, 20 , v, 20, 20 , PlotPoints 11 ;
. sol , t, 0, 6
;
g2 ParametricPlot Evaluate x1 t , x2 t
Show g1, g2, Axes True, AxesLabel
"x1 ", "x2 " ;
x2
20
10
-20
-10
10
x1
20
-10
-20
Remark. Since both eigenvalues
1 and
2
of this system are negative, we know that the equilibrium 0, 0 is a
node. Therefore, in the phase portrait, trajectories are converging to the equilibrium tangent to the phase line
whose direction is the eigenvector v2
the general solution (1) when letting t
(ii) x '
1
5
2
1
1, 1 that corresponds to the eigenvalue
). The plots above confirm this.
x;
Clear a
1
2
a
;
5
1
len Length a ;
Solve Det a
IdentityMatrix len
3
,
0,
3
4
Printed by Mathematica for Students
2
1 (we can see this from
final.nb
Eigensystem a
3 ,3
,
1
3 ,5 ,
1
3 ,5
The general solution is
Clear eq, sol
eq
x1 ' t
x1 t
2 x2 t , x2 ' t
sol DSolve eq, x1 t , x2 t , t
1
6
x1 t
1
3
5
6
3
3
t
t
3
t
6
t
6
1
1
6
t
1
2
5 x1 t
6
2
x2 t
t
;
C 1
C 2 , x2 t
1
6
C 1
3
6
t
2
1
2
6
t
C 2
These formulae can be written as
xt
C1 e
1
3 t
3
5
t
C2 e3
1
3
5
,
(2)
where C1 and C2 are arbitrary constants. We can also write the general solution of the system (ii) in terms of a different
set of fundamental solutions, by simply taking the real and imaginary parts of the corresponding fundamental solutions
shown in (2). Namely,
FullSimplify sol
x1 t
C 1 Cos 3 t
x2 t
C 2 Cos 3 t
1
3
1
3
Recall, if the matrix of coefficients were
C 1
5C 1
2C 2
Sin 3 t ,
C 2
Sin 3 t
then the general solution is of the form
xt
C1 e
t
Cos t
Sin t
C2 e
t
Sin t
,
Cos t
(3)
where and are the real and imaginary parts of the complex eigenvalue
. The nice feature about formula
0 or spirals
(3) is that we can easily see that its corresponding phase portrait consists of circular trajectories if
otherwise. In our case, we don't have this standard matrix , but we can say that the phase trajectories of system (ii) are
closed curves already since we do have
0 . In fact, we can write the expressions for x1 and x2 obtained above with
Mathematica as
5
Printed by Mathematica for Students
final.nb
xt
1
3
Cos3t
x t
5
3
C1
Sin3t
Sin3t
Cos3t
5
3
1
3
Sin3t
Sin3t
2
3
Sin3t
1
3
Cos3t
C2
C1
,
C2
Sin3t
2
3
Cos3t
(4)
Sin3t
1
3
Sin3t
.
One can show from here that phase trajectories of system (ii) are ellipses.
Now, we draw a direction field and plot a few trajectories of the system for different initial conditions.
Clear a, b, eq, sol
eq
x1 ' t
x1 t
2 x2 t , x2 ' t
a, x2 0
sol DSolve Join eq, x1 0
x1 t , x2 t , t
FullSimplify
x1 t
a Cos 3 t
x2 t
b Cos 3 t
1
3
1
3
a
5a
5 x1 t
b ,
x2 t
;
2 b Sin 3 t ,
b Sin 3 t
We let a vary from -12 to 12 in steps of 2, and then we give b first the value 30 and then the value -30:
Clear solset
solset Table sol 1 , a, 12, 12, 2 ;
Map ParametricPlot Evaluate x1 t , x2 t
. solset . b
t, 0, 6 , PlotStyle AbsoluteThickness 0.25 ,
DisplayFunction Identity &, 30, 30 ;
Show %, DisplayFunction $DisplayFunction ;
40
20
-20
-10
10
-20
-40
A plot of a phase trajectory and the direction field can be obtained as follows
6
Printed by Mathematica for Students
20
# ,
final.nb
Clear sol
sol DSolve Join eq, x1 0
10, x2 0
20 , x1 t , x2 t , t ;
Needs "Graphics`PlotField`"
Block $DisplayFunction Identity , g1 PlotVectorField
u 2 v, 5 u v , u, 20, 20 , v, 20, 20 , PlotPoints 11 ;
. sol , t, 0, 6
;
g2 ParametricPlot Evaluate x1 t , x2 t
Show g1, g2, Axes True, AxesLabel
"x1 ", "x2 " ;
x2
20
10
-20
-10
10
20
x1
-10
-20
Remark. Since the eigenvalues of this system are complex and conjugate with real part equal to zero, the
equilibrium 0, 0 is a
center (notice also that by definition
0, 0 is
not a hyperbolic point). As t
,
solutions stay bounded. The plots above confirm this. Finally, when plotting by hand your phase portrait,
always try some points to get the right direction.
(iii) x '
3
5
2
5
2
2
x;
7
Printed by Mathematica for Students
final.nb
Clear a
a
3
5
2
5
2
2
;
len Length a ;
Solve Det a
IdentityMatrix len
1
,
2
0,
1
2
Eigensystem a
1
,
2
1
,
2
1, 1 , 0, 0
We know that 0, 0 is not an eigenvector. This tells us that we need a generalized eigenvector to be able to write down
the general solution. First, let's see what Mathematica gives us.
Clear eq, sol
eq
x1 ' t
sol
DSolve eq, x1
1
2
5
2
x1 t
x2 t
5
3 x1 t
2
5t C 1
5
2
tC 1
1
2
2
t 2
t 2
5
x2 t , x2 ' t
2
t , x2 t , t
t 2
x1 t
2
t 2
2 x2 t
;
tC 2 ,
5t C 2
FullSimplify sol
x1 t
x2 t
1
2
1
2
t 2
2
t 2
5tC 1
5t C 1
5tC 2
2
,
5t C 2
We can write this as
x t
If we let C2
2 C1 and then set K1
C1 e
t
2
1
0
5
2
5
2
C1 and K2
xt
K1 e
t
2
C2
5
2
C1 te
t
2
1
1
C2 e
t
2
0
.
1
C1 , we get
1
1
K2 te
t
2
1
1
e
t
2
0
2
5
.
8
Printed by Mathematica for Students
(5)
final.nb
This is the form of the general solution we can get by hand, where 0,
solution to the equation
A
In our case, v1
1
I v2
2
5
is the generalized eigenvector obtained as a
v1 .
1, 1 is the eigenvector corresponding to the eigenvalue
1
1
2
and v2 is a generalized eigenvector.
Now, we draw phase trajectories and the direction field corresponding to this system.
Clear a, b, eq, sol
eq
x1 ' t
5
3 x1 t
2
sol DSolve Join eq, x1 0
TableForm FullSimplify sol
x1 t
1
2
t 2
a 2
5t
5
x2 t , x2 ' t
a, x2 0
5bt
b
x2 t
x1 t
2 x2 t ;
2
, x1 t , x2 t , t ;
1
2
t 2
5at
b 2
We let a vary from -6 to 6 in steps of 3, and then we give b first the value 10 and then the value -10:
Clear solset
solset Table sol 1 , a, 6, 6, 3 ;
Map ParametricPlot Evaluate x1 t , x2 t
. solset . b
t, 0, 6 , PlotStyle AbsoluteThickness 0.25 ,
DisplayFunction Identity &, 10, 10 ;
Show %, DisplayFunction $DisplayFunction ;
30
20
10
-20
-10
10
-10
-20
-30
And a plot for a phase trajectory and the direction field is
9
Printed by Mathematica for Students
20
# ,
5t
final.nb
Clear sol
sol DSolve Join eq, x1 0
1, x2 0
5 , x1 t , x2 t
Needs "Graphics`PlotField`"
Block $DisplayFunction Identity ,
5
5
g1 PlotVectorField
3u
v,
u 2v ,
2
2
u, 15, 15 , v, 15, 15 , PlotPoints 11 ;
g2
ParametricPlot Evaluate
Show g1, g2, Axes
x1 t , x2 t
True, AxesLabel
,t ;
. sol , t, 0, 6
"x1 ", "x2 "
;
;
x2
15
10
5
-15
-10
-5
5
10
15
x1
-5
-10
-15
(b) Solve the given value problem and describe the behavior of the solution as t
x'
1 1 2
0 2 2 x,
1 1 3
x0
2
0
1
10
Printed by Mathematica for Students
.
final.nb
Clear a
1 1 2
0 2 2 ;
a
1 1 3
Eigensystem a
1, 2, 3 ,
0,
2, 1 , 1, 1, 0 , 2, 2, 1
Clear eq, sol
eq
x1 ' t
x1 t
x2 t
2 x3 t ,
x2 ' t
2 x2 t
2 x3 t , x3 ' t
x1 t
x2 t
3 x3 t
sol DSolve Join eq, x1 0
2, x2 0
0, x3 0
1 ,
x1 t , x2 t , x3 t , t ; TableForm FullSimplify sol
x1 t
As t
2
2t
x2 t
, the solution x t goes to
2
t
1
t
x3 t
as well.
(c) Find the general solution of the given system of equations.
x1 '
x2 '
5
x
4 1
3
x
4 1
3
x
2t
4 2
5
x
et
4 2
Clear a
5
4
3
4
a
2,
3
4
5
4
1
,
2
; Eigensystem a
1, 1 , 1, 1
11
Printed by Mathematica for Students
t
;
final.nb
Clear eq, sol
eq
5
x1 ' t
sol
3
x1 t
x2 t
4
4
DSolve eq, x1 t , x2 t
1
12
x1 t
x2 t
1
4
2t
51
3t
2
3
2
t
2t
2t
6
2t
5
x1 t
4
FullSimplify
,t
30 t
5
3
2 t, x2 ' t
C 1
2C 1
C 2
t 2
6
2C 2
2
x2 t
4
C 1
3t 2
C 1
17
4
15
4
t
Exp t
C 2
;
,
C 2
This can be written as
xt
1
2
C1
C2 e
t
2
1
1
1
2
C1
1
1
2t
C2 e
t
5
2
3
2
e
1
6
1
2
,
which coincides with the form obtained by hand using the variation of parameters method when setting
K1 12 C1 C2 and K2 12 C1 C2 .
Problem 2. (Predator-Prey model)
We will study a system x '
v x , where v is a nonlinear vector field. The particular system we are interested in is
dx
dt
dy
dt
9
x
2
3y x
(6)
x y
where
0 is a parameter. The variable x is the population of prey (rabbits) and y is the population of predators
(foxes). We want to understand what happens to these populations as t
. Our job is to investigate the phase portrait
of this system for various values of in the interval 0
5 . We will follow the steps described in class (see also a
nonlinear system analysis, written in Mathematica by Gavin LaRose from the University of Michigan).
Step 1 (Equilibrium points)
We find the equilibrium points by setting both the first and the second components of the vector field
v
x 3 y x, 2 x y equal to zero.
9
Clear
Solve
x
, x, y
9
x
0, y
3y x
0 , x
9
0,
,y
2
x y
0 , y
Clearly, the second equilibrium point above makes sense when
0 , x, y
1
3
9
2
,x
0 . For
12
Printed by Mathematica for Students
2
0 , we get
final.nb
Clear x, y
Solve
9 3y x
x
0, y
0,
0 , x
2
x y
2, y
0 , x, y
3
Step 2 (Linearization. Analysis of eigenvalues for different values of )
We want to know what type of equilibrium points they are (hyperbolic or non-hyperbolic) If hyperbolic, we know that
we get a good approximation of the phase portrait of (6) by studying the linear system y ' D v p y at each hyperbolic
equilibrium point p . Thus, we can say that p is like a node, source, center, saddle, and so on, according to the type of
equilibrium 0, 0 is in the linear system y ' D v p y . We compute the Jacobian of the vector field v to then evaluate
it at the equilibrium points. Here is a set of commands in Mathematica to perform this task
Clear , x, y
v1
9
x t
3 y t x t ; v2
2 x t
jacobi f_List, x_List : Outer D, f, x ;
jac jacobi v1 , v2 , x t , y t
;
MatrixForm Simplify jac
9
2
x t
y t
3y t
y t ;
3x t
2 x t
Again, the equilibrium points are
equi
x t
Solve
v1
0, v2
0, y t
0 , x t ,y t
0 , x t
9
,y t
0 , y t
1
3
9
18
4
2
,x t
2
and the eigenvalues of their corresponding Jacobians are
eig
Map Eigenvalues jac . # &, equi
2, 9 ,
9,
2
9
,
Right away we can see that independently of
rium points, we can try several
18
4
2
,
2
, the equilibrium point 0, 0 is like a saddle. For the other two equilib-
nonzero values for
to see what we obtain .
13
Printed by Mathematica for Students
final.nb
1; equi
x t
0, y t
0 , x t
9, y t
7
,x t
3
0 , y t
2
eig
2, 9 ,
9, 7 ,
1
13 ,
1
13
Looking at their eigenvalues, we see that all three equilibrium points are hyperbolic: 9, 0 is a like a saddle and 2,
is like a spiral with converging trajectories.
7
3
2; equi
x t
0, y t
9
,y t
2
0 , x t
5
,x t
3
0 , y t
2
eig
2, 9 ,
9,
5
,
2
2
6,
9
2
All three equilibrium points are hyperbolic:
trajectories.
2
6
, 0 is like a saddle and 2,
5
3
is like a spiral with converging
3; equi
x t
0, y t
0 , x t
3, y t
0 , y t
1, x t
eig
2, 9 ,
9, 1 ,
3
3,
3
3
All three equilibrium points are hyperbolic: 3, 0 is like a saddle and 2, 1 is like a node.
14
Printed by Mathematica for Students
2
final.nb
4; equi
x t
0, y t
9
,y t
4
0 , x t
1
,x t
3
0 , y t
2
eig
2, 9 ,
9,
1
,
4
4
All three equilibrium points are hyperbolic:
14 ,
9
4
4
14
, 0 is like a saddle and 2,
1
3
is like a node.
4.5; equi
x t
0, y t
0 , x t
2., y t
0 , y t
0., x t
2
eig
2, 9 ,
9, 0. ,
9., 0.
Here, we have only two equilibrium points: 0, 0 and 2, 0 . And 2, 0 is not hyperbolic
5; equi
x t
0, y t
9
,y t
5
0 , x t
1
,x t
3
0 , y t
2
eig
2, 9 ,
9,
1
,
5
5
3
Again, all three equilibrium points are hyperbolic:
3,
9
5
5
3
3
, 0 is like a node and 2,
1
3
is like a saddle.
When
0 , we can independently compute eigenvalues for the corresponding equilibrium points. Now, I denote v1,0
and v2,0 the first and second components of the vector field v .
15
Printed by Mathematica for Students
final.nb
Clear x, y, equi
v1,0
9 3 y t x t ; v2,0
2 x t y t ;
jac jacobi v1,0 , v2,0 , x t , y t
;
MatrixForm Simplify jac
9
3y t
y t
equi
x t
eig
3x t
2 x t
Solve
v1,0
0, y t
0, v2,0
0 , x t
0 , x t ,y t
2, y t
3
Map Eigenvalues jac . # &, equi
2, 9 ,
3
2, 3
equilibrium points
eigenvalues
2
Thus, for
0 , we have two equilibrium points: 0, 0 is hyperbolic, whereas 2, 3 is not since its eigenvalues have
real part equal to zero.
Step 3 (Direction fields, phase portraits)
First, we plot direction fields of the system (6) for values of
0, 1, 2, 3, 4, 5 , to get started.
Clear
Graphics`PlotField`
Table PlotVectorField
9
x 3 y x,
2 x y ,
x, 1, 5 , y, 1, 5 , Axes True, AxesLabel
"x", "y" ,
PlotLabel SequenceForm " ",
, PlotPoints 20 ,
, 0, 5
16
Printed by Mathematica for Students
;
final.nb
y
0
5
4
3
2
1
-1
1
2
3
4
5
x
-1
y
1
5
4
3
2
1
-1
1
2
3
4
-1
17
Printed by Mathematica for Students
5
x
final.nb
y
2
5
4
3
2
1
-1
1
2
3
4
5
3
4
5
x
-1
y
3
5
4
3
2
1
-1
1
2
-1
18
Printed by Mathematica for Students
x
final.nb
y
4
5
4
3
2
1
-1
1
2
3
4
5
3
4
5
x
-1
y
5
5
4
3
2
1
-1
1
2
-1
19
Printed by Mathematica for Students
x
final.nb
These plots give us already a good picture of what is going on with sytem (6) for different values of the parameter
By simple inspection we can
.
guess where the equilibrium points are and the type of them (something we have done
already).
It is always a good idea to plot the curves where x ' and y ' vanish (some authors call these curves nullclines). For
instance, if you are doing things by hand, you can proceed by steps to construct a good sketch of the direction field of
(6). For x ' 0 , the resulting curves determine regions on the phase plane. In each region you analyze the horizontal
component of the vector field v in (6). Along these curves, the vector field v is vertical since the horizontal component
of v is zero (x ' 0 ). For y ' 0 , you do a similar analysis but now focusing on the vertical components of v . Obviously,
here, the vector field v is horizontal along the corresponding curves where y ' 0 . Finally, you overlap the two plots
above to get a sketch of the direction field of the system. We do this for
points where x '
0 and blue
curves are points where y '
0, 1, 2, 3, 4, 5 .
Red curves represent
0.
Clear
h1
y t
. Solve v1
0, y t
1
.x t
x
. Solve v2
0, y t
1
.x t
x
y in terms of x
9 x x2
3x
v2
y t
y in terms of x
0
Table Block
$DisplayFunction
Identity ,
hor1 Plot h1, x, 0, 10 , PlotStyle RGBColor 1, 0, 0 ;
hor2 Graphics RGBColor 1, 0, 0 , Line
0, 5 , 0, 5
;
ver1 Graphics RGBColor 0, 0, 1 , Line
2, 5 , 2, 5
;
ver2 Plot v2, x, 0, 10 , PlotStyle RGBColor 0, 0, 1 ;
equipts Graphics PointSize .02 , Point 0, 0 ,
9
9 2
Point
;
, 0 , Point 2,
3
Show hor1, hor2, ver1, ver2, equipts, Axes True, PlotLabel
SequenceForm " ",
, AxesLabel
"x", "y" ,
, 1, 5 ;
20
Printed by Mathematica for Students
final.nb
y
1
4
2
2
4
6
8
10
6
8
10
6
8
10
x
-2
-4
y
2
4
2
2
4
x
-2
-4
y
3
4
2
2
4
-2
-4
-6
21
Printed by Mathematica for Students
x
final.nb
y
4
5
2.5
2
4
6
8
10
6
8
10
x
-2.5
-5
-7.5
-10
y
5
5
2.5
2
4
x
-2.5
-5
-7.5
-10
-12.5
The intersections of red and blue curves are the equilibrium points we have previously obtained. Now, we plot some
phase trajectories for different initial conditions.
22
Printed by Mathematica for Students
final.nb
Clear , eq, sol
list of equations
eq
x' t
v1 , y ' t
v2 ;
10 initial conditions
iclist
0.1, 0.05 , 1, 2 , 2.5, 1 , 3, 0.05 ,
3.8, 3 , 4, 0 , 4.3, 1 , 4.54, 0.2 , 5, 0.1 , 6, 1 ;
Table Block $DisplayFunction Identity ,
getPlot eq_, x0_, y0_ : Module sol, xs, ys ,
sol NDSolve eq, x 0
x0, y 0
y0 , x t , y t , t, 0, 50 ;
xs, ys
x t ,y t
. sol 1 ;
ParametricPlot xs, ys , t, 0, 50 , DisplayFunction Identity ;
trajectories Table getPlot eq, iclist i, 1 , iclist i, 2
,
i, 1, Length iclist
;
trajplot Show trajectories, DisplayFunction $DisplayFunction,
,
AspectRatio 1, PlotRange All, PlotLabel SequenceForm " ",
AxesLabel
"x", "y" ,
, 1, 5
y
1
3.5
3
2.5
2
1.5
1
0.5
2
4
6
23
Printed by Mathematica for Students
8
x
final.nb
y
2
3
2.5
2
1.5
1
0.5
1
2
3
y
4
5
6
4
5
6
x
3
3
2.5
2
1.5
1
0.5
1
2
3
24
Printed by Mathematica for Students
x
final.nb
y
4
3
2.5
2
1.5
1
0.5
1
2
3
y
4
5
6
4
5
6
x
5
3
2.5
2
1.5
1
0.5
1
Graphics ,
2
Graphics ,
3
Graphics ,
Graphics ,
25
Printed by Mathematica for Students
x
Graphics
final.nb
Finally, we can put all the plots together: direction fields, nullclines, equilibrium points and some phase trajectories. I
leave this for you as an exercise. You may want to use again the command Table to plot all these graphs for different
values of , all at once.
Step 4 (Other type of diagrams: x vs. t , y vs. t )
Here, just follow the pattern as in the Mathematica tutorial (Part b, pp. 674-679).
Problem 3. (Extra credit)
Solve Problem 18 of Section 7.8 of the textbook.
The solution is similar to that of Problem 17 in the same section. Just follow the steps.
26
Printed by Mathematica for Students
Download