1
$\begingroup$

The system below may be solved using the observation that the second and third equation admit solution (,0,0,); alternatively, the determinant of these two equations must be 0. Mathematica 11.3 succeeds with a numeric instance

s1 = \[CapitalLambda] - \[Beta] s i + Subscript[\[Gamma], r] r - 
   Subscript[\[Gamma], s] s - \[Mu] s;
e1 = \[Beta] s i - e (Subscript[\[Gamma], e] + \[Mu]);
i1 =  e Subscript[\[Gamma], e] - \[Gamma] i - (\[Mu] + \[Nu]) i;
r1 = \[Gamma] i - Subscript[\[Gamma], r] r + 
   Subscript[\[Gamma], s] s - \[Mu] r;
dyn = {s1, e1, i1, r1}
vz = {0, 0, 0, 0};
eq = Thread[dyn == vz]
cb = { \[Beta] -> 5, \[Gamma] -> 1/2, \[Mu] -> \[CapitalLambda], 
   Subscript[\[Gamma], r] -> 1/6,  Subscript[\[Gamma], s] -> 1/100, 
   Subscript[\[Gamma], e] -> 1/100, \[CapitalLambda] -> 
    40/400, \[Nu] -> 
    Subscript[\[Gamma], r] (1 + \[Gamma]/\[CapitalLambda]) - 1/10};

es = FullSimplify[Solve[(eq //. cb), {s, e, i, r}]]

but does not succeed with a symbolic instance, even after adding positivity assumptions

    cp = {\[Beta] > 0, \[CapitalLambda] > 0, \[Nu] > 0, \[Gamma] > 
    0, \[Mu] > 0, Subscript[\[Gamma], e] > 0, 
   Subscript[\[Gamma], r] > 0};
es = FullSimplify[Solve[eq~Join~cp, {s, e, i, r}]]

Is there a better trick to solve the symbolic case?

$\endgroup$

1 Answer 1

1
$\begingroup$

Without subscribts the equation is solved symbollically

Solve[{-i s \[Beta] + \[CapitalLambda] - s \[Mu]+ r \[Gamma]r - s \[Gamma]s == 0, 
i s \[Beta] - e (\[Mu] + \[Gamma]e) ==0, 
-i \[Gamma] - i (\[Mu] + \[Nu]) + e \[Gamma]e ==0, 
i \[Gamma] - r \[Mu] - r \[Gamma]r + s \[Gamma]s== 0}, {e, s, r,i}]
$\endgroup$
2
  • $\begingroup$ This is useful, but I would like also to know when it is recommended to use subscripts (which are pretty convenient), and when to avoid them :) $\endgroup$
    – florin
    Commented Jun 27, 2021 at 11:42
  • 1
    $\begingroup$ I usually prefer indexed variables instead of subscripts. If you like subscripts it's possible to display indexed variables as subscripts using Format[ a[s_underscore]] := Subscript[a, s] $\endgroup$ Commented Jun 27, 2021 at 14:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.