I have been trying to formulate the general equation for the number of susceptibles in the compartmental model for an epidemic where S(t) is the number of susceptibles, I(t) is the number of infectives and R(t) is the number of those who have been recovered all at time t. The equations are:
\begin{align*} &\frac{dS}{dt} = -\beta S(t)I(t)\quad or\quad -\beta SI\\ &\frac{dI}{dt} = \beta SI-\gamma I\\ &\frac{dR}{dt} = \gamma I\\ \end{align*} For solving $I(t)$, I took \begin{align*} &\dfrac{dI}{dS} = \dfrac{dI/dt}{dS/dt}\\ \mbox{i.e.,} \qquad &\frac{dI}{dS} = \frac{\beta SI-\gamma I}{-\beta SI}=-\left(1-\frac{\gamma}{\beta S}\right)=\frac{\gamma}{\beta S}-1\\ \end{align*} After separating the variables, $dI=\left(\dfrac{\gamma}{\beta S}-1\right)dS$
By integrating both sides, we get $I(t)=\dfrac{\gamma}{\beta}lnS - S + C$
where C is an integration constant
If $I(0)=i_0$ and $S(0)=s_0$, then \begin{align*} &i_0 = \dfrac{\gamma}{\beta}lns_0-s_0+C\\ ∴\ &C = i_0-\frac{\gamma}{\beta}lns_0+s_0\\ \implies\ \ &I(t) = \frac{\gamma}{\beta}(lnS-lns_0)-(S-s_0)+i_0\\ &\quad \ \ =\frac{\gamma}{\beta}ln\left(\frac{S}{s_0}\right)-(S-s_0)+i_0\\ \end{align*} The problem is when I put this value in $\dfrac{dS}{dt} = -\beta SI$ \begin{align*} &\mbox{i.e., }\qquad \frac{dS}{dt}=-\beta S\left(\frac{\gamma}{\beta}ln\left(\frac{S}{s_0}\right)-(S-s_0)+i_0\right)\\ &\qquad \qquad \quad \ =-\gamma S\ln\left(\frac{S}{s_0}\right)+\beta S(S-s_0)-\beta Si_0\\ \end{align*} After rearranging and integrating both sides,
$\displaystyle \int{\dfrac{dS}{-\gamma S\ln\left(\dfrac{S}{s_0}\right)+\beta S(S-s_0)-\beta Si_0}} =\int dt $
After which, I don't know what to do. Please tell me what is wrong here and also write the correct method. Thanks.