The results of these blocks of instructions are both correct but different:
syms r s K P0 P(t)simplify(dsolve(diff(P,t) == r*P*(1-P/K)-s*P, P(0) == P0))>> (K*P0*exp(t*(r - s))*(r - s))/(K*r - K*s - P0*r + P0*r*exp(t*(r - s)))syms r g K P0 P(t)simplify(dsolve(diff(P,t) == r*P*(1-P/K)-g*P, P(0) == P0)) >> -(K*(g - r))/(r - (exp(t*(g - r))*(K*g - K*r + P0*r))/P0)
What's the matter with s and g???
My MATLAB version is 9.5.0.944444 (R2018b)
Best Answer