What is a counterexample to LaSalle invariance principle? I realized I have never understood LaSalle's invariance principle because I have never seen a counterexample to it.
LaSalle's invariance principle is usually stated as,

Let $\Omega \subset D$ be a compact set that is positively invariant
with respect to $\dot x = f(x)$. Let $V: D \subset R$ be a
continuously differentiable function such that $\dot V(x) \leq 0$ in
$\Omega$. Let $E$ be the set of all points in $\Omega$ where $\dot
 V(x) = 0$. let $M$ be the largest invariant set in $E$. Then every
solution starting in $\Omega$ approaches $M$ as $t\to \infty$.

For example, is it possible to come up with an example where the largest invariant set in $E$ is the empty set, hence we do not have conclusion?
or as a corollary to it

Let $x = 0$ be an equilibrium point of $\dot x = f(x)$. Let $V : D ⊂ R ^n → R$ be a
continuously differentiable, positive definite function on $D$ such
that $\dot V (x) ≤ 0$ for all $x ∈ D$. Assume that no solution, other
than the trivial solution $x(t) ≡ 0$, can stay identically in $\{x ∈ D
| \dot V (x) = 0\}$. Then $x = 0$ is asymptotically stable.

http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.711.2224&rep=rep1&type=pdf
http://www.cds.caltech.edu/archive/help/uploads/wiki/files/237/Lecture2_notes_CDS270.pdf
For example, the statement "Assume that no solution, other
than the trivial solution $x(t) ≡ 0$, can stay identically in $\{x ∈ D | \dot V (x) = 0\}$." is quite vague to me. Can someone come up with an example where there does exist solution, other than $x(t) = 0$ that stays identically in $\{x ∈ D | \dot V (x) = 0\}$, such that this results in a violation of the theorem?
If not, any example that violates LaSalle invariance principle helps!
 A: Consider the linear dynamics
$$\begin{aligned}
\dot{x}(t) &= -x,\\
\dot{y}(t) &= 0.\\
\end{aligned}
$$
You can verify that if we consider the compact set $\Omega = [-1, 1]^2$ that the Lyapunov candidate
$$V(x) := x^2 + y^2$$
satisfies
$$\dot{V}(x) = - 2 x^2 \leq 0.$$
Moreover, the largest invariant set in $\Omega$ is the $y$-axis,
$$M := \left\{ (0, y) \in \mathbb{R}^2 \colon (x,y) \in \Omega \right\}.$$
In this example we can only show solutions tend to $M$ and can't use the corollary simply because solutions on the $y$-axis don't tend to the origin. That is, there exists a non-trivial solution $\gamma(t) := (0, y_0)$ with $y_0 \neq 0$ that satisfies $\dot{V} \leq 0$ for all time. The crucial fact is that the dynamics on the largest invariant set aren't, themselves, asymptotically tending to the origin. This could be because, like in this example, the dynamics restricted on that set aren't asymptotically stable. But it can be much worse than that. Consider the following example:
$$\begin{aligned}
\dot{x}(t) &= -x (1 - x^2 - y^2)^2\\
\dot{y}(t) &= -y (1 - x^2 - y^2)^2
\end{aligned}$$
and of course consider a compact set $\Omega$ that contains the unit circle.
You can verify that, using the same Lyapunov candidate, you can only conclude solutions tend to the largest invariant set, which in this case is the union of the unit circle and the origin. To see why, observe with the same choice of candidate
$$\dot{V}(x,y) = -2 (x^2 + y^2) (x^2 + y^2 - 1)^2.$$
This is negative everywhere except when $1 = x^2 + y^2$ and at the origin. Solutions on the unit circle will stay there and can never reach the origin even though all the dynamics outside the unit circle and inside the unit circle have strictly decreasing energy. So hopefully that gives you a picture to draw when thinking about why we need to make assumptions of the behaviour of solutions in $E.$
However, what about breaking the premises of your first statement? This is actually pretty difficult to do besides in the naive way. Let us simply take $\dot{V} \leq 0$ for granted. By assuming $V$ is $C^1,$ you have that $\dot{V}$ is continuous. Since $\Omega$ is compact, $\dot{V}$ obtains a minimum and maximum. Suppose, by way of contradiction, that the maximum of $\dot{V}$ is not $0.$ That is,
$$\dot{V}(x') \leq -\varepsilon < 0$$
at some point $x'\in\Omega.$ This would be the case you are thinking about, that $E$ is empty. Except, here is the problem. Since the solution $x(t) \in \Omega$ for all time, as $\Omega$ is positively invariant, we know that
$$V(t) - V(0) = \int_{0}^t \dot{V}(x(t)) dt$$
is well-defined. We can bound this integral with
$$V(t) - V(0) \leq -\varepsilon t.$$
Now we construct a contradiction. Since $V$ is continuous on the compact set $\Omega$ it obtains a maximum $M$ and see that we have
$$V(t) \leq M - \varepsilon t.$$
Pick a sufficiently large value for time $t$ and see that $V$ is not positive definite on $\Omega.$
This demonstrates that $\dot{V}$ must actually attain a value of $0$ somewhere on $\Omega.$ Where? Well that you don't know. But that's enough to show that $E$ is non-empty.
