I'm new to differential equations and I was wondering if I could use the Euler method and the midpoint method to approximate the solution to these three differential equations, as I cannot solve this set of differential equations at my skill level. In addition, are any other ways to approximate these solutions? These equations are the SIR equations used to model an infectious disease.
$${\frac {dS}{dt}}=-{\frac {\beta IS}{N}}$$ $${\frac {dI}{dt}}={\frac {\beta IS}{N}}-\gamma I$$ $${\displaystyle {\frac {dR}{dt}}=\gamma I}$$
This isn't a full answer to the question, but a track for an approximate analytic solution. $$\begin{cases}{\frac {dS}{dt}}=-{\frac {\beta IS}{N}}\\ {\frac {dI}{dt}}={\frac {\beta IS}{N}}-\gamma I \end{cases} \quad\to\quad \frac {dI}{dS}= -1+\frac {\gamma N}{\beta S}$$ $$I=\int \left(-1+\frac{\gamma N}{\beta S} \right)dS = -S+\frac{\gamma N}{\beta}\ln|S|+c_1$$ Given the initial values $I_0$ and $S_0$ at $t=0$ : $\quad c_1=I_0+S_0-\frac{\gamma N}{\beta}\ln|S_0|$ $$I=I_0+S_0 -S+\frac{\gamma N}{\beta}\ln\left|\frac{S}{S_0}\right|$$ With this formula you can graphically represent $I$ as a function of $S$. $$\frac {dS}{dt}= -\frac {\beta IS}{N}= -\frac {\beta S}{N}\left(I_0+S_0 -S+\frac{\gamma N}{\beta}\ln\left|\frac{S}{S_0}\right| \right)$$ $$t=\int \frac{dS}{-\frac {\beta S}{N}\left(I_0+S_0 -S+\frac{\gamma N}{\beta}\ln\left|\frac{S}{S_0}\right| \right)}+c_2$$ $$t=\int_0^S \frac{d\sigma}{-\frac {\beta \sigma}{N}\left(I_0+S_0 -\sigma+\frac{\gamma N}{\beta}\ln\left|\frac{\sigma}{S_0}\right| \right)}$$ This integral cannot be written with a finite number of elementary functions. Moreover, as far as I know, there is no closed form.
So, at this point we have to chose to continue with numerical calculus (which would be the best choice on my opinion) or use approximate, as is asked in the question of the OP.
$$\ln\left|\frac{S}{S_0}\right|\simeq \left(\frac{S_0-S}{S_0}\right)-\frac{1}{2}\left(\frac{S_0-S}{S_0}\right)^2+...$$ Let :$\quad \left(\frac{S_0-S}{S_0}\right)=s$
$$t=\int \frac{ds}{\frac {\beta S_0^2}{N}(1-s)\left(I_0+S_0s+\frac{\gamma N}{\beta}(s+\frac{1}{2}s^2+...) \right)}+c_2$$ With the series limited to the first term for a rough approximate : $$t\simeq\int_0 ^{\frac{S_0-S}{S_0}} \frac{ds}{\frac {\beta S_0^2}{N}(1-s)\left(I_0+(S_0+\frac{\gamma N}{\beta})s \right)}$$ Now the integral is solvable in terms of elementary functions. Of course, this would be an arduous calculus in order to find $t$ as a function of $S$. With the help of symbolic calculus software, I checked that the function $t(S)$ is invertible in terms of elementary functions. It should be too long to write here the big equations. Nevertheless, I am sure that the first approximate $\simeq S(t)$ can be expressed on closed form, in terms of elementary functions.
Then the approximate for $I=I_0+S_0 -S+\frac{\gamma N}{\beta}\ln\left|\frac{S}{S_0}\right|$ can be derived.
Finally, an approximate for $\quad R=\gamma\int I(t)dt\quad$ might be obtained, but I didn't check it.