# Plot of Predator and Prey model problem

I am trying to solve the following problem. I have the following constants and the differential equations.

r=1;
b=1;
c=0.01;
a=0.36;
a1=0.01;
a2=0.05;
c1=2;
c2=1;
μ=0.4;
m=0.01;
d=0.5;
e=15;

deq1 = x'[t] ==r* x[t]-b*x[t]^2-c*x[t]*y[t]-0.6*x[t]*y[t]/(a+x[t])-a1*x[t]z[t]/(e+x[t])
deq2 = y'[t] ==-μ*y[t]+0.6*x[t]*y[t]/(a+x[t])-a2*y[t]z[t]/(d+y[t])
deq3 = z'[t]==-m*z[t]+c1*a1*x[t]*z[t]/(e+x[t])+c2*a2*y[t]*z[t]/(d+y[t])
soln = NDSolve[{deq1, deq2,deq3, x == 0.2, y == 0.05,z==0.05}, {x[t], y[t],z[t]}, {t, 0, 20000}]


But i can not create the 3D plot. Any advice?

One possible way

soln = NDSolveValue[{deq1, deq2, deq3, x == 0.2, y == 0.05,
z == 0.05}, {x, y, z}, {t, 0, 6000}]; ParametricPlot3D[{soln[][t], soln[][t], soln[][t]}, {t, 0,
4500}, AxesLabel -> {"x(t)", "y(t)", "z(t)"}, BaseStyle -> 14,
PlotRange -> All] • Thank you so much! It was easier than I thought! Dec 1, 2022 at 0:43

You can use ParametricNDSolve to control your parameter values:

soln = ParametricNDSolve[{deq1, deq2, deq3, x == 0.2, y == 0.05,
z == 0.05}, {x, y, z}, {t, 0, 20000}, {a, a1, a2, b, c, c1, c2,
d, e, m, r, μ}] ParametricPlot3D[
Evaluate[{
x[0.36, 0.01, 0.05, 1, 0.01, 2, 1, 0.59, 15, 0.02, 1, 0.317][t],
y[0.36, 0.01, 0.05, 1, 0.01, 2, 1, 0.59, 15, 0.02, 1, 0.317][t],
z[0.36, 0.01, 0.05, 1, 0.01, 2, 1, 0.59, 15, 0.02, 1, 0.317][t]
} /. soln
], {t, 0, 10000}, PlotRange -> All, BoxRatios -> {1, 1, 1},
PlotPoints -> 1000, PlotTheme -> "Web",
PlotStyle -> {Black, Opacity[0.3], Thickness[0.003]}
] 