Solution (source code)

= Solution

In the first-order <Taylor expansion> correction it suffices to use the zeroth-order <derivatives>. They give
$$
\dot I\,S+I\dot S=(rIS-aI)S+I(-rIS)=IS\{r(S-I)-a\}.
$$
The delayed product is consequently
$$
I(t-\tau)S(t-\tau)=IS+\tau IS\{a+r(I-S)\}+O(\tau^2).
$$
Multiplying by $r$ and substituting into the two transfer equations produces
$$
\boxed{f(I,S,r,a)=r\{a+r(I-S)\},\qquad g(I,S,r,a)=-r\{a+r(I-S)\}.}
$$
The opposite signs of $f$ and $g$ are also required by <conservation law> of $S+I+R$: this correction changes the timing of the transfer between $S$ and $I$, while leaving the instantaneous death term unchanged.