This preview shows page 1. Sign up to view the full content.
Unformatted text preview: 80 Economic Dynamics
Note that the direction ﬁeld has six elements:
(i)
(ii)
(iii)
(iv)
(v)
(vi) the differential equation
y(x) indicates that x is the independent variable and y the dependent
variable
the range for the xaxis
the initial points
the range for the yaxis
a set of options; here we have two options:
(a) arrows are to be drawn slim (the default is thin)
(b) the colour of the lines is to be blue (the default is yellow). Figure 2.9(a) (p. 46)
This follows similar steps as ﬁgure 2.8 and so we shall be brief. We assume a new
session. Input the following:
(1)
(2)
(3)
(4)
(5)
(6) with(DEtools):
equ:=p0*exp(k*t);
newequ:=subs(p0=13,k=0.01,equ);
inisol:=evalf(subs(t=0,newequ));
finsol:=evalf(subs(t=150,newequ));
DEplot(diff(p(t),t)=0.01*p,p(t),t=0..150,{[0,13]},
p=0..60, arrows=slim,linecolour=blue); Instructions (2), (3), (4) and (5) input the equation and evaluate it for the initial
point (time t = 0) and at t = 150. The remaining instruction plots the direction
ﬁeld and one integral curve through the point (0, 13). Figure 2.9(b) (p. 46)
The logistic equation uses the values a = 0.02 and b = 0.000436 and p0 = 13.
The input instructions are the following, where again we assume a new session:
(1)
(2) with(DEtools):
DEplot(diff(p(t),t)=(0.020.000436*p)*p,p(t),
t=0..150,{[0,13]},p=0..50,arrows=slim,
linecolour=blue); Exercises
1. Show the following are solutions to their respective differential equations
(i) dy
= ky
dx (ii) −x
dy
=
dx
y (iii) dy
−2y
=
dx
x y = cekx
y = x 2 + y2 = c
y= a
x2 ...
View Full
Document
 Fall '11
 Dr.Gwartney
 Economics

Click to edit the document details