Solution (source code)

= Solution

At a nontrivial equilibrium $I^*>0$, the equation $I'=0$ gives
$$
S^*=\frac\nu\beta.
$$
The equation $R'=0$ gives $R^*=\nu I^*/f$, and conservation of population then yields
$$
I^*=\frac{f(\beta N-\nu)}{\beta(f+\nu)},
\qquad
R^*=\frac{\nu(\beta N-\nu)}{\beta(f+\nu)}.
$$
These values are positive precisely in the epidemic regime $\beta N>\nu$.

Eliminate $R=N-S-I$. The two-dimensional system is
$$
S'=f(N-S-I)-\beta IS,
\qquad
I'=(\beta S-\nu)I.
$$
Set $a=\beta I^*=f(\beta N-\nu)/(f+\nu)>0$. The <Jacobian matrix> at the endemic equilibrium is
$$
J=
\begin{pmatrix}
-(f+a)&-(f+\nu)\\
a&0
\end{pmatrix},
$$
so its eigenvalues satisfy
$$
\lambda^2+(f+a)\lambda+a(f+\nu)=0.
$$
Their sum is $-(f+a)<0$ and their product is $a(f+\nu)>0$, proving <linear stability of a planar equilibrium>[local asymptotic stability].

The discriminant is
$$
\Delta=(f+a)^2-4a(f+\nu).
$$
Writing $r=\beta N-\nu>0$, we have $a=fr/(f+\nu)$. As $f\to0^+$,
$$
\Delta=-4fr+O(f^2)<0,
$$
whereas as $f\to\infty$,
$$
\Delta=f^2-2rf+O(1)>0.
$$
Hence sufficiently slow immunity loss gives a stable focus: $I(t)$ approaches $I^*$ through damped oscillations, corresponding to successively smaller epidemic waves. Sufficiently rapid immunity loss gives a stable node: small disturbances are sums of two decaying real modes and show no forced oscillation. These conclusions and the equilibrium formulas are collected in the <Endemic equilibrium of the SIR model with waning immunity>.