The dimensional phase-space plot
The analysis of the predator-prey model is incomplete without the phase-space plot. So, here it is,
a = 2/3; b = 4/3; c = 1; d = 1;
sol[x0_?NumericQ] := First@NDSolve[{x'[t] == a*x[t] - b*x[t]*y[t], y'[t] == c*x[t]*y[t] -
d*y[t], x[0] == x0, y[0] == x0}, {x, y}, {t, 0, 20}];
ParametricPlot[Evaluate[{x[t], y[t]} /. sol[#] & /@ Range[0.9, 1.8, 0.1]], {t, 0, 20},
PlotRange -> All, Frame -> True]
The dimensionless Lotka–Volterra equations
Following the lecture notes for Mathematical Biology by Jeffrey R. Chasnov ( section 1.4 page no. 11), we can have the dimensionless equations in the following form,
$$\frac{d U}{dt}=r(U-UV),\quad \frac{dV}{dt}=\frac{1}{r}(UV-V),$$
where $r=\sqrt{\alpha/\beta}$, a nondimensional parameter. In the notes, the author has solved the above system using Matlab numerical solver ode45
. Here, I will reproduce his results using Mathematica.
The solution to the above system is found using ParametricNDSolveValue
for different values of $r$.
sol = ParametricNDSolveValue[{U'[t] == r*(U[t] - U[t]*V[t]),
V'[t] == 1/r*(U[t]*V[t] - V[t]), U[0] == 1.1, V[0] == 1}, {U,V}, {t, 0, 20}, {r}];
GraphicsColumn[{Plot[{Evaluate[sol[0.5][[1]]][t],
Evaluate[sol[0.5][[2]]][t]}, {t, 0, 19}, AspectRatio -> .4,
ImageSize -> 500,
PlotLegends ->
Placed[LineLegend[{Red, Directive[Green, Dashed]}, {"prey",
"predator"}], {0.89, 0.89}], PlotRange -> {{0, 19}, {0.8, 1.25}},
PlotStyle -> {Red, Directive[Green, Dashed]}, Frame -> True,
FrameStyle -> AbsoluteThickness[.003],
FrameTicks -> {{Automatic, Automatic}, {Automatic, Automatic}},
PlotRangePadding -> None, ImagePadding -> {{20, 1}, {20, 30}},
Epilog -> {Text[Style["r=0.5", 20], Scaled[{0.6, 0.9}]]}],
Plot[{Evaluate[sol[1][[1]]][t], Evaluate[sol[1][[2]]][t]}, {t, 0,
19}, AspectRatio -> .4, PlotRange -> {{0, 19}, {0.8, 1.25}},
PlotStyle -> {Red, Directive[Green, Dashed]}, Frame -> True,
FrameStyle -> AbsoluteThickness[.003],
FrameTicks -> {{Automatic, Automatic}, {Automatic, Automatic}},
PlotRangePadding -> None, ImagePadding -> {{20, 1}, {20, 30}},
Epilog -> {Text[Style["r=1", 20], Scaled[{0.6, 0.9}]]}],
Plot[{Evaluate[sol[2][[1]]][t], Evaluate[sol[2][[2]]][t]}, {t, 0,
19}, AspectRatio -> .4, PlotRange -> {{0, 19}, {0.8, 1.25}},
PlotStyle -> {Red, Directive[Green, Dashed]}, Frame -> True,
FrameStyle -> AbsoluteThickness[.003],
FrameTicks -> {{Automatic, Automatic}, {Automatic, Automatic}},
PlotRangePadding -> None, ImagePadding -> {{20, 1}, {20, 30}},
Epilog -> {Text[Style["r=2", 20], Scaled[{0.6, 0.9}]]}]},
ImageSize -> 500, Spacings -> -50]
Finally, plotting the phase-space plot for different values of $r$. For this I have utilized once again ?NumericQ
.
sol[r_?NumericQ, U0_?NumericQ] :=First@NDSolve[{U'[t] == r*(U[t] - U[t]*V[t]),
V'[t] == 1/r*(U[t]*V[t] - V[t]), U[0] == U0, V[0] == U0}, {U,V}, {t, 0, 20}];
Grid[{{ParametricPlot[
Evaluate[{U[t], V[t]} /. sol[0.5, #] & /@
Range[0.9, 1.8, 0.1]], {t, 0, 20}, Frame -> True,
Epilog -> {Text[Style["r=0.5", 20], Scaled[{0.8, 0.8}]]},
ImageSize -> 200, PlotRange -> {{0, 4}, {0, 4}}],
ParametricPlot[
Evaluate[{U[t], V[t]} /. sol[1, #] & /@ Range[0.9, 1.8, 0.1]], {t,
0, 20}, Frame -> True,
Epilog -> {Text[Style["r=1", 20], Scaled[{0.8, 0.8}]]},
ImageSize -> 200, PlotRange -> {{0, 4}, {0, 4}}],
ParametricPlot[
Evaluate[{U[t], V[t]} /. sol[2, #] & /@ Range[0.9, 1.8, 0.1]], {t,
0, 20}, Frame -> True,
Epilog -> {Text[Style["r=2", 20], Scaled[{0.8, 0.8}]]},
ImageSize -> 200, PlotRange -> {{0, 4}, {0, 4}}]}}]
The simply way to plot the phase planes of system is to use StreamPlot
Grid[{{With[{r = 0.5},
StreamPlot[{r*(U - U*V), 1/r*(U*V - V)}, {U, 0, 5}, {V, 0, 5},
Epilog -> {Text[Style["r=0.5", 20], Scaled[{0.8, 0.8}]]}]],
With[{r = 1},
StreamPlot[{r*(U - U*V), 1/r*(U*V - V)}, {U, 0, 5}, {V, 0, 5},
Epilog -> {Text[Style["r=1", 20], Scaled[{0.8, 0.8}]]}]],
With[{r = 2},
StreamPlot[{r*(U - U*V), 1/r*(U*V - V)}, {U, 0, 5}, {V, 0, 5},
Epilog -> {Text[Style["r=2", 20], Scaled[{0.8, 0.8}]]}]]}}]