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.Sun, 20 Nov 2016 13:05:18 +0100Epidemiology equilibria solved, but what happened??https://ask.sagemath.org/question/35663/epidemiology-equilibria-solved-but-what-happened/ var('beta gamma S I R N')
dS = - beta * S * I / N
dI = beta * S * I / N - gamma * I
dR = gamma * I
solve([dS == 0, dI == 0, dR == 0], [S, I, R])
[[S == r7, I == 0, R == r8]]
Why am i getting different values for S and R which correlate to how many times I run the code? At first I thought that it was because I did an interpolate above, but when I went and modified the code a bit at the beginning I was still left with increasing equilibria values.
the next run will be [[S == r9, I == 0, R == r10]] Does anyone know why this is happening??Sun, 20 Nov 2016 09:59:00 +0100https://ask.sagemath.org/question/35663/epidemiology-equilibria-solved-but-what-happened/Answer by tmonteil for <p>var('beta gamma S I R N')</p>
<p>dS = - beta * S * I / N
dI = beta * S * I / N - gamma * I
dR = gamma * I</p>
<p>solve([dS == 0, dI == 0, dR == 0], [S, I, R])
[[S == r7, I == 0, R == r8]]</p>
<p>Why am i getting different values for S and R which correlate to how many times I run the code? At first I thought that it was because I did an interpolate above, but when I went and modified the code a bit at the beginning I was still left with increasing equilibria values.</p>
<p>the next run will be [[S == r9, I == 0, R == r10]] Does anyone know why this is happening??</p>
https://ask.sagemath.org/question/35663/epidemiology-equilibria-solved-but-what-happened/?answer=35664#post-id-35664The solution `[[S == r7, I == 0, R == r8]]` should be read as follows: the set of solutions is an infinite two-parameter space, which can be parametrized by two anonymous parameters `r7` and `r8` that Sage created for the purpose of describing the solution set. Each time you solve a new equation whose set of solutions is huge, Sage will create new parameters (symbolic variables) to serve as a parameters to describe the solutions set.Sun, 20 Nov 2016 13:05:18 +0100https://ask.sagemath.org/question/35663/epidemiology-equilibria-solved-but-what-happened/?answer=35664#post-id-35664