Solution (source code)

= Solution

Let $\phi_t(x_0)$ denote the <flow map> generated by $\dot x=f(x)$.

* The fixed point $0$ is <asymptotic stability>[asymptotically stable] if it is <Lyapunov stability>[Lyapunov stable] and there is a neighbourhood $U$ of $0$ such that $\phi_t(x_0)\to0$ as $t\to\infty$ for every $x_0\in U$.
* Its <domain of stability>, or <basin of attraction>, is $\{x_0:\phi_t(x_0)\to0\text{ as }t\to\infty\}$, with forward existence understood.
* A <Lyapunov function> on a neighbourhood $E$ of $0$ is a continuous function $V$, differentiable away from the origin, such that $V(0)=0$, $V(x)>0$ for $x\ne0$, and its <orbital derivative>
$$
\dot V(x)=\nabla V(x)\mathbin{\cdot}f(x)
$$
is nonpositive on $E$.

The <First Lyapunov theorem> says that the existence of such a function makes the origin Lyapunov stable. To prove it, choose a sufficiently small closed ball $\overline B_\varepsilon\subset E$. By <compactness> and positive definiteness,
$$
\alpha=\min_{\lVert x\rVert=\varepsilon}V(x)>0.
$$
By <continuity>, some $\delta>0$ satisfies $V(x)<\alpha$ whenever $\lVert x\rVert<\delta$. Along a trajectory beginning in $B_\delta$, $V$ cannot increase. Such a trajectory therefore cannot reach the sphere $\lVert x\rVert=\varepsilon$, where $V\geq\alpha$. Hence it remains in $B_\varepsilon$ for every $t\geq0$, which is Lyapunov stability.

The <LaSalle invariance principle> says that if a trajectory remains in a compact <positively invariant set> on which $\dot V\leq0$, then it approaches the largest invariant subset of $\{x:\dot V(x)=0\}$.