2
$\begingroup$

I am trying to have 5 PDEs with 5 unknowns, with code below However, I always receive the error message that Equation or list of equations expected instead of 0.0001` in the first argument {(s^[Prime])[t]==-0.325 s[t]-1.5 i[t] s[t]-1.5 j[t] s[t],(i^[Prime])[t]==-(i[t]/14)+1.5 i[t] s[t],(j^[Prime])[t]==-(j[t]/14)+6 j[t] r[t]+6 j[t] s[t],(r^[Prime])[t]==i[t]/14-6 j[t] r[t]+0.25 s[t],(z^[Prime])[t]==j[t]/14+0.075 s[t],s[0]==0.9998,i[0]==0.0001,0.0001,r[0]==0.,0.}.

Equation or list of equations expected instead of 0.0001` in the first argument {(s^[Prime])[t]==-0.325 s[t]-1.5 i[t] s[t]-1.5 j[t] s[t],(i^[Prime])[t]==-(i[t]/14)+1.5 i[t] s[t],(j^[Prime])[t]==-(j[t]/14)+6 j[t] r[t]+6 j[t] s[t],(r^[Prime])[t]==i[t]/14-6 j[t] r[t]+0.25 s[t],(z^[Prime])[t]==j[t]/14+0.075 s[t],s[0]==0.9998,i[0]==0.0001,0.0001,r[0]==0.,0.}.

ClearAll["Global`*"]
EquationS = 
 s'[t] == -\[Beta]1* s[t]* i[t] - \[Beta]1* s[t] * 
    j[t] - (1 + \[Eta]) v *s[t]
EquationI1 = i'[t] == \[Beta]1* s[t]* i[t] - \[Gamma] *i[t]
EquationI2 = 
 j'[t] == \[Beta]2*s[t]* j[t] - \[Gamma] *j[t] + \[Beta]2*r[t]*j[t]
EquationR1 = r'[t] == \[Gamma] *i[t] + v *s[t] - \[Beta]2*r[t]*j[t]
EquationR2 = z'[t] == \[Gamma] *j[t] + \[Eta] *v *s[t]
\[Beta]1 = 1.5
\[Beta]2 = 6
\[Gamma] = 1/14
\[Eta] = 0.3
v = 0.25
solution = 
 NDSolve[{EquationS, EquationI1, EquationI2, EquationR1, EquationR2, 
   s[0] == 0.9998, i[0] == 0.0001, j[0] = 0.0001, r[0] == 0.0000, 
   z[0] = 0.000}, {s, i, r, j, z}, {t, 100}]

$\endgroup$
1
  • $\begingroup$ Seems that I have been absent from Mathematica for a long time. The initial values should have two equal signs. Problem solved :) $\endgroup$ Aug 5 at 3:29