When are attracting sets invariant? Consider a control system of the form $\dot{x}(t) = f(x(t), u(t))$ where $u(t)$ is the control input, $x \in \mathbb{R}^{n}$, $u \in \mathbb{R}^{m}$. Assume $f$ is Lipschitz continuous so that the existence and uniqueness of solutions holds.
Following are the definitions of attracting sets and invariant sets that I use:


*

*A set $S$ is (control) invariant if for any initial state $x(0) \in S$, there exists a control signal $u(\cdot)$ such that $x(t) \in S$ for all $t \geq 0$.

*A set $A$ is (weakly) attracting with basin of attraction $B$ if for any initial state $x(0) \in B$, there exists a control signal $u(\cdot)$ such that $x(t)$ converges to $A$ as $t \to +\infty$, that is $\lim_{t \to +\infty} \operatorname{dist} (x(t), A) = 0$.


It seems to me that attracting sets and invariant sets are closely related, in particular when $B = \mathbb{R}^{n}$ then in many cases, $A$ is also invariant. My questions are:


*

*Is there any example in which an attracting set is not invariant?

*Under what condition an attracting set is invariant?


I come from the control community and not many control textbooks mention these concepts. If there are any good (math) books that discuss these sets well, please let me know.
 A: This is an answer to 1. In two dimensions ($n=2$) consider the system $f(x,u)=(1,-x_2)$ (here $x=(x_1,x_2)$ and $f$ does not depend on $u$ at all. All solutions are of the form $x(t)=(t,ce^{-t})$. The curve $A=\{(x_1,x_2) : x_2=e^{-x_1}\sin x_1\}$ is an attracting set because $\mathrm{dist}(x(t),A)\to 0$ as $t\to\infty$ for every solution. Yet, the set is not invariant because a solution cannot stay within $A$: for one thing, the solutions have a constant sign of $x_2$ while $A$ wiggles between $x_2<0$ and $x_2>0$. 
This example can also be modified to include nontrivial control: $f(x,u)=(2+\sin u,-x_2)$, where $u\in \mathbb R^1$ is our control. No matter what $u$ we use, two things happen: $x_1(t)$ increases to $+\infty$, and $x_2(t)$ tends to $0$ while keeping its sign. In particular, the solution cannot stay within $A$. 
I have nothing to contribute to question 2. Among the control theory books The Dynamics of Control by Colonius and  Kliemann looks reasonably mathy, and they talk at length about invariant sets but I did not see anything there directly addressing your question.
