Solution (source code)

= Solution

The homogeneous equilibria are $0,r,1$. Since $f\prime(0)=-r<0$, $f\prime(1)=r-1<0$, and $f\prime(r)=r(1-r)>0$, the first and last are linearly stable and the middle one unstable.