Solution
= Solution
The same first integral, evaluated initially and after the epidemic when $I(\infty)=0$, gives
$$
\log\frac{S(0)}{S(\infty)}
=\frac\beta\gamma R(\infty).
$$
When $I(0)$ is negligible and $R(0)=0$, <conservation of population> gives $S(\infty)\simeq S(0)-R(\infty)$. Since $\beta/\gamma=R_0/S(0)$, this is equivalent to the <final size relation for an epidemic>
$$
R(\infty)\simeq
\frac{S(0)}{R_0}
\log\frac{S(0)}{S(0)-R(\infty)}.
$$