Needs["Graphics`MultipleListPlot`"]

Needs["Graphics`Legend`"]

Question 6

The model is,
	\(TraditionalForm
      \`y\_\(t + 1\) - y\_t = 
        α[c(1 - trate) - 1] y\_t - α\ h\ r\_t + α\ a\)\(TraditionalForm
      \`r\_\(t + 1\) - r\_t = 
        β\ k\ y\_t - β\ u\ r\_t - β\ m\_0\)

Clear[y, r]

{a = 50, c = 0.75,  trate = 0.25, h = 1.525, m0 = 5, k = 0.25, 
      u = 0.5, α = 0.05, β = 0.8}

Simplify[
      Solve[y1 - 
            y == α (c (1 - trate) - 1) 
              y - α h r + α a, y1]]

Simplify[
      Solve[r1 - r == β k y  -  β u r  -  β m0, 
        r1]]

Clear[ybar, rbar]

Solve[{ybar == 2.5 - 0.07625  rbar + 0.978125  ybar, 
        rbar == -4 + 0.6  rbar + 0.2  ybar}, {ybar, rbar}]

{y[0] = 62, r[0] = 15};
y[t_] := 2.5 - 0.07625  r[t - 1] + 0.978125  y[t - 1]
r[t_] := -4 + 0.6  r[t - 1] + 0.2  y[t - 1]

Table[{t, y[t], r[t]}, {t, 0, 15}]  // TableForm

trajdata61 = Table[{y[t], r[t]}, {t, 0, 15}];

ListPlot[trajdata61 , AxesLabel -> {"y(t)", "r(t)"}, 
        PlotLabel -> "α=0.05, β=0.8", 
        PlotJoined -> True];

Clear[y, r]

{α = 0.1, β = 0.8}

Simplify[
      Solve[y1 - 
            y == α (c (1 - trate) - 1) 
              y - α h r + α a, y1]]

Simplify[
      Solve[r1 - r == β k y  -  β u r  -  β m0, 
        r1]]

{y[0] = 62, r[0] = 15};
y[t_] := 5 - 0.1525  r[t - 1] + 0.95625  y[t - 1]
r[t_] := -4 + 0.6  r[t - 1] + 0.2  y[t - 1]

Table[{t, y[t], r[t]}, {t, 0, 15}]  // TableForm

trajdata62 = Table[{y[t], r[t]}, {t, 0, 15}];

ListPlot[trajdata62, AxesLabel -> {"y(t)", "r(t)"},  
        PlotLabel -> "α=0.1, β=0.8",  
        PlotJoined -> True];

Clear[y, r]

{α = 0.5, β = 0.8}

Simplify[
      Solve[y1 - 
            y == α (c (1 - trate) - 1) 
              y - α h r + α a, y1]]

Simplify[
      Solve[r1 - r == β k y  -  β u r  -  β m0, 
        r1]]

{y[0] = 62, r[0] = 15};
y[t_] := 25 - 0.7625  r[t - 1] + 0.78125  y[t - 1]
r[t_] := -4 + 0.6  r[t - 1] + 0.2  y[t - 1]

Table[{t, y[t], r[t]}, {t, 0, 15}]  // TableForm

trajdata63 = Table[{y[t], r[t]}, {t, 0, 15}];

ListPlot[trajdata63, AxesLabel -> {"y(t)", "r(t)"},  
        PlotLabel -> "α=0.5, β=0.8", 
        PlotJoined -> True];

(i) A goods market shock can be considered by changing the value of a. (ii) A money-market shock can be considered by changing the value of m0.

Question 7

The system of equations are:
	\(TraditionalForm
      \`Δ\ y\_t = 
        α[c(1 - t) - 1] y\_t - α\ h\ r\_t + 
          α\ aΔ\)\(TraditionalForm
      \`Δ\ r\_t = 
        β\ h\ y\_t - β\ u\ r\_t - β\ m\_0\)

{a = 50, c = 0.75, trate = 0.25, h = 1.525, k = 0.25, m0 = 12, 
      u = 0.5}

{α = 0.05, β = 0.8}

Simplify[
      Solve[y1 - 
            y == α (c (1 - trate) - 1) 
              y - α h r + α a, y1]]

Simplify[
      Solve[r1 - r == β k y  - β u r  - β m0, 
        r1]]

Clear[ybar, rbar]

Solve[{ybar == 2.5 - 0.07625  rbar + 0.978125  ybar, 
        rbar == -9.6 + 0.6  rbar + 0.2  ybar}, {ybar, rbar}]

{y[0] = 62, r[0] = 15};
y[t_] := 2.5 - 0.07625  r[t - 1] + 0.978125  y[t - 1]
r[t_] := -9.6 + 0.6  r[t - 1] + 0.2  y[t - 1]

Table[{t, y[t], r[t]},  {t, 0, 15}]  // TableForm

trajdata71 = Table[{y[t], r[t]}, {t, 0, 15}];

ListPlot[trajdata71, AxesLabel -> {"y(t)", "r(t)"}, 
        PlotLabel -> "α=0.05, β=0.8", 
        PlotJoined -> True];

Clear[y, r]

{α = 0.1, β = 0.8}

Simplify[
      Solve[y1 - 
            y == α (c (1 - trate) - 1) 
              y - α h r + α a, y1]]

Simplify[
      Solve[r1 - r == β k y  - β u r  - β m0, 
        r1]]

{y[0] = 62, r[0] = 15};
y[t_] := 5 - 0.1525  r[t - 1] + 0.97625  y[t - 1]
r[t_] := -9.6 + 0.6  r[t - 1] + 0.2  y[t - 1]

Table[{t, y[t], r[t]}, {t, 0, 15}]  // TableForm

trajdata72 = Table[{y[t], r[t]}, {t, 0, 15}];

ListPlot[trajdata72, AxesLabel -> {"y(t)", "r(t)"}, 
        PlotLabel -> "α=0.1, β=0.8", 
        PlotJoined -> True];

Clear[y, r]

{α = 0.5, β = 0.8}

Simplify[
      Solve[y1 - 
            y == α (c (1 - trate) - 1) 
              y - α h r + α a, y1]]

Simplify[
      Solve[r1 - r == β k y  - β u r  - β m0, 
        r1]]

{y[0] = 62, r[0] = 15};
y[t_] := 25 - 0.7625  r[t - 1] + 0.78125  y[t - 1]
r[t_] := -9.6 + 0.6  r[t - 1] + 0.2  y[t - 1]

Table[{t, y[t], r[t]}, {t, 0, 15}]  // TableForm

trajdata73 = Table[{y[t], r[t]}, {t, 0, 15}];

ListPlot[trajdata73, AxesLabel -> {"y(t)", "r(t)"}, 
        PlotLabel -> "α=0.5, β=0.8", 
        PlotJoined -> True];

Question 8

(i) A rise in the marginal propensity to consume

We shall increase the marginal propensity to consume from c = 0.75 to c = 0.85.

Clear[y, r]

{a = 50, c = 0.85,  trate = 0.25, h = 1.525, m0 = 5, k = 0.25, 
      u = 0.5, α = 0.05, β = 0.8}

Simplify[
      Solve[y1 - 
            y == α (c (1 - trate) - 1) 
              y - α h r + α a, y1]]

Simplify[
      Solve[r1 - r == β k y  -  β u r  -  β m0, 
        r1]]

{y[0] = 62, r[0] = 15};
y[t_] := 2.5 - 0.07625  r[t - 1] + 0.981875  y[t - 1]
r[t_] := -4 + 0.6  r[t - 1] + 0.2  y[t - 1]

trajdata81 = Table[{y[t], r[t]}, {t, 0, 15}];

MultipleListPlot[trajdata61, trajdata81, PlotJoined -> True, 
        AxesLabel -> {"y(t)", "r(t)"}, 
        PlotLegend -> {"c=0.75", "c=0.85"}, 
        PlotLabel -> "α=0.05,β=0.8",  
        LegendPosition -> {-0.35, -1.2}, 
        LegendOrientation -> Horizontal, 
        LegendSize -> {1,  .5}];

Clear[y, r]

{α = 0.1, β = 0.8}

Simplify[
      Solve[y1 - 
            y == α (c (1 - trate) - 1) 
              y - α h r + α a, y1]]

Simplify[
      Solve[r1 - r == β k y  -  β u r  -  β m0, 
        r1]]

{y[0] = 62, r[0] = 15};
y[t_] := 5 - 0.1525  r[t - 1] + 0.96375  y[t - 1]
r[t_] := -4 + 0.6  r[t - 1] + 0.2  y[t - 1]

trajdata82 = Table[{y[t], r[t]}, {t, 0, 15}];

MultipleListPlot[trajdata62, trajdata82, PlotJoined -> True, 
        AxesLabel -> {"y(t)", "r(t)"}, 
        PlotLegend -> {"c=0.75", "c=0.85"},  
        PlotLabel -> "α=0.1,β=0.8",  
        LegendPosition -> {-0.35, -1.2}, 
        LegendOrientation -> Horizontal, 
        LegendSize -> {1,  .5}];

Clear[y, r]

{α = 0.5, β = 0.8}

Simplify[
      Solve[y1 - 
            y == α (c (1 - trate) - 1) 
              y - α h r + α a, y1]]

Simplify[
      Solve[r1 - r == β k y  -  β u r  -  β m0, 
        r1]]

{y[0] = 62, r[0] = 15};
y[t_] := 25 - 0.7625  r[t - 1] + 0.81875  y[t - 1]
r[t_] := -4 + 0.6  r[t - 1] + 0.2  y[t - 1]

trajdata83 = Table[{y[t], r[t]}, {t, 0, 15}];

MultipleListPlot[trajdata63, trajdata83, PlotJoined -> True, 
        AxesLabel -> {"y(t)", "r(t)"}, 
        PlotLegend -> {"c=0.75", "c=0.85"},  
        PlotLabel -> "α=0.5,β=0.8",  
        LegendPosition -> {-0.35, -1.2}, 
        LegendOrientation -> Horizontal, 
        LegendSize -> {1,  .5}];

(ii) A reduction in the marginal rate of tax

A reduction in the marginal rate of tax, from t = 0.25 to t = 0.2. The marginal propensity to consume is returned to its initial value of c = 0.75.

Clear[y, r]

{c = 0.75, trate = 0.2}

{α = 0.05, β = 0.8}

Simplify[
      Solve[y1 - 
            y == α (c (1 - trate) - 1) 
              y - α h r + α a, y1]]

Simplify[
      Solve[r1 - r == β k y  -  β u r  -  β m0, 
        r1]]

{y[0] = 62, r[0] = 15};
y[t_] := 2.5 - 0.07625  r[t - 1] + 0.98  y[t - 1]
r[t_] := -4 + 0.6  r[t - 1] + 0.2  y[t - 1]

trajdata821 = Table[{y[t], r[t]}, {t, 0, 15}];

MultipleListPlot[trajdata61, trajdata821, PlotJoined -> True, 
        AxesLabel -> {"y(t)", "r(t)"}, 
        PlotLegend -> {"t=0.25", "t=0.2"},  
        PlotLabel -> "α=0.05,β=0.8",  
        LegendPosition -> {-0.35, -1.2}, 
        LegendOrientation -> Horizontal, 
        LegendSize -> {1,  .5}];

Clear[y, r]

{α = 0.1, β = 0.8}

Simplify[
      Solve[y1 - 
            y == α (c (1 - trate) - 1) 
              y - α h r + α a, y1]]

Simplify[
      Solve[r1 - r == β k y  -  β u r  -  β m0, 
        r1]]

{y[0] = 62, r[0] = 15};
y[t_] := 5 - 0.1525  r[t - 1] + 0.96  y[t - 1]
r[t_] := -4 + 0.6  r[t - 1] + 0.2  y[t - 1]

trajdata822 = Table[{y[t], r[t]}, {t, 0, 15}];

MultipleListPlot[trajdata62, trajdata822, PlotJoined -> True, 
        AxesLabel -> {"y(t)", "r(t)"}, 
        PlotLegend -> {"t=0.25", "t=0.2"},  
        PlotLabel -> "α=0.1,β=0.8",  
        LegendPosition -> {-0.35, -1.2}, 
        LegendOrientation -> Horizontal, 
        LegendSize -> {1,  .5}];

Clear[y, r]

{α = 0.5, β = 0.8}

Simplify[
      Solve[y1 - 
            y == α (c (1 - trate) - 1) 
              y - α h r + α a, y1]]

Simplify[
      Solve[r1 - r == β k y  -  β u r  -  β m0, 
        r1]]

{y[0] = 62, r[0] = 15};
y[t_] := 25 - 0.7625  r[t - 1] + 0.8  y[t - 1]
r[t_] := -4 + 0.6  r[t - 1] + 0.2  y[t - 1]

trajdata823 = Table[{y[t], r[t]}, {t, 0, 15}];

MultipleListPlot[trajdata63, trajdata823, PlotJoined -> True, 
        AxesLabel -> {"y(t)", "r(t)"}, 
        PlotLegend -> {"t=0.25", "t=0.2"},  
        PlotLabel -> "α=0.5,β=0.8",  
        LegendPosition -> {-0.35, -1.2}, 
        LegendOrientation -> Horizontal, 
        LegendSize -> {1,  .5}];

(iii) A rise in the interest-rate sensitivity of investment

A rise in h from h = 1.525 to h = 1.7,  all other parameters returning to their original values.

Clear[y, r]

{trate = 0.25, h = 1.7}

{α = 0.05, β = 0.8}

Simplify[
      Solve[y1 - 
            y == α (c (1 - trate) - 1) 
              y - α h r + α a, y1]]

Simplify[
      Solve[r1 - r == β k y  -  β u r  -  β m0, 
        r1]]

{y[0] = 62, r[0] = 15};
y[t_] := 2.5 - 0.085  r[t - 1] + 0.978125  y[t - 1]
r[t_] := -4 + 0.6  r[t - 1] + 0.2  y[t - 1]

trajdata831 = Table[{y[t], r[t]}, {t, 0, 15}];

MultipleListPlot[trajdata61, trajdata831, PlotJoined -> True, 
        AxesLabel -> {"y(t)", "r(t)"}, 
        PlotLegend -> {"h=1.525", "h=1.7"},  
        PlotLabel -> "α=0.05,β=0.8",  
        LegendPosition -> {-0.35, -1.2}, 
        LegendOrientation -> Horizontal, 
        LegendSize -> {1,  .5}];

Clear[y, r]

{α = 0.1, β = 0.8}

Simplify[
      Solve[y1 - 
            y == α (c (1 - trate) - 1) 
              y - α h r + α a, y1]]

Simplify[
      Solve[r1 - r == β k y  -  β u r  -  β m0, 
        r1]]

{y[0] = 62, r[0] = 15};
y[t_] := 5 - 0.17  r[t - 1] + 0.95625  y[t - 1]
r[t_] := -4 + 0.6  r[t - 1] + 0.2  y[t - 1]

trajdata832 = Table[{y[t], r[t]}, {t, 0, 15}];

MultipleListPlot[trajdata62, trajdata832, PlotJoined -> True, 
        AxesLabel -> {"y(t)", "r(t)"}, 
        PlotLegend -> {"h=1.525", "h=1.7"},  
        PlotLabel -> "α=0.1,β=0.8",  
        LegendPosition -> {-0.35, -1.2}, 
        LegendOrientation -> Horizontal, 
        LegendSize -> {1,  .5}];

Clear[y, r]

{α = 0.5, β = 0.8}

Simplify[
      Solve[y1 - 
            y == α (c (1 - trate) - 1) 
              y - α h r + α a, y1]]

Simplify[
      Solve[r1 - r == β k y  -  β u r  -  β m0, 
        r1]]

{y[0] = 62, r[0] = 15};
y[t_] := 25 - 0.85  r[t - 1] + 0.78125  y[t - 1]
r[t_] := -4 + 0.6  r[t - 1] + 0.2  y[t - 1]

trajdata833 = Table[{y[t], r[t]}, {t, 0, 15}];

MultipleListPlot[trajdata63, trajdata833, PlotJoined -> True, 
        AxesLabel -> {"y(t)", "r(t)"}, 
        PlotLegend -> {"h=1.525", "h=1.7"},  
        PlotLabel -> "α=0.5,β=0.8",  
        LegendPosition -> {-0.35, -1.2}, 
        LegendOrientation -> Horizontal, 
        LegendSize -> {1,  .5}];

(iv) Higher income velocity of circulation of money (lower k)

A fall in k from k = 0.25 to k = 0.2, all other parameters returning to their original values.

Clear[y, r]

{h = 1.525,  k = 0.2}

{α = 0.05, β = 0.8}

Simplify[
      Solve[y1 - 
            y == α (c (1 - trate) - 1) 
              y - α h r + α a, y1]]

Simplify[
      Solve[r1 - r == β k y  -  β u r  -  β m0, 
        r1]]

{y[0] = 62, r[0] = 15};
y[t_] := 2.5 - 0.07625  r[t - 1] + 0.978125  y[t - 1]
r[t_] := -4 + 0.6  r[t - 1] + 0.16  y[t - 1]

trajdata841 = Table[{y[t], r[t]}, {t, 0, 15}];

MultipleListPlot[trajdata61, trajdata841, PlotJoined -> True, 
        AxesLabel -> {"y(t)", "r(t)"}, 
        PlotLegend -> {"k=0.25", "k=0.2"},  
        PlotLabel -> "α=0.05,β=0.8",  
        LegendPosition -> {-0.35, -1.2}, 
        LegendOrientation -> Horizontal, 
        LegendSize -> {1,  .5}];

Clear[y, r]

{α = 0.1, β = 0.8}

Simplify[
      Solve[y1 - 
            y == α (c (1 - trate) - 1) 
              y - α h r + α a, y1]]

Simplify[
      Solve[r1 - r == β k y  -  β u r  -  β m0, 
        r1]]

{y[0] = 62, r[0] = 15};
y[t_] := 5 - 0.1525  r[t - 1] + 0.95625  y[t - 1]
r[t_] := -4 + 0.6  r[t - 1] + 0.16  y[t - 1]

trajdata842 = Table[{y[t], r[t]}, {t, 0, 15}];

MultipleListPlot[trajdata62, trajdata842, PlotJoined -> True, 
        AxesLabel -> {"y(t)", "r(t)"}, 
        PlotLegend -> {"k=0.25", "k=0.2"},  
        PlotLabel -> "α=0.1,β=0.8",  
        LegendPosition -> {-0.35, -1.2}, 
        LegendOrientation -> Horizontal, 
        LegendSize -> {1,  .5}];

Clear[y, r]

{α = 0.5, β = 0.8}

Simplify[
      Solve[y1 - 
            y == α (c (1 - trate) - 1) 
              y - α h r + α a, y1]]

Simplify[
      Solve[r1 - r == β k y  -  β u r  -  β m0, 
        r1]]

{y[0] = 62, r[0] = 15};
y[t_] := 25 - 0.7625  r[t - 1] + 0.78125  y[t - 1]
r[t_] := -4 + 0.6  r[t - 1] + 0.16  y[t - 1]

trajdata843 = Table[{y[t], r[t]}, {t, 0, 15}];

MultipleListPlot[trajdata63, trajdata843, PlotJoined -> True, 
        AxesLabel -> {"y(t)", "r(t)"}, 
        PlotLegend -> {"k=0.25", "k=0.2"},  
        PlotLabel -> "α=0.5,β=0.8",  
        LegendPosition -> {-0.35, -1.2}, 
        LegendOrientation -> Horizontal, 
        LegendSize -> {1,  .5}];

(v) Rise in interest-sensitivity of demand for money (rise in u)

A rise in u from u = 0.5 to u = 0.7, all other parameters returning to their original values.

Clear[y, r]

{k = 0.25, u = 0.7}

{α = 0.05, β = 0.8}

Simplify[
      Solve[y1 - 
            y == α (c (1 - trate) - 1) 
              y - α h r + α a, y1]]

Simplify[
      Solve[r1 - r == β k y  -  β u r  -  β m0, 
        r1]]

{y[0] = 62, r[0] = 15};
y[t_] := 2.5 - 0.07625  r[t - 1] + 0.978125  y[t - 1]
r[t_] := -4 + 0.44  r[t - 1] + 0.2  y[t - 1]

trajdata851 = Table[{y[t], r[t]}, {t, 0, 15}];

MultipleListPlot[trajdata61, trajdata851, PlotJoined -> True, 
        AxesLabel -> {"y(t)", "r(t)"}, 
        PlotLegend -> {"u=0.5", "u=0.7"},  
        PlotLabel -> "α=0.05,β=0.8",  
        LegendPosition -> {-0.35, -1.2}, 
        LegendOrientation -> Horizontal, 
        LegendSize -> {1,  .5}];

Clear[y, r]

{α = 0.1, β = 0.8}

Simplify[
      Solve[y1 - 
            y == α (c (1 - trate) - 1) 
              y - α h r + α a, y1]]

Simplify[
      Solve[r1 - r == β k y  -  β u r  -  β m0, 
        r1]]

{y[0] = 62, r[0] = 15};
y[t_] := 5 - 0.1525  r[t - 1] + 0.95625  y[t - 1]
r[t_] := -4 + 0.44  r[t - 1] + 0.2  y[t - 1]

trajdata852 = Table[{y[t], r[t]}, {t, 0, 15}];

MultipleListPlot[trajdata62, trajdata852, PlotJoined -> True, 
        AxesLabel -> {"y(t)", "r(t)"}, 
        PlotLegend -> {"u=0.5", "u=0.7"},  
        PlotLabel -> "α=0.1,β=0.8",  
        LegendPosition -> {-0.35, -1.2}, 
        LegendOrientation -> Horizontal, 
        LegendSize -> {1,  .5}];

Clear[y, r]

{α = 0.5, β = 0.8}

Simplify[
      Solve[y1 - 
            y == α (c (1 - trate) - 1) 
              y - α h r + α a, y1]]

Simplify[
      Solve[r1 - r == β k y  -  β u r  -  β m0, 
        r1]]

{y[0] = 62, r[0] = 15};
y[t_] := 25 - 0.7625  r[t - 1] + 0.78125  y[t - 1]
r[t_] := -4 + 0.44  r[t - 1] + 0.2  y[t - 1]

trajdata853 = Table[{y[t], r[t]}, {t, 0, 15}];

MultipleListPlot[trajdata63, trajdata853, PlotJoined -> True, 
        AxesLabel -> {"y(t)", "r(t)"}, 
        PlotLegend -> {"u=0.5", "u=0.7"},  
        PlotLabel -> "α=0.5,β=0.8",  
        LegendPosition -> {-0.35, -1.2}, 
        LegendOrientation -> Horizontal, 
        LegendSize -> {1,  .5}];

Question 9

The model is,
	\(TraditionalForm
      \`y\_\(t + 1\) - y\_t = 
        α[c(1 - trate) - 1] y\_t - α\ h\ r\_t + α\ a\)\(TraditionalForm
      \`r\_\(t + 1\) - r\_t = 
        β\ k\ y\_t - β\ u\ r\_t - β\ m\_0\)

Clear[y, r]

{a = 55, c = 0.75,  trate = 0.25, h = 1.525, m0 = 5, k = 0.25, 
      u = 0.5, α = 0.5, β = 0.8}

Simplify[
      Solve[y1 - 
            y == α (c (1 - trate) - 1) 
              y - α h r + α a, y1]]

Simplify[
      Solve[r1 - r == β k y  -  β u r  -  β m0, 
        r1]]

Clear[ybar, rbar]

Solve[{ybar == 27.5 - 0.7625  rbar + 0.78125  ybar, 
        rbar == -4 + 0.6  rbar + 0.2  ybar}, {ybar, rbar}]

{y[0] = 54.375, r[0] = 17.1875};
y[t_] := 27.5 - 0.7625  r[t - 1] + 0.78125  y[t - 1]
r[t_] := -4 + 0.6  r[t - 1] + 0.2  y[t - 1]

trajdata9 = Table[{y[t], r[t]}, {t, 0, 15}];

ListPlot[trajdata9, PlotJoined -> True, 
        AxesLabel -> {"y(t)", "r(t)"},  
        PlotLabel -> "a=55"];

Question 10

Clear[y, r]

{a = 45}

Simplify[
      Solve[y1 - 
            y == α (c (1 - trate) - 1) 
              y - α h r + α a, y1]]

Simplify[
      Solve[r1 - r == β k y  -  β u r  -  β m0, 
        r1]]

Clear[ybar, rbar]

Solve[{ybar == 22.5 - 0.7625  rbar + 0.78125  ybar, 
        rbar == -4 + 0.6  rbar + 0.2  ybar}, {ybar, rbar}]

{y[0] = 54.375, r[0] = 17.1875};
y[t_] := 22.5 - 0.7625  r[t - 1] + 0.78125  y[t - 1]
r[t_] := -4 + 0.6  r[t - 1] + 0.2  y[t - 1]

trajdata10 = Table[{y[t], r[t]}, {t, 0, 15}];

ListPlot[trajdata10, PlotJoined -> True, 
        AxesLabel -> {"y(t)", "r(t)"},  
        PlotLabel -> "a=45"];

Question 11

(i) Example 10.5

The model is,
	\(TraditionalForm
      \`\(y\& . \) = 
        α[c(1 - trate) + j - 1] y - α\ h\ r + α\ a\)\(TraditionalForm
      \`\(r\& . \) = β\ k\ y - β\ u\ r - β\ m\_0\)

{a = 2, c = 0.75,  trate = 0.25, h = 1.525, j = 0.8, m0 = 8, k = 0.25, 
      u = 0.5, α = 0.05, β = 0.8}

Simplify[
      Solve[ydot == α (c (1 - trate) + j - 1) 
              y - α h r + α a, ydot]]

Simplify[
      Solve[rdot == β k y  -  β u r  -  β m0, 
        rdot]]

Clear[ybar, rbar]

Solve[{0 == 0.1 - 0.07625  rbar + 0.018125  ybar, 
        0 == -6.4 - 0.4  rbar + 0.2  ybar}, {ybar, rbar}]

iscurve = 
      Simplify[Solve[
          0 == α (c (1 - trate) + j - 1) 
                y - α h r + α a, r]]

lmcurve = 
      Simplify[Solve[
          0 == β k y  -  β u r  -  β m0, 
          r]]

We shall take the initial point to be (y, r) = (70, 15).

Clear[y, r]

sol11 = 
      NDSolve[{y'[t] == 
            0.1 - 0.07625  r[t] + 0.018125  y[t], r'[t] == -6.4 - 
              0.4  r[t] + 0.2  y[t], y[0] == 70, r[0] == 15}, {y, r}, {t, 0, 
          40}]

tr11 = 
        ParametricPlot[{y[t], r[t]} /. sol11, {t, 0, 40}, 
          AxesLabel -> {"y(t)", "r(t)"}];

Which illustrates the statement in the text that we have a stable path which appears to traverse a straight line path after a certain time period.

(ii) Example 10.6

{a = 2, c = 0.8,  trate = 0.2, h = 1.525, j = 0.95, m0 = 8, k = 0.25, 
      u = 0.25, α = 0.2, β = 0.3}

Simplify[
      Solve[ydot == α (c (1 - trate) + j - 1) 
              y - α h r + α a, ydot]]

Simplify[
      Solve[rdot == β k y  -  β u r  -  β m0, 
        rdot]]

Clear[ybar, rbar]

Solve[{0 == 0.4 - 0.305  rbar + 0.118  ybar, 
        0 == -2.4 - 0.075  rbar + 0.075  ybar}, {ybar, rbar}]

iscurve = 
      Simplify[Solve[
          0 == α (c (1 - trate) + j - 1) 
                y - α h r + α a, r]]

lmcurve = 
      Simplify[Solve[
          0 == β k y  -  β u r  -  β m0, 
          r]]

We shall take the initial point to be (y, r) = (70, 15).

Clear[y, r]

sol112 = 
      NDSolve[{y'[t] == 
            0.4 - 0.305  r[t] + 0.118  y[t], r'[t] == -2.4 - 
              0.075  r[t] + 0.075  y[t], y[0] == 70, r[0] == 15}, {y, r}, {t, 
          0, 100}]

tr112 = 
        ParametricPlot[{y[t], r[t]} /. sol112, {t, 0, 100}, 
          AxesLabel -> {"y(t)", "r(t)"}];

Which illustrates the statement in the text that we have an unstable spiral.

Question 12

{a = -25, c = 0.75,  trate = 0.25, h = 1, j = 0.95, m0 = 8, 
      k = 0.22, u = 0.75, α = 0.1, β = 0.8}

Simplify[
      Solve[ydot == α (c (1 - trate) + j - 1) 
              y - α h r + α a, ydot]]

Simplify[
      Solve[rdot == β k y  -  β u r  -  β m0, 
        rdot]]

Clear[ybar, rbar]

Solve[{0 == -2.5 - 0.1  rbar + 0.05125  ybar, 
        0 == -6.4 - 0.6  rbar + 0.176  ybar}, {ybar, rbar}]

iscurve = 
      Simplify[Solve[
          0 == α (c (1 - trate) + j - 1) 
                y - α h r + α a, r]]

lmcurve = 
      Simplify[Solve[
          0 == β k y  -  β u r  -  β m0, 
          r]]

Writing the system in matrix form we have,
	(({{\(y\& . \)}, {\(r\& . \)}}))=(({{0.05125, -0.1}, {0.176, -0.6}}))(({{\(y - \(y\^*\)\)}, {\(r - \(r\^*\)\)}}))

matrixA=(({{0.05125, -0.1}, {0.176, -0.6}}))

Det[matrixA]

traceA = Sum[matrixA[[i, i]], {i, 2}]

Eigenvalues[matrixA]

Eigenvectors[matrixA]

Let \(TraditionalForm\`u = y - \(y\^*\)\) and \(TraditionalForm\`v = r - \(r\^*\)\), then for the first eigenvalue we can solve,

Clear[u, v]

Simplify[Solve[0.05125  u - 0.1  v == -0.57175 u, v]]

Using the second eigenvalue we obtain,

Clear[u, v]

Simplify[Solve[0.05125  u - 0.1  v == 0.0229996  u, v]]

islm = 
        Plot[{-25 + 0.5125  y, -10.6667 + 0.29333  y}, {y, 20, 100}, 
          PlotRange -> {0, 25}, AxesLabel -> {"y", "r"}, 
          DisplayFunction -> Identity];

Clear[y, r]

Simplify[Solve[r - 8.51711 == 6.23 (y - 65.3992), r]]

Clear[y, r]

Simplify[
      Solve[r - 8.51711 == 0.282504 (y - 65.3992), r]]

saddles = 
        Plot[{-398.92 + 6.23  y, -9.95843 + 0.282504  y}, {y, 20, 
            100}, PlotRange -> {0, 25}, PlotStyle -> Dashing[{0.01}], 
          DisplayFunction -> Identity];

Show[islm, saddles, 
        DisplayFunction -> $DisplayFunction];

Taking the following four initial points, one from each sector,
	(y, r) = (40, 15)	(y, r) = (90, 18)
	(y, r) = (80, 5)	(y, r) = (50, 2)

sol121 = 
      NDSolve[{y'[t] == -2.5 - 0.1  r[t] + 0.05125  y[t], r'[
              t] == -6.4 - 0.6  r[t] + 0.176  y[t], y[0] == 40, 
          r[0] == 15}, {y, r}, {t, 0, 20}]

sol122 = 
      NDSolve[{y'[t] == -2.5 - 0.1  r[t] + 0.05125  y[t], r'[
              t] == -6.4 - 0.6  r[t] + 0.176  y[t], y[0] == 90, 
          r[0] == 18}, {y, r}, {t, 0, 20}]

sol123 = 
      NDSolve[{y'[t] == -2.5 - 0.1  r[t] + 0.05125  y[t], r'[
              t] == -6.4 - 0.6  r[t] + 0.176  y[t], y[0] == 80, 
          r[0] == 5}, {y, r}, {t, 0, 20}]

sol124 = 
      NDSolve[{y'[t] == -2.5 - 0.1  r[t] + 0.05125  y[t], r'[
              t] == -6.4 - 0.6  r[t] + 0.176  y[t], y[0] == 50, 
          r[0] == 2}, {y, r}, {t, 0, 20}]

trj121 = 
        ParametricPlot[{y[t], r[t]}  /. sol121,  {t, 0, 20},  
          DisplayFunction -> Identity];

trj122 = 
        ParametricPlot[{y[t], r[t]}  /. sol122,  {t, 0, 20},  
          DisplayFunction -> Identity];

trj123 = 
        ParametricPlot[{y[t], r[t]}  /. sol123,  {t, 0, 20},  
          DisplayFunction -> Identity];

trj124 = 
        ParametricPlot[{y[t], r[t]}  /. sol124,  {t, 0, 20},  
          DisplayFunction -> Identity];

Show[islm, saddles, trj121, trj122, trj123, trj124, 
        DisplayFunction -> $DisplayFunction];

Question 13

(i)

Clear[b1, k, u, y, m0, q]

Given
	q = f(
            y) = (((Subscript[b, 1]) y)/((k y - m0)/u))
with linear approximation
	\(TraditionalForm\`q = \(q\^*\) + \(\(f\^′\)(\(y\^*\))\)\ \((y - \(y\^*\))\)\)
then

Simplify[D[((b1 y)/((k y - m0)/u)), y]]

Hence,
	\(TraditionalForm\`q = \(q\^*\) - \([\(\(b\_1\) \(m\_0\) u\)\/\((k\ \(y\^*\) - m\_0)\)\^2]\) \((y - \(y\^*\))\)\)
which is the same as the expression in the text on p.458, since (dq/dy) can be simplified as shown here.

(ii)

First we need to solve for equilibrium y and q.

Solve[{0 == 14 - 0.4  y + 0.4  q, 
        0 == 1.25  q y - 0.1  y - 40  q}, {y, q}]

Ignoring the negative values, then

Simplify[
      Solve[q == 
          13.7604 - ((0.1 (8) (0.2))/((((0.25) (35.7607) - 8))^2)) (y - 35.7607), q]]

To obtain the stable arm of the saddle point equilibrium, we note that
	\(TraditionalForm\`q\& .  = \(ϕ(q, y) = 
          1.25  q\ y - 0.1  y - 40  q\)\)
with the linear approximation,
	\(TraditionalForm\`q\& .  = \(ϕ\_y\)(y - \(y\^*\)) + \(ϕ\_q\)(
            q - \(q\^*\))\)
and where (Subscript[ϕ, y]) and (Subscript[ϕ, q]) are both evaluated at the equilibrium point \(TraditionalForm\`\((\(y\^*\), \(q\^*\))\)\).

eq = 1.25  q y  -  0.1 y - 40  q

D[eq, y]  /. {y -> 35.7607, q -> 0.7607}

D[eq, q]  /. {y -> 35.7607, q -> 0.7607}

The linear approximation of the system is, therefore,
	\(TraditionalForm\`y\& .  = \(-0.4\) \((y - \(y\^*\))\) + 
          0.4 \((q - \(q\^*\))\)\)
\(TraditionalForm\`q\& .  = 
        0.850875 \((y - \(y\^*\))\) + 4.70087 \((q - \(q\^*\))\)\)
whose matrix of the system is,
	A=(({{-0.4, 0.4}, {0.850875, 4.70087}}))
In order to derive the equation of the stable arm we need to obtain the eigenvectors of the stable arm.
	Let us use Mathematica to obtain both the eigenvalues and the eigenvectors of the system.

matrixA=(({{-0.4, 0.4}, {0.850875, 4.70087}}))

Eigenvalues[matrixA]

Eigenvectors[matrixA]

To see that these are very similar to those given on p.298 of the text, we readily establish

{{1, (-0.997017)/(-0.0771872)}, {1, 
        0.162494/(-0.986709)}}

As indicated in the text, the stable arm is the eigenvector associated with the eigenvalue -0.465873. Hence,
	\(TraditionalForm\`q - \(q\^*\) = \(-0.164683\) \((y - \(y\^*\))\)\)

Simplify[
      Solve[q == 0.7607 - 0.164683 (y - 35.7607), q]]

Simplify[
      Solve[0 == 0.850875 (y - 35.7607) + 4.70087 (q - 0.7607), 
        q]]

Question 14

(i)

Clear[y, r]

Solve[{0 == 5 + 0.75 (1 - 0.25) y - 0.3  r + 0.4  y - y, 
        0 == 0.5  y - 0.3  r - 10}, {y, r}]

(ii)

Simplify[
      Solve[0 == 5 + 0.75 (1 - 0.25) y - 0.3  r + 0.4  y - y, 
        r]]

Simplify[Solve[0 == 0.5  y - 0.3  r - 10, r]]

(iii)

Simplify[
      0.25 (5 + 0.75 (1 - 0.25) y - 0.3  r + 0.4  y - y)]

Simplify[0.4 (0.5  y - 0.3  r - 10)]

mA = {{-0.009375, -0.075}, {0.2, -0.12}}

Tr[mA]

Det[mA]

Tr[mA]^2 - 4 Det[mA]

Hence we have a stable sprial.

Question 15

(i)

Clear[y, q]

First we need to solve for the equilibrium y and q.

Solve[{0 == 14 - 0.4  y + 0.4  q, 
        0 == 2  q y - 0.15  y - 64  q}, {y, q}]

Ignoring the negative values, then

Simplify[
      Solve[q == 
          0.720137 - ((0.15 (16) (0.25) (y - 35.7201))/(((0.5 (35.7201) - 16))^2)), q]]

i.e.
	q = 6.91476 - 0.173421  y
To obtain the saddle arm of the saddle point equilibrium, we note that
	\(TraditionalForm\`\(q\& . \) = \(ϕ(q, y) = 
          2  q\ y - 0.15  y - 64  q\)\)
with linear approximation,
	\(TraditionalForm\`\(q\& . \) = \(ϕ\_y\)(y - ye) + \(ϕ\_q\)(
            q - qe)\)
where (Subscript[ϕ, y]) and (Subscript[ϕ, q]) are both evaluated at the equilibrium point point (ye, qe).

eq = 2  q y - 0.15  y - 64  q

D[eq, y]  /.  q -> 0.720137

D[eq, q]  /.  {q -> 0.720137,  y -> 35.7201}

The linear approximation of the system is, therefore,
	\(TraditionalForm\`\(y\& . \) = \((\(-0.4\))\) \((y - ye)\) + 
          0.4 \((q - qe)\)\)
\(TraditionalForm\`\(q\& . \) = 
        1.29027 \((y - ye)\) + 7.4402 \((q - qe)\)\)
whose matrix of the system is,
	A = (({{-0.4, 0.4}, {1.29027, 7.4402}}))
In order to derive the equation of the stable arm we need to obtain the eigenvectors of the stable arm.

Let us use Mathematica to obtain both the eigenvalues and the eigenvectors of the system.

A = {{-0.4, 0.4}, {1.29027, 7.4402}}

Eigenvalues[A]

Eigenvectors[A]

These can be expressed

{{1, -0.998722/(-0.0505331)}, {1, 
        0.161081/(-0.986941)}}

As indicated in the text, the stable arm is the eigenvector associated with the eigenvalue -0.465285. Hence
q - qe = -0.163212 (y - ye)

Simplify[
      Solve[q == 0.720137 - 0.163212 (y - 35.7201), q]]

Solving for the linear approximation (∂_t) q = 0

Simplify[
      Solve[0 == 1.29027 (y - 35.7201) + 7.4402 (q - 0.720137), 
        q]]