ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sat, 10 Dec 2016 11:33:27 +0100SIR desolve_systemhttps://ask.sagemath.org/question/35975/sir-desolve_system/var('beta gamma S I R N')
dS = - beta * S * I /N
dI = beta * S * I / N - gamma * I
dR = gamma * I
equilibria = solve([dS, dI, dR], [S, I, R])
show(equilibria)
solve([dS == 0, dI == 0, dR == 0], [S, I])
and the output is [[S == r76, I == 0, R == r77]]
but I know that there is a second one with S == 0, I == 0 and R == 0.
I have tried using desolve_system in the hopes that it prints out both answers but it asks for the ivar and I need it to solve both S and I. Is there some other way or command that I can use where sage will give me both [S == r1, I == 0, R == r1] and [ S == I == R == 0]?Sat, 10 Dec 2016 03:35:40 +0100https://ask.sagemath.org/question/35975/sir-desolve_system/Comment by mforets for <p>var('beta gamma S I R N')
dS = - beta * S * I /N
dI = beta * S * I / N - gamma * I
dR = gamma * I</p>
<p>equilibria = solve([dS, dI, dR], [S, I, R])
show(equilibria)
solve([dS == 0, dI == 0, dR == 0], [S, I])</p>
<p>and the output is [[S == r76, I == 0, R == r77]]
but I know that there is a second one with S == 0, I == 0 and R == 0.
I have tried using desolve_system in the hopes that it prints out both answers but it asks for the ivar and I need it to solve both S and I. Is there some other way or command that I can use where sage will give me both [S == r1, I == 0, R == r1] and [ S == I == R == 0]?</p>
https://ask.sagemath.org/question/35975/sir-desolve_system/?comment=35976#post-id-35976But r76 and r77 are just saying that S and R are arbitrary, including $0$. So there are no missing solutions, right? PS: you can display your code properly by selecting it and pressing the "101010" button in edit mode.Sat, 10 Dec 2016 10:54:16 +0100https://ask.sagemath.org/question/35975/sir-desolve_system/?comment=35976#post-id-35976Comment by tmonteil for <p>var('beta gamma S I R N')
dS = - beta * S * I /N
dI = beta * S * I / N - gamma * I
dR = gamma * I</p>
<p>equilibria = solve([dS, dI, dR], [S, I, R])
show(equilibria)
solve([dS == 0, dI == 0, dR == 0], [S, I])</p>
<p>and the output is [[S == r76, I == 0, R == r77]]
but I know that there is a second one with S == 0, I == 0 and R == 0.
I have tried using desolve_system in the hopes that it prints out both answers but it asks for the ivar and I need it to solve both S and I. Is there some other way or command that I can use where sage will give me both [S == r1, I == 0, R == r1] and [ S == I == R == 0]?</p>
https://ask.sagemath.org/question/35975/sir-desolve_system/?comment=35977#post-id-35977The answer provided in https://ask.sagemath.org/question/35663/epidemiology-equilibria-solved-but-what-happened/ still applies.Sat, 10 Dec 2016 11:33:27 +0100https://ask.sagemath.org/question/35975/sir-desolve_system/?comment=35977#post-id-35977