Strange behavior of dsolve
Show older comments
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)
1 Comment
Stephan
on 27 Mar 2019
interesting. same in R2019a.
Accepted Answer
More Answers (1)
Víctor Jiménez López
on 27 Mar 2019
2 votes
Categories
Find more on Simulink in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!