AD@tD = a + b Hy@tD - TL + d - f r@tD + g
Solve@y == a + b Hy - TL + d - f r + g, rD
::r ®
a + d + g - b T - y + b y
f>>
Solve@k P y + h - j r == Ms, rD
::r ®
h - Ms + k P y
j>>
Simplify@Solve@8y == a + b Hy - TL + d - f r + g, k P y + h - j r == Ms<, 8y, r<DD
::y ®
f Hh - MsL - j Ha + d + g - b TLH-1 + bL j - f k P
, r ®
H-1 + bL h + Ms - b Ms - k P Ha + d + g - b TLH-1 + bL j - f k P
>>
The change in y at time t, written y'@tD comes from this :
H1L y'@tD = J Ha + b Hy@tD - TL + d - f r@tD + g - y@tDLJ is a speed of adjustment parameter. J > 0. If AD > y, y rises.
Our numerical assumptions are :
J = .02; a = 200; b = .8; d = 100; T = 1000 � 8; f = 3;
g = 200; k = .25; H = .02; h = 50; P = 1; j = 1; Ms = 500;
Simplify@Solve@8y == a + b Hy - TL + d - f r + g, k P y + h - j r == Ms<, 8y, r<DD
88y ® 1842.11, r ® 10.5263<<
PlotB:a + d + g - b T - y + b y
f>, 8y, 0, 2000<, AxesLabel -> 8y, r<F
IS
500 1000 1500 2000y
20
40
60
80
100
120
r
PlotB:h - Ms + k P y
j>, 8y, 0, 2000<, AxesLabel -> 8y, r<F
LM
500 1000 1500 2000y
-400
-300
-200
-100
r
PlotB:a + d + g - b T - y + b y
f,
h - Ms + k P y
j>, 8y, 1700, 2000<, AxesLabel -> 8y, r<F
IS
LM
1750 1800 1850 1900 1950 2000y
-20
-10
10
20
30
40
50
r
y0 = 1900; r0 = 10
10
sol = NDSolve@8y'@tD == J Ha + b Hy@tD - TL + d - f r@tD + g - y@tDL,
r'@tD == H Hk P y@tD + h - j r@tD - MsL, y@0D == y0, r@0D == r0<, 8y, r<, 8t, 1000<D
NDSolve::ndinnt : Initial condition r0 is not a number or a rectangular array of numbers. �
NDSolve@8y¢@tD � J Ha + d + g - f r@tD - y@tD + b H-T + y@tDLL,
r¢@tD � H Hh - Ms - j r@tD + k P y@tDL, y@0D � y0, r@0D � r0<, 8y, r<, 8t, 1000<DParametricPlot@Evaluate@8y@tD, r@tD< �. solD, 8t, 0, 1000<, PlotRange -> AllD
1850 1860 1870 1880 1890 1900
12141618
2 ISLM dynamics C.nb
Show@%104, %62D
1700 1750 1800 1850 1900 1950 2000
-20
0
20
40
H
0.0002
J
0.02
VectorPlot@8J Ha + b Hy - TL + d - f r + g - yL, .02 Hk P y + h - j r - MsL<,
8y, 1700, 2000<, 8r, 0, 50<D
1700 1750 1800 1850 1900 1950 2000
-10
0
10
20
30
40
50
60
ISLM dynamics C.nb 3
StreamPlot@8J Ha + b Hy - TL + d - f r + g - yL, H Hk P y + h - j r - MsL<,
8y, 1800, 1900<, 8r, 0, 30<, StreamPoints ® 100D
1800 1820 1840 1860 1880 1900
0
5
10
15
20
25
30
Show@%95, %100, %62D
4 ISLM dynamics C.nb
1700 1750 1800 1850 1900 1950 2000
-10
0
10
20
30
40
50
60
ISLM dynamics C.nb 5
ManipulateBShowB:StreamPlot@8J Ha + b Hy - TL + d - f r + g - yL, H Hk P y + h - j r - MsL<,
8y, 1800, 1900<, 8r, 0, 30<, StreamPoints ® 100D,
PlotB:h - Ms + k P y
j>, 8y, 1800, 1900<, AxesLabel -> 8y, r<F>F, 8H, 0, .2<F
H
1800 1820 1840 1860 1880 1900
0
5
10
15
20
25
30
changing the speed of r adjustment ... don' t slide it ... it will crash
6 ISLM dynamics C.nb
LM
y
r
1800 1820 1840 1860 1880 1900
0
5
10
15
20
25
30
High speed r adjustment
... ... ... ... ... ....
Linear models are gnerally easier to deal with than non - linear models,
but they often give "quirky" results,
like leaving it possible that some variables can turn negative,
when common sense says they never do. Negative interest rate would be odd,
and negitive gdp even more odd, for instance.
In the present example, we see HbelowL the system moving into negative interest rates.
sol2 = NDSolve@8y'@tD == J Ha + b Hy@tD - TL + d - f r@tD + g - y@tDL,
r'@tD == H Hk P y@tD + h - j r@tD - MsL, y@0D == y0, r@0D == r0<, 8y, r<, 8t, 1000<D88y ® InterpolatingFunction@880., 1000.<<, <>D,
r ® InterpolatingFunction@880., 1000.<<, <>D<<ParametricPlot@Evaluate@8y@tD, r@tD< �. solD,
8t, 0, 10<, PlotRange -> All, AxesLabel -> 8y, r<D
1605 1610 1615y
-8
-6
-4
-2
r
ISLM dynamics C.nb 7
Here' s r going negative, for instance. r falls at r = 0,
if k P y + h - Ms < 0 or y <
Ms - h
k P... in our example
Ms - h
k P
1800.
change in y when y = 0 is J Ha - b T + d - f r + gL, which is negative if
a - b T + d - f r + g < 0, or r >
a - b T + d + g
f,
which is not ruled out by basic assumptions ....in example
a - b T + d + g
f
133.333
an admittedly big number.
Linear systems are often used to model non - linear systems locally,
i.e., near the equilibrium.
....
Why is this system stable? That' s messy and won' t make much
sense until you have studied differential equations. The punchline
is that it is stable if b, the MPC, is positive and less than 1.
If you are interested, here' s the proof : The Jacobian matrix for our system is
Jacobian = K Hb - 1L J -fJ
kPH -jHO
If b < 1, the Jacobian has the following signs J - -
+ -N. Since this has a negative trace
and positive determinant, the system is stable by the Routh - Hurwitz theorem.
8 ISLM dynamics C.nb