Solution (source code)

= Solution

An <equilibrium of an autonomous differential equation> is a constant $y_*$ with $f(y_*)=0$. Put $y=y_*+\eta$. For differentiable $f$, the <linear stability analysis> gives
$$
\eta'=f'(y_*)\eta+o(\eta).
$$
Thus the linear perturbation is proportional to $e^{f'(y_*)x}$. More directly, continuity of $f'$ makes $f(y)$ point toward $y_*$ on both sides when $f'(y_*)<0$, and away from it when $f'(y_*)>0$. Hence
$$
\boxed{f'(y_*)<0:\ \text{asymptotically stable};\qquad f'(y_*)>0:\ \text{unstable}.}
$$
The sign refers to evolution toward increasing $x$. If $f'(y_*)=0$, <linear stability analysis> is inconclusive: the leading nonzero nonlinear term or the signs of $f$ on either side are needed. For example $\eta'=-\eta^3$ is attracting whereas $\eta'=\eta^3$ is repelling, despite the same zero linear coefficient.