SIR first integral (source code)

= SIR first integral
{c}
{title2=$i+s-(\gamma/\beta)\ln s$}

For $s>0$, the <SIR model equations> have the <first integral of an ordinary differential equation>
$$
i(t)+s(t)-\frac{\gamma}{\beta}\ln s(t)
=i_0+s_0-\frac{\gamma}{\beta}\ln s_0.
$$
Here $\ln$ is the <natural logarithm>. A short proof outline is to use the <chain rule> and substitute the <SIR model equations>:
$$
\frac{d}{dt}\left(i+s-\frac{\gamma}{\beta}\ln s\right)
=-\gamma i-\frac{\gamma}{\beta}\frac{-\beta si}{s}=0.
$$
The <SIR first integral> gives $i$ directly from $s$, so it describes the curve in a <phase portrait> even before its time parametrization is known.