# System with a Lyapunov function over $\mathbb{R}^n$ but not globally asymptotically stable

I'd like to find an example of a system $\dot{\mathbf{x}} = F(\mathbf{x})$, where $\mathbf{x} = \mathbf{0}$ is an equilibrium point, with a corresponding Lyapunov function $V(\mathbf{x})$ that satisfies:

(1) $V(\mathbf{x}) > 0 \; \forall \mathbf{x} \in \mathbb{R}^n - \{\mathbf{0}\}$, $V(\mathbf{0}) = 0$

(2) $\dot V (\mathbf{x}) < 0 \; \forall \mathbf{x} \in \mathbb{R}^n - \{\mathbf{0}\}$, $\dot V(\mathbf{0}) = 0$

But where the origin is only locally asymptotically stable.

Context:

According to every text book that I've read on the subject, in order to guarantee global asymptotic stability, (1) and (2) are not enough: I also need $\lim_{||\mathbf{x}|| \to \infty} V(\mathbf{x}) = \infty$ (or, equivalently, that every subset of V is bounded). However, when I read the proof of local asymptotic stability, it seems to me that if (1) and (2) apply to all of $\mathbb{R}^n$, then asymptotic stability should also apply to all of $\mathbb{R}^n$.

• I have seen an example but I have to look it up in my documents. I will post an answer as soon as I have found it. – MrYouMath Oct 15 '17 at 15:06
• @Evgeny after careful consideration, I think you are in fact correct. Read any proof on G.A.S. (e.g., stanford.edu/class/ee363/lectures/lyap.pdf , pages 9-10, taking into account that the author considers the fact that $V \to \infty$ as part of the definition of a function being positive definite -see page 5-). The key step where the boundness of sublevel sets comes into play is where the set $C =\left \{ z | \epsilon \leq V(z) \leq V(x(0)) \right \}$ can be known to be compact. – LGenzelis Oct 17 '17 at 13:55
• However, in order to satisfy that, it's not really necessary that every sublevel set of V is bounded, i.e., that $S = \left \{ z | V(z) \leq c \right \}$ is bounded $\forall c \in \mathbb{R}$ (a condition that your function $V_2$ does not satisfy, as ilustrated by taking $c=1$), but only that $S$ is bounded $\forall c \in \operatorname{Im}(V)$ (a condition which $V_2$ does indeed satisfy). So, to summarize, you cannot use $V_2$ to prove G.A.S. by invoking the standard theorem, but you can still use it by introducing a little modification to the theorem's hypotheses. – LGenzelis Oct 17 '17 at 13:55
• @MrYouMath If I'm not mistaken the function $e^{-\frac{1}{x^2+y^2}}$ behaves just like $e^{-\frac{1}{x^2}}$ — and the latter (if I'm not mistaken again) decays to zero faster than any polynomial function. This is why you can extend this function from $\mathbb{R} \setminus \lbrace 0 \rbrace$ to the whole $\mathbb{R}$. Moreover, this function is infinitely differentiable at $0$ but not analytic. Because of these properties $V_2$ can be very naturally extended to the origin and it'll be a nice function. – Evgeny Oct 31 '17 at 12:42
• @MrYouMath, you are correct. Throughout this discussion I assumed that the function we were really talking about was $V(x,y) = e^{-\frac{1}{x^2+y^2}}$ for $(x,y) \neq (0,0)$, $V(0,0) = 0$. This function is of type $C^1$ (at least), so it constitutes a valid candidate for a Lyapunov function. – LGenzelis Oct 31 '17 at 13:42

Interesting question!

The issue is that some trajectories may tend to infinity.

I don't think I've ever seen an explicit example, but (with some effort!) I managed to come up with one myself. Take $$V(x,y) = \frac{x^2}{1+x^2} + y^2 ,$$ which is clearly positive definite, but doesn't tend to infinity as $\sqrt{x^2+y^2}\to \infty$ (indeed, $V(x,0)\to 1$ as $x \to \pm\infty$).

The level set $\{ V(x,y)=1 \}$ is given by $y=\pm 1/\sqrt{1+x^2}$, a pair of curves which extend out to infinity, approaching the $x$ axis. Between these two curves, you have level sets $\{ V(x,y)=c \}$ for $c \in (0,1)$ which are closed curves encircling the origin, and $\{ V(x,y)=0 \}$ which is just the origin. Now consider the system $$\dot x = x \, \frac{3x^2y^2-1}{x^2 y^2+1} ,\qquad \dot y = -y .$$ The idea here is that on the curve $xy=1$ (which for large positive $x$ lies just above the level curve $y=1/\sqrt{1+x^2}$) the system becomes $\dot x=x$, $\dot y=-y$, which has a solution that stays on that curve. That is, $$x(t)=e^t ,\qquad y(t)=e^{-t}$$ is a particular solution of our system, and it doesn't tend to the equilibrium $(x,y)=(0,0)$, so the system is not globally asymptotically stable.

And on the other hand, the system becomes $\dot x \approx -x$, $\dot y=-y$ when we are close to the origin, so it's locally asymptotically stable.

It remains to show that $\dot V$ is really negative definite: $$\begin{split} \dot V & = \frac{\partial V}{\partial x} \, \dot x + \frac{\partial V}{\partial y} \, \dot y \\ & = \frac{2x}{(1+x^2)^2} \, x \, \frac{3x^2 y^2-1}{x^2 y^2+1} + 2y \, (-y) \\ & = \frac{-2}{(1+x^2)^2 (1+x^2 y^2)} \biggl( x^2 (1-3x^2 y^2) + y^2 (1+x^2)^2 (1+x^2 y^2) \biggr) \\ & = \frac{-2}{(1+x^2)^2 (1+x^2 y^2)} \biggl( x^2 - 2 x^4 y^2 + x^6 y^4 + y^2 + 2 x^2 y^2 + x^2 y^4 + 2 x^4 y^4 \biggr)\\ & = \frac{-2}{(1+x^2)^2 (1+x^2 y^2)} \biggl( x^2 (1 - x^2 y^2)^2 + y^2 (1+2x^2)(1+x^2 y^2) \biggr) , \end{split}$$ which is clearly negative away from the origin. Done!

(Remark: The rewriting of $\dot V$ in the last step is due to a helpful comment by @SampleTime, which simplified the argument greatly. See the edit history for my own original version, which was much uglier!)

• It would be interesting to see if @MrYouMath 's example is simpler (mainly for educational purposes), but yours is indeed a great example Hans. Kudos! – LGenzelis Oct 17 '17 at 6:02
• Very nice example. Just an alternative for showing $\dot{V} < 0$ for $(x, y) \neq (0, 0)$ is to use the fact that the above term (with the $-3x^2y^2$) can be represented as a SOS as $2\, x^2\, y^2 + x^2\, y^4 + 2\, x^4\, y^4 + 2\, {\left(\frac{\sqrt{2}\, x}{2} - \frac{\sqrt{2}\, x^3\, y^2}{2}\right)}^2 + y^2$ which, in this form, is obviously positive definite, thus $\dot{V}$ is negative definite. – SampleTime Oct 20 '17 at 21:59
• @SampleTime: Awesome, thank you! I can't believe I missed that, despite wrestling with the expression for $\dot V$ for so long... – Hans Lundmark Oct 21 '17 at 5:14
• A tour de force! +1. Would you mind to disclose in some detail how you massage out the ODE system? – Hans May 11 at 22:36
• @Hans: I'm not sure I understand what “massage out” means. But if you're asking how I found those ODEs, I don't quite remember anymore. Lots of trial and error, I suppose... – Hans Lundmark May 12 at 7:39

Just for the record, here's another example that I just found on p. 109 of the book Stability of Motion by Wolfgang Hahn (1967), where it is credited to a 1952 paper in Russian by Barbashin & Krasovskii: $$\dot x = -\frac{6x}{(1+x^2)^2} + 2y ,\qquad \dot y = -\frac{2(x+y)}{(1+x^2)^2}.$$ With the same(!) $V$ as in the example I came up with in my other answer, $$V(x,y) = \frac{x^2}{1+x^2} + y^2 ,$$ one computes $$\dot V = -\frac{4}{(1+x^2)^2} \left( \frac{3x^2}{(1+x^2)^2} + y^2 \right) ,$$ so $V$ is positive definite and $\dot V$ is negative definite, and hence $V$ is a strong Lyapunov function on all of $\mathbf{R}^2$.

But Hahn shows that trajectories of this system cannot cross the curve $$y=\frac{2}{x-\sqrt2} \quad (x>\sqrt2)$$ in the direction towards the origin. (He compares $\dot y/\dot x$ to the slope of the curve.)

Hence not all solutions tend to the origin.

• I prefer your original example, as you could provide an explicit solution which didn't tend to the origin. – LGenzelis Dec 20 '17 at 19:37
• +1. Informative quote and reference thereof. – Hans May 12 at 3:13