Solution (source code)

= Solution

Dividing the $I$ equation by the $S$ equation gives
$$
\frac{dI}{dS}=-1+\frac{\gamma}{\beta S}.
$$
Therefore
$$
I+S-\frac\gamma\beta\log S
=I(0)+S(0)-\frac\gamma\beta\log S(0)
$$
is a <first integral>. Define the <basic reproduction number> by $R_0=\beta S(0)/\gamma$. At the removal peak, $S=S(0)/R_0$, and hence
$$
R_{\rm peak}=\frac{S(0)}{R_0}\log R_0,
$$
and, using $S+I+R=N$,
$$
I_{\rm peak}=I(0)+S(0)
-\frac{S(0)}{R_0}{1+\log R_0}.
$$