3
$\begingroup$

How would I solve these ODE's both with initial conditions $I(t)=I_0$

$$\frac{d I}{dt} = \beta I - \frac{\beta I^2}{N} \qquad (1)$$

and

$$\frac{d I}{dt} = (\beta-\gamma) I - \frac{\beta I^2}{N} \qquad (2)$$

A solution was given to the second ODE on a paper but I don't know how they got it:

$$ I(t)= \frac{\left(\beta-\gamma\right)NI_0} {\left(\beta-\gamma\right)N e^{-\left(\beta-\gamma\right)t} +\beta I_0 \left[1- e^{-\left(\beta-\gamma\right)t} \right] } $$

Thank you.

$\endgroup$
3
  • $\begingroup$ @MariuszIwaniuk thank you, really appreciated! Maybe you should post that as an answer so I can give you best answer :) $\endgroup$
    – Math
    Mar 1, 2021 at 16:18
  • $\begingroup$ Both are versions of the logistic equation, which is solvable as a Bernoulli differential equation / Riccati equation. $\endgroup$
    – Chris K
    Mar 1, 2021 at 18:44
  • $\begingroup$ And to state what is probably obvious, the first equation is the special case of the second when $\gamma=0$. $\endgroup$
    – Chris K
    Mar 1, 2021 at 23:37

1 Answer 1

3
$\begingroup$
DSolve[{i'[t] == (β - γ)*i[t] - β i[t]^2/n,i[0] == I0}, i[t], t] // FullSimplify
$\endgroup$
1
  • $\begingroup$ Can you plot this solution? $\endgroup$
    – Math
    Aug 24, 2021 at 14:13

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