1 Introduction

In the present paper, we discuss ordinary differential equations with polynomial right hand side

$$\begin{aligned} \dot{x} =f(x) \end{aligned}$$
(1)

as well as polynomial control systems

$$\begin{aligned} \dot{x} =f(x)+g(x) u \end{aligned}$$
(2)

over \({{\mathbb {K}}}^n\) (with \({\mathbb {K}}={\mathbb {R}}\) or \({\mathbb {C}}\)), with f a \({\mathbb {K}}^n\)-valued polynomial, g a polynomial \(n\times m\) matrix, and u having values in \({\mathbb {K}}^m\). Considering complex systems will turn out to be useful also for the real case. We are mainly interested in polynomial state feedbacks \(\alpha :\,{\mathbb {K}}^n\rightarrow {\mathbb {K}}^m\) and the corresponding closed loop system

$$\begin{aligned} \dot{x} =f(x)+g(x) \alpha (x). \end{aligned}$$
(3)

Overall we are concerned with invariant algebraic varieties of polynomial vector fields, and with the construction of polynomial vector fields that leave a given variety invariant. This approach has proven quite fruitful in qualitative investigations and integrability problems; see e.g. [6, 7], Llibre et al. [13] and the monograph by Zhang [22]. For control systems, the notion of controlled invariant variety (CIV) was introduced and investigated in [21]. One calls the algebraic variety V controlled invariant for system (2) if there exists a polynomial state feedback \(\alpha \) such that V is an invariant set for (3). This extends the notion of controlled invariant subspaces for linear systems which was introduced by Basile and Marro in 1969. The geometric approach for linear systems provides the theoretical basis for solving certain decoupling and noninteracting problems; see [2] for a comprehensive survey. The theory has been generalized to nonlinear systems by Isidori [10] and several other authors. Recently, some progress has been made in the area of nonlinear polynomial systems; see [15,16,17, 21], and Yuno and Ohtsuka [19, 20], where it is shown that methods from symbolic computation can be used to test the conditions for controlled invariance of varieties constructively.

The purpose of the present work, which is in part based on the doctoral dissertations [11, 17] by two authors of the present manuscript, is twofold. First, for real systems (1) there is interest not only in invariance of algebraic varieties but also in attractiveness. For the “inverse problem” to find suitable vector fields for a given variety, we provide some general constructions of vector fields with prescribed Lyapunov functions. Our main result here is concerned with a compact connected component of a smooth variety: Given one (technical) additional condition, we prove the existence of a polynomial vector field for which this component is locally exponentially attracting. Second, for control systems we introduce the notion of natural controlled invariant variety (NCIV) with respect to a given input matrix g, by requiring that this variety can be made invariant for (3) with arbitrary drift f by a suitable choice of the feedback \(\alpha \). For real systems we will also introduce a slightly weaker form (RNCIV) by allowing for rational feedbacks whose denominators have no real zeros. One motivation for introducing these notions is the observation that they ensure robustness with respect to perturbations of the drift. Moreover, from a computational point of view, there are cases where it is possible to construct NCIV’s for a given g, whereas no solution method is currently known for the general problem of constructing CIV’s for given f and g. Our main result (Theorem 2) provides a precise characterization of NCIV’s and RNCIV’s, and allows an algorithmic verification of the relevant properties. We illustrate all the results by (classes of) examples.

2 Preliminaries

We first introduce some notation, and note basic facts from commutative algebra and algebraic geometry that may be found in Kunz [12] and Shafarevich [18], for instance. Moreover we recall some familiar notions related to ordinary differential equations.

2.1 Notation

We abbreviate \(R={\mathbb {K}}\left[ x_1,\ldots ,x_n\right] ={\mathbb {K}}\left[ \mathbf{x}\right] \). For a subset \(S\subseteq R\), we write \({{\mathcal {V}}}(S)\) for the set of common zeros (in \({\mathbb {K}}^n\)) of all elements of S; the set \({{\mathcal {V}}}(S)\) is then called an algebraic variety. Given an algebraic variety \(V\subseteq {\mathbb {K}}^n\), one has the ideal \({{\mathcal {J}}}(V)\) of all polynomials vanishing on V. Given a generator set \(\varphi _1,\ldots ,\varphi _k\), we will fix the notation

$$\begin{aligned} {{\mathcal {I}}}:={{\mathcal {J}}}(V)=\left<\varphi _1,\ldots ,\varphi _k\right> \end{aligned}$$
(4)

throughout the paper. By \(J\in R^{k\times n}\) we denote the Jacobian of \((\varphi _1,\ldots ,\varphi _k)\), thus

$$\begin{aligned} J=\left( J_{i\ell }\right) \text{ with } J_{i\ell } =\partial _\ell \varphi _i. \end{aligned}$$
(5)

The dimension \(\text {dim}(V)\) of V is defined as the Krull dimension of \(R/{\mathcal {J}}(V)\). The variety V is a finite union of irreducible components. If all the irreducible components have the same dimension, V is called equidimensional. The tangent space at \(a\in V\) is given by

$$\begin{aligned} T_aV= {\mathrm{ker}}_{\mathbb {K}}(J(a)),\quad \text {with}\ \dim (T_{a}V)=n-\mathrm{rank}\,(J(a)). \end{aligned}$$
(6)

A point \(a\in V\) is called simple (or regular, or nonsingular) if \(\dim (T_a(V))\) is equal to the dimension of the (unique) irreducible component of V that contains a. Finally, the variety V is said to be smooth if all \(a\in V\) are simple points.

Given the ordinary differential equation (1), we call a subset M of \({\mathbb {K}}^n\) invariant (resp. positively invariant, resp. negatively invariant) if for any \(y\in M\) the solution orbit (resp. the positive semi-orbit, resp. the negative semi-orbit) through y is contained in M. We call a closed invariant set M (locally) attracting for (1) if there is a neighborhood U of M such that for any \(y\in U\) the solution z(t) with initial value y exists for all \(t\ge 0\) and satisfies \({\mathrm{dist}}\,(z(t),\,M)\rightarrow 0\) as \( t\rightarrow \infty \) (see e.g. Perko [14], Ch. 3.2, Def. 2).

Given some (polynomial) function \(\psi \), the Lie derivative \(L_f(\psi )\) of \(\psi \) with respect to a vector field f is defined by

$$\begin{aligned} L_f(\psi )(x) =D\psi (x)f(x)=\left<\nabla \psi (x),f(x)\right> \end{aligned}$$

with \(D\psi (x)=\left( \partial _1\psi (x),\ldots ,\partial _n\psi (x)\right) \), and \(\nabla \) denoting the gradient.

2.2 Some Known Results

First we recall from [21] some definitions and a criterion for invariance of an algebraic variety with respect to a polynomial vector field. Recall that \(R={\mathbb {K}}\left[ x_1,\ldots ,x_n\right] \).

Definition 1

With the notations from above and for \(i \in \{1,\ldots ,k\}\) define

$$\begin{aligned} \mathcal {N}_i={\mathrm{ker}}_{R} \left( \partial _1\varphi _i,\ldots , \partial _n\varphi _i,\varphi _1,\ldots ,\varphi _k\right) = {\mathrm{ker}}_{R} \left( D\varphi _i,\varphi _1,\ldots ,\varphi _k\right) \subseteq R^{n+k}, \end{aligned}$$

thus \(\left( \psi _1,\ldots ,\psi _{n+k}\right) \in \mathcal {N}_i\) if and only if \(\sum _j\partial _j\phi _i\,\psi _j+\sum _\ell \phi _\ell \,\psi _{n+\ell }=0\). Moreover set \(\mathcal {M}_i:=\pi (\mathcal {N}_i)\), where \(\pi \) denotes the projection onto the first n components. Finally let

$$\begin{aligned} \mathcal {M}:=\mathcal {M}_{{\mathcal {I}}}:=\bigcap _{i=1}^k\mathcal {M}_i \subseteq R^n. \end{aligned}$$

With these notions one has algebraic characterizations of invariant varieties for Eq. (1).

Lemma 1

$$\begin{aligned}&V\ \text {is invariant for}\ f\ \Longleftrightarrow \ L_f(\varphi _i) \in {\mathcal {I}}\quad \text {for all}\ i=1,\ldots ,k\\&\quad \Longleftrightarrow \, L_f({\mathcal {I}}) \subseteq {\mathcal {I}}\ \Longleftrightarrow \ J\cdot f \in {\mathcal {I}}\cdot R^k\ \Longleftrightarrow \ f \in \mathcal {M}. \end{aligned}$$

From the above one sees that the complexification of a real variety that is invariant with respect to a real vector field remains invariant with respect to the complexified vector field.

There are two aspects in the discussion of invariant varieties of polynomial vector fields: In the direct problem one asks for invariant varieties of a given polynomial vector field, while in the inverse problem one considers the existence and construction of polynomial vector fields that admit a given variety as invariant set. For the (easier) inverse problem one knows some general answers. The first part of the following Proposition is obvious, but the proof of the second is nontrivial.

Proposition 1

  1. (a)

    Let H be a polynomial vector field such that \(L_H(\varphi _i)=0\) for \(1\le i\le m\), and \(g_1,\ldots ,g_m\) arbitrary vector fields. Then

    $$\begin{aligned} f=H+\sum \limits _{i=1}^{m}g_i\varphi _i \end{aligned}$$

    admits the invariant variety V.

  2. (b)

    (See Bavula [3], Theorem 1.1.) If V is smooth then every polynomial vector field which admits the invariant variety V is of the type given in part (a).

For smooth varieties Bavula [3] also provides a precise characterization of the vector fields H which admit every \(\varphi _i\) as a first integral. For non-smooth varieties there exist further vector fields admitting V; see a detailed discussion of invariant curves for planar systems in [6], and also [21].

Remark 1

In our context, ideals without zeros are of particular relevance. From Hilbert’s Nullstellensatz [12] and the real Nullstellensatz [5] one knows: An ideal \(J\subseteq {\mathbb {C}}\left[ \mathbf{x}\right] \) admits no zero if and only if it contains the constant polynomial 1. An ideal \(J\subseteq {\mathbb {R}}\left[ \mathbf{x}\right] \) admits no zero if and only if it contains a polynomial of the form \(1+s\), with \(s(x)\ge 0\) for all x (actually s is a sum of squares of suitable rational functions).

In some situations it will be appropriate to consider rational vector fields. The pertinent facts are stated next, with the first assertion being standard (see e.g. Perko [14], Section 3.1, Remark 3). The proof of the second statement uses the fact that closures of invariant sets (with respect to the norm topology as well as the Zariski topology) are invariant.

Lemma 2

Let \(\rho \in R\) and \(U:={\mathbb {K}}^n{\setminus }{{\mathcal {V}}}(\rho )\).

  1. (a)

    Then the ordinary differential equation

    $$\begin{aligned} \dot{x}=\frac{1}{\rho (x)}f(x)\text { on }U \end{aligned}$$

    and the restriction of (1) to U have the same solution orbits, hence the same invariant sets.

  2. (b)

    If no irreducible component of V is contained in \({{\mathcal {V}}}(\rho )\) then \(V\cap U\) is invariant for \(\dot{x}={\rho (x)}^{-1}f(x)\) if and only if V is invariant for (1) on \({\mathbb {K}}^n\).

3 Prescribed Attracting Invariant Varieties

Throughout this section we assume that \({\mathbb {K}}={\mathbb {R}}\). As before, we consider a variety V with \(J(V)=\left<\varphi _1,\ldots ,\varphi _k\right>\). Now the objective is to determine polynomial vector fields for which V, or some connected component of V, is invariant and locally attracting. (Global attractivity will in general be precluded for topological reasons; see Remark 4 below.)

3.1 Lyapunov Functions

We first construct real polynomial vector fields with certain prescribed Lyapunov functions.

Lemma 3

Let \({\mathbb {K}}={\mathbb {R}}\).

  1. (a)

    Let \(z\in V\) be a simple point, and (w.l.o.g.) assume that

    $$\begin{aligned} r:=\mathrm{rank}\, \begin{pmatrix} \nabla \varphi _1&\cdots&\nabla \varphi _{k} \end{pmatrix}(z) \end{aligned}$$

    satisfies \( r=\mathrm{rank}\, \begin{pmatrix} \nabla \varphi _1&\cdots&\nabla \varphi _{r} \end{pmatrix}(z)\), in particular z lies in an irreducible component of dimension \(n-r\). Then there exist a Zariski neighborhood \(U_z\) of z and polynomial vector fields

    $$\begin{aligned} \kappa _{z,r+1},\dots ,\kappa _{z,n} \end{aligned}$$

    such that

    $$\begin{aligned} \Theta _{z}:= \begin{pmatrix} \nabla \varphi _1&\cdots&\nabla \varphi _{r}&\kappa _{z,r+1}&\cdots&\kappa _{z,n} \end{pmatrix} \end{aligned}$$

    is invertible at every point of \(U_z\).

  2. (b)

    With z as above consider the matrix

    $$\begin{aligned} A_z:=\mathrm{adj}\, \left( \Theta _z\cdot \Theta _z^{\text {tr}}\right) =\det (\Theta _z)^2\cdot \left( \Theta _z\cdot \Theta _z^{\text {tr}}\right) ^{-1} \end{aligned}$$

    with polynomial entries. Moreover let \(H_z\) be a vector field such that \(L_{H_z}(\varphi _i)=0\) for \(1\le i\le r\). Then the polynomial vector field

    $$\begin{aligned} f_z=H_z-\sum \limits _{i=1}^{r}\varphi _i A_z\nabla \varphi _i \end{aligned}$$

    satisfies

    $$\begin{aligned} L_{f_z}(\varphi _j)=-\det \left( \Theta _z\right) ^2\varphi _j \end{aligned}$$

    for \(1\le j\le r\).

  3. (c)

    Let \(V_1:=\mathcal {V}(\varphi _1,\ldots ,\varphi _r)\), and \(z_1,\ldots ,z_\ell \) simple points of \(V_1\). Then the polynomial vector field

    $$\begin{aligned} f:=\sum _{j=1}^\ell f_{z_j} \end{aligned}$$

    satisfies

    $$\begin{aligned} L_{f}(\varphi _i)= -\sigma \cdot \varphi _i; \quad \text { with }\sigma := \left( \sum _{j=1}^\ell \det \left( \Theta _{z_j}\right) ^2\right) \end{aligned}$$

    for \(1\le i\le r\). In particular, \(\varphi _i\) is a semi-invariant for any \(i\in \left\{ 1,\ldots ,r\right\} \), hence the sets

    $$\begin{aligned} Z_i:=\left\{ x;\,\varphi _i(x)=0\right\} ,\quad Z_i^+:=\left\{ x;\,\varphi _i(x)\ge 0\right\} ,\quad Z_i^-:=\left\{ x;\,\varphi _i(x)\le 0\right\} \end{aligned}$$

    are invariant for \(\dot{x}=f(x)\).

    If \(\mathrm{rank}\, \begin{pmatrix} \nabla \varphi _1&\cdots&\nabla \varphi _{r} \end{pmatrix}(y)=r\) for all \(y\in V_1\) then one may choose \(z_1,\ldots ,z_\ell \) such that \(\sigma (y)>0\) for all \(y\in V_1\).

  4. (d)

    In the setting of part (c), for any \(i\in \{1,\ldots ,r\}\) the restriction of \(\dot{x}=f(x)\) to the invariant set \(Z_i^+\) admits the Lyapunov function \(\varphi _i\), and the restriction of \(\dot{x}=f(x)\) to the invariant set \(Z_i^-\) admits the Lyapunov function \(-\varphi _i\).

  5. (e)

    Given the setting of part (c), let v(t) be any solution of \(\dot{x}=f(x)\). Then

    $$\begin{aligned} \varphi _i(v(t))=\varphi _i(v(0))\cdot \exp \left( -\int _0^t\sigma (v(s))\,ds\right) \end{aligned}$$

    for all t in the maximal interval of existence.

Proof

By assumption we have

$$\begin{aligned} \text {rank}\begin{pmatrix} \nabla \varphi _1&\nabla \varphi _2&\cdots&\nabla \varphi _{r} \end{pmatrix}(z)=r, \end{aligned}$$

hence there exist polynomial (for instance, constant) vector fields

$$\begin{aligned} \kappa _{z,r+1},\dots ,\kappa _{z,n} \end{aligned}$$

such that

$$\begin{aligned} \nabla \varphi _1(z), \cdots , \nabla \varphi _{r}(z), \kappa _{z,r+1}(z),\dots ,\kappa _{z,n}(z) \end{aligned}$$

form a basis of \({\mathbb {R}}^n\). Therefore the matrix

$$\begin{aligned} \Theta _{z}= \begin{pmatrix} \nabla \varphi _1&\nabla \varphi _2&\cdots&\nabla \varphi _{r}&\kappa _{z,r+1}&\cdots&\kappa _{z,n} \end{pmatrix} \end{aligned}$$

is invertible at every point of an appropriate Zariski open neighborhood \(U_z\), and part (a) is proven. As for part (b), the matrix \(A_z\) is symmetric and positive definite on \(U_z\) and moreover we observe that

$$\begin{aligned} (\nabla \varphi _i)^{\text {tr}}\left( \Theta _z^{-1}\right) ^{\text {tr}}\cdot \Theta _z^{-1}\nabla \varphi _j=\delta _{i,j} \end{aligned}$$

follows from

$$\begin{aligned} \Theta _z\cdot e_i=\nabla \varphi _{i},\quad 1\le i\le r \end{aligned}$$

with the standard basis \(e_1,\ldots ,e_n\) of \({\mathbb {R}}^n\). Consequently, we get

$$\begin{aligned} L_{f_z}(\varphi _i)=-\det (\Theta _z)^2\varphi _i\quad \text {for all}\quad 1\le i\le r. \end{aligned}$$

Parts (c) and (d) are then clear, while part (e) follows from the identity

$$\begin{aligned} \frac{d}{dt}\varphi _i(v(t))=L_f(\varphi _i)(v(t)). \end{aligned}$$

\(\square \)

Remark 2

It is worth noting that the construction of \(A_z\) in Lemma 3 ensures that the \(\nabla \varphi _i(x)\) are orthonormal for the scalar product induced by \(A_z(x)\) for all \(x\in U_z\). There may be other choices which also yield this property.

In particular, for the case \(r=1\), \(\varphi _1=\varphi \) the construction in Lemma 3 is unnecessarily complicated, since one may choose A as the identity matrix. Indeed the polynomial vector field

$$\begin{aligned} f:=H-\varphi \cdot \nabla \varphi \end{aligned}$$

with \(L_H(\varphi )=0\) satisfies

$$\begin{aligned} L_f(\varphi )=-\Vert \nabla \varphi \Vert ^2\cdot \varphi , \end{aligned}$$

for which the conclusions of Lemma 3(d) and (e) hold, mutatis mutandis.

Lyapunov functions yield positively invariant sublevel sets (see e.g. Amann [1], Thm. 18.2) and impose restrictions on limit sets (LaSalle’s principle; see e.g. Amann [1], Thm. 18.3); note also the invariance of limit sets. We obtain:

Proposition 2

Let the setting and notation of Lemma 3 be given. Then:

  1. (a)

    For any \(c>0\) and any \(i\in \{1,\ldots ,r\}\) the sets

    $$\begin{aligned} \left\{ x\in Z_i^+;\, \varphi _i(x)\le c\right\} \text { and }\left\{ x\in Z_i^-; \,\varphi _i(x)\ge -c\right\} \end{aligned}$$

    are positively invariant for \(\dot{x}=f(x)\).

  2. (b)

    Let \(y\in {\mathbb {R}}^n\) such that the omega limit set \(\omega (y)\) is defined and nonempty, and denote by Y the largest invariant set for \(\dot{x}=f(x)\) that is contained in \(\mathcal {V}(\det (\Theta _{z_1}),\ldots ,\det (\Theta _{z_\ell }))\). Then

    $$\begin{aligned} \omega (y)\subseteq V_1\cup Y. \end{aligned}$$

3.2 Attracting Compact Components

Keeping the notation from Lemma 3, we denote by \({\widetilde{V}}\) a connected component of V which is also compact. Moreover we assume that \(\dim {{\widetilde{V}}}=n-r\) and impose the stronger condition that

$$\begin{aligned} \text {rank} \begin{pmatrix} \nabla \varphi _1,\dots ,\nabla \varphi _{r} \end{pmatrix}(a)=r \text { for all } a\in {{\widetilde{V}}}. \end{aligned}$$
(7)

Remark 3

For the following we define f as in Lemma 3(c), and require \(\sigma (a)>0\) for all \(a\in {{\widetilde{V}}}\).

By condition (7), each point \(a\in {\widetilde{V}}\) admits a neighborhood and a diffeomorphism \(\Theta \) to a neighborhood of \(0\in {\mathbb {R}}^n\) with \(\varphi _i\circ \Theta ^{-1}=x_i\) for \(1\le i\le r\). Thus locally one may assume

$$\begin{aligned} \varphi _1=x_1,\dots ,\varphi _r=x_r. \end{aligned}$$

Thus, there exists a compact neighborhood \(K_a\) of a such that

$$\begin{aligned} (\varphi _1(y),\dots ,\varphi _{r}(y))=(0,\dots ,0) \end{aligned}$$

holds if and only if \(y\in K_a\cap {\widetilde{V}}\). Since \({\widetilde{V}}\) is compact, there exists a compact neighborhood N of \({\widetilde{V}}\) such that

$$\begin{aligned} \left( \varphi _1(y),\dots ,\varphi _{r}(y)\right) \ne \left( 0,\dots ,0\right) \end{aligned}$$

for all \(y\in N{\setminus }{\widetilde{V}}\). Moreover we may assume that \(\sigma (x)>0\) for all \(x\in N\).

Theorem 1

Let \({\widetilde{V}}\) be a compact connected component of V. Then any polynomial vector field f as given in Remark 3 has the following property: There exists a compact, positively invariant neighborhood \(K\subseteq N\) (see Remark 3) such that \({\widetilde{V}}\subseteq \mathrm{int}\,{K}\) and:

  1. (i)

    Each \(z\in K\) satisfies \(\emptyset \ne \omega (z)\subseteq {\widetilde{V}}\).

  2. (ii)

    All solutions of \(\dot{x}=f(x)\) that start in K are attracted exponentially by \({\widetilde{V}}\).

Proof

Define

$$\begin{aligned} \psi (x):=\sum _{i=1}^r\varphi _i^2(x); \quad L_f(\psi )(x)=-2\sigma \psi (x); \end{aligned}$$

in particular \(\psi \) is a Lyapunov function. Since N is compact, so is its boundary \(\partial N\), hence \(\psi \) attains a positive minimum c on \(\partial N\), and the connected component K of

$$\begin{aligned} \left\{ x\in {\mathbb {R}}^n;\,\psi (x)\le c\right\} \end{aligned}$$

which contains \({{\widetilde{V}}}\) is a compact subset of N. By construction, K is positively invariant. From La Salle and \(\sigma (x)\ge \sigma _0>0\) for all \(x\in N\) one sees that \(\omega (z)\subseteq {{\widetilde{V}}}\), and this limit set is nonempty since the positive semi-orbit is contained in the compact set K. Finally, with Lemma 3(e) one sees

$$\begin{aligned} \varphi _i(v(t))\le \exp (-\sigma _0t)\varphi _i(v(0)) \text { when } v(0)\in K\cap Z_i^+, \quad 1\le i\le r, \end{aligned}$$

and

$$\begin{aligned} \varphi _i(v(t))\ge \exp (-\sigma _0t)\varphi _i(v(0)) \text { when } v(0)\in K\cap Z_i^-, \quad 1\le i\le r. \end{aligned}$$

In view of Remark 3, the second assertion follows. \(\square \)

Corollary 1

Let \({{\widetilde{V}}}\subseteq V\subseteq {\mathbb {R}}^n\) as above, in particular let (7) be satisfied; moreover let f be as in Remark 3, and \(\psi =\varphi _1^2+\cdots +\varphi _ r^2\) with \(L_f(\psi )=-2\sigma \psi \). Then, given any polynomial vector field h that leaves V invariant, there exists an \(\varepsilon _0>0\) such that \({\widetilde{V}}\) is an attracting invariant set for

$$\begin{aligned} f+\varepsilon h \text { as well as } \varepsilon ^{-1}f + h,\quad 0<\varepsilon <\varepsilon _0. \end{aligned}$$

Proof

It suffices to prove the assertion for \(f+\varepsilon h\). Invariance of V w.r.t. the vector field h implies the existence of rational functions \(\mu _{i,j}\) which are regular on \({\widetilde{V}}\) such that

$$\begin{aligned} L_h(\varphi _i)=\sum \limits _{j=1}^{r}\mu _{i,j}\varphi _j,\quad 1\le i\le r. \end{aligned}$$

This follows e.g. from Theorem 4 in Shafarevich [18], Ch. II, §3, with the \(\varphi _i\) forming a system of local parameters at every point of \({{\widetilde{V}}}\). In turn we find

$$\begin{aligned} L_{f+\varepsilon h}(\psi )&=-2\sigma \psi +\varepsilon \cdot L_{h}(\psi )\\&=-2\sigma \psi +\varepsilon \cdot \sum \limits _{i=1}^{r}\sum \limits _{j=1}^{r}\mu _{i,j}\cdot \varphi _i\cdot \varphi _j. \end{aligned}$$

Now let N be as in Remark 3. Then the symmetric matrix

$$\begin{aligned} M(x):={{\,\mathrm{diag}\,}}(-2\sigma (x),\dots ,-2\sigma (x))+\varepsilon \cdot \left( (\mu _{i,j}(x)+\mu _{j,i}(x))/2\right) _{1\le i,j\le r} \end{aligned}$$

is negative definite for all \(x\in N\), provided that \(\varepsilon \) is sufficiently small. Therefore there exists \(\delta >0\) such that

$$\begin{aligned} L_{f+\varepsilon h}(\psi )(x)<-\delta \psi ^2\text { for all }x\in N. \end{aligned}$$

Now the assertion follows from arguments similar to those in the proof of Theorem 1. \(\square \)

3.3 Examples

Example 1

When \(r=1\), i.e. V is a hypersurface, Remark 2 yields

$$\begin{aligned} f(x)=H(x)-\varphi (x)\cdot \nabla \varphi (x). \end{aligned}$$

If \({{\widetilde{V}}}\) is a compact and smooth connected component then \(\nabla \varphi \) does not vanish on \({\widetilde{V}}\), hence Theorem 1 is applicable.

  • As for a concrete example, let \(\varphi =x^2+y^2-1\), i.e. \(\mathcal {V}(\varphi )\) is a planar circle. In this case we explicitly have

    $$\begin{aligned} f=\gamma \cdot \begin{pmatrix} -2y\\ 2x \end{pmatrix}-(x^2+y^2-1)\cdot \begin{pmatrix} 2x\\ 2y \end{pmatrix} \end{aligned}$$

    for some \(\gamma \in R\). Note that f admits the stationary point (0, 0) and therefore, \(\mathcal {V}(\varphi )\) is not a globally attracting set.

  • For a second example consider the variety \(V=\mathcal {V}(y^2-x(x+1)(x+2))\subseteq {\mathbb {R}}^2\) (an elliptic curve) which is irreducible and smooth of dimension 1, with two connected components. Here we have

    $$\begin{aligned} f=\gamma \cdot \begin{pmatrix} -2y\\ -(3x^2+6x+2) \end{pmatrix}-(y^2-x(x+1)(x+2))\cdot \begin{pmatrix} -(3x^2+6x+2)\\ 2y \end{pmatrix} \end{aligned}$$

    with some polynomial \(\gamma \).

Example 2

Another special case is \(r=n-1\), thus \({\widetilde{V}}\) is a compact connected component of a curve. In this situation with Lemma 3 we obtain the vector field

$$\begin{aligned} \dot{x}=f(x):=H(x)-\sum \limits _{i=1}^{n-1}\varphi _i(x) A(x)\nabla \varphi _i(x) \end{aligned}$$

and A can be constructed in the following special manner: By assumption

$$\begin{aligned} \text {rank} \begin{pmatrix} \nabla \varphi _1&\cdots&\nabla \varphi _{n-1} \end{pmatrix}=n-1 \end{aligned}$$

holds on V. We define the vector field \(\kappa \) by

$$\begin{aligned} \kappa :=\nabla \varphi _1\times \cdots \times \nabla \varphi _{n-1} \end{aligned}$$

where \(w_1\times \cdots \times w_{n-1}\) is the generalized cross product on \({\mathbb {R}}^n\) defined via

$$\begin{aligned} \det (w_1,\cdots , w_{n-1},w_n)=\langle w_n,w_1\times \cdots \times w_{n-1}\rangle . \end{aligned}$$

Then \(\kappa (v)\) is orthogonal to each vector \(\nabla \varphi _i(v)\) for any \(v\in {\mathbb {R}}^n\), and furthermore \(\kappa (z)\ne 0\) for all \(z\in V\). Thus

$$\begin{aligned} \Theta = \begin{pmatrix} \nabla \varphi _1&\cdots&\nabla \varphi _{n-1}&\kappa \end{pmatrix} \end{aligned}$$

is invertible on V, and for

$$\begin{aligned} A:=\det (\Theta )^2\cdot \left( \Theta \cdot \Theta ^{\text {tr}}\right) ^{-1} \end{aligned}$$

Theorem 1 is applicable.

Again we give a concrete example. Let \(n=3\) and consider the ideal

$$\begin{aligned} I:=\langle \varphi _1,\varphi _2\rangle \subseteq {\mathbb {R}}[x_1,\,x_2,\,x_3] \end{aligned}$$

with

$$\begin{aligned} \varphi _1:=x_1^2+x_2^2+x_3^2-1,\quad \varphi _2:=x_1. \end{aligned}$$

Then \(V:=\mathcal {V}(I)\) is the intersection of the sphere \(\mathbb {S}^2\) and the plane \(x_1=0\). Clearly, V is smooth, compact and has only one connected component. Furthermore we observe

$$\begin{aligned} \nabla \varphi _1= \begin{pmatrix} 2x_1\\ 2x_2\\ 2x_3\end{pmatrix},\quad \nabla \varphi _2= \begin{pmatrix} 1\\ 0\\ 0 \end{pmatrix}. \end{aligned}$$

Taking the cross product of both vectors and dividing by two we obtain

$$\begin{aligned} \kappa :=\begin{pmatrix} 0\\ -x_3\\ x_2\end{pmatrix} \end{aligned}$$

and thus we have

$$\begin{aligned} A&=\det (\Theta )^2\cdot \left( \Theta \cdot \Theta ^{\text {tr}}\right) ^{-1}\\&=\begin{pmatrix} 4(x_2^2+x_3^2)^2&{}\quad -4x_1x_2(x_2^2+x_3^2)&{}\quad -4x_1x_3(x_2^2+x_3^2)\\ -4x_1x_2(x_2^2+x_3^2)&{}\quad 4x_1^2x_2^2+x_2^2+4x_3^2&{}\quad x_2x_3(4x_1^2-3)\\ -4x_1x_3(x_2^2+x_3^2)&{}\quad x_2x_3(4x_1^2-3)&{}\quad 4x_1^2x_3^2+4x_2^2+x_3^2 \end{pmatrix}. \end{aligned}$$

By Theorem 1 there exists an attracting neighborhood of V with respect to any vector field

$$\begin{aligned} f=H-\left( \varphi _1 A\nabla \varphi _1+\varphi _2 A\nabla \varphi _2\right) . \end{aligned}$$

Moreover with Bavula [3] one has that \(H=\rho \cdot \kappa \) for some polynomial \(\rho \).

Next we demonstrate that, in contrast to the above examples, it is not generally possible to construct vector fields

$$\begin{aligned} \kappa _{r+1},\dots ,\kappa _{n}, \end{aligned}$$

such that

$$\begin{aligned} \begin{pmatrix} \nabla \varphi _1&\cdots&\nabla \varphi _r&\kappa _{r+1}&\cdots&\kappa _{n} \end{pmatrix} \end{aligned}$$

is invertible on all of \({\widetilde{V}}\).

Example 3

We consider the smooth, compact and connected variety given by

$$\begin{aligned} V=\mathcal {V}(\varphi _1,\varphi _2)\subseteq {\mathbb {R}}^4, \end{aligned}$$

with \(\varphi _1=x_1^2+x_2^2+x_3^2+x_4^2-1\) and \(\varphi _2=x_1\); thus V is isomorphic to the sphere \({\mathbb {S}}^2\). Due to the hedgehog theorem (see e.g. Deimling [8], Ch. I, Thm. 3.4), one cannot construct two additional vector fields

$$\begin{aligned} \kappa _1,\quad \kappa _2\in {\mathbb {R}}[\mathbf{x}]^4 \end{aligned}$$

such that the vectors

$$\begin{aligned} \nabla \varphi _1,\quad \nabla \varphi _2,\quad \kappa _1,\quad \kappa _2 \end{aligned}$$

are linearly independent at every point of V. Therefore, the approach from Lemma 3(a) is not feasible in this situation.

However, the problem can be resolved via Lemma 3(c) and Theorem 1. We have

$$\begin{aligned} \nabla \varphi _1= \begin{pmatrix} 2x_1\\ 2x_2\\ 2x_3\\ 2x_4 \end{pmatrix},\quad \nabla \varphi _2= \begin{pmatrix} 1\\ 0\\ 0\\ 0 \end{pmatrix}. \end{aligned}$$

Consider the matrices \(\Theta _1\) and \(\Theta _2\) given by

$$\begin{aligned} \Theta _{1}:= \begin{pmatrix} 2x_1 &{}\quad 1 &{}\quad 0 &{}\quad 0 \\ 2x_2 &{}\quad 0 &{}\quad -x_3 &{}\quad -x_2x_4 \\ 2x_3 &{}\quad 0 &{}\quad x_2 &{}\quad -x_3x_4 \\ 2x_4 &{}\quad 0 &{}\quad 0 &{}\quad x_2^2+x_3^2 \end{pmatrix},\quad \Theta _{2}:= \begin{pmatrix} 2x_1 &{}\quad 1 &{}\quad 0 &{}\quad 0 \\ 2x_2 &{}\quad 0 &{}\quad -x_4 &{}\quad x_2x_3 \\ 2x_3 &{}\quad 0 &{}\quad 0 &{}\quad -x_2^2-x_4^2 \\ 2x_4 &{}\quad 0 &{}\quad x_2 &{}\quad x_3x_4 \end{pmatrix}. \end{aligned}$$

Then we have

$$\begin{aligned} \det (\Theta _1)^2&=4(x_2^2+x_3^2)^2(x_2^2+x_3^2+x_4^2)^2\\ \det (\Theta _2)^2&=4(x_2^2+x_4^2)^2(x_2^2+x_3^2+x_4^2)^2 \end{aligned}$$

and

$$\begin{aligned} \sigma :=\det (\Theta _1)^2+\det (\Theta _2)^2=4(x_2^2+x_3^2+x_4^2)^2 \left[ (x_2^2+x_3^2)^2 +(x_2^2+x_4^2)^2\right] \end{aligned}$$

vanishes if and only if \(x_2=x_3=x_4=0\) holds. Consequently, \(\sigma \) does not vanish on V and Theorem 1 is applicable.

Finally we note that global attractivity of every connected component of an invariant variety is generally impossible, for topological reasons.

Remark 4

As in Example 1 consider the variety \(V=\mathcal {V}(y^2-x(x+1) (x+2))\) with two connected components of dimension 1, one bounded and one unbounded. Assume that h is a polynomial (or smooth) vector field on \({\mathbb {R}}^2\) such that for each initial value \(y\in {\mathbb {R}}^2\) the solution z(t) exists on \(\left[ 0,\,\infty \right) \) and satisfies \({\mathrm{dist}}\,(z(t),\,M)\rightarrow 0\) as \( t\rightarrow \infty \). Then there are points in \({\mathbb {R}}^2{\setminus } V\) which are attracted by the bounded connected component, as well as points which are attracted by the unbounded component. For each connected component its domain of attraction is nonempty and open, and \({\mathbb {R}}^2\) cannot be the union of these disjoint domains, by connectedness. Thus we obtain a contradiction.

4 Natural Controlled Invariant Varieties

We now turn to control problems (2), (3), and to varieties V that are invariant for (3) with appropriate feedback. Geometrically speaking, in a control problem one needs to modify f via g such that every solution orbit that has one point in common with V is completely contained in it.

4.1 Definition and Some Properties

We recall and extend the definition of controlled invariance from [15].

Definition 2

  1. (a)

    A variety V is called controlled invariant for (2) if there exists a polynomial state feedback \(\alpha \in R^m\) such that V is invariant for the closed loop system (3).

  2. (b)

    A variety V is called rationally controlled invariant for (2) if there exists a rational state feedback \(\alpha \) whose denominator has no zero in \({\mathbb {K}}^n\) such that V is invariant for the closed loop system (3).

By Remark 1 both notions coincide for \({\mathbb {K}}={\mathbb {C}}\), but there is a significant difference in the real case.

Now, given a polynomial input matrix \(g\in R^{n\times m}\), we wish to characterize varieties which are controlled invariant for (2) for every vector field\(f \in R^n\).

Definition 3

  1. (a)

    Given a polynomial matrix \(g \in R^{n \times m}\) and a variety V, we call Vrationally natural controlled invariant with respect tog (briefly RNCIV) if for all \(f \in R^n\) there exist \(\alpha =\alpha _f \in R^m\) and \(\psi =\psi _f \in R\) with \({\mathcal {V}}(\psi _f)=\emptyset \) such that V is invariant for \({\dot{x}}=(\psi _f\cdot f+g\cdot \alpha _f)(x)\).

  2. (b)

    If \(\psi _f=1\) can be chosen then we call Vnatural controlled invariant with respect tog (briefly NCIV).

Remark 5

  1. (a)

    A necessary requirement for the RNCIV property of a smooth variety V is the “pointwise condition”

    $$\begin{aligned} T_a(V) +{\mathbb {K}} g_1(a)+\cdots +{\mathbb {K}} g_m(a)={\mathbb {K}}^n\quad \text { for all } a\in V. \end{aligned}$$

    Indeed, if this condition fails at the point a then take any polynomial drift f with \(f(a)\notin T_a(V)+\mathrm{im}_{{\mathbb {K}}}\,g(a)\). Obviously there exists no rational (or smooth) feedback \(\alpha \) such that \(f+g\alpha \) leaves V invariant.

  2. (b)

    The requirement of natural controlled invariance ensures robustness with respect to perturbations of the drift, in a dual sense:

    1. (i)

      Whenever the drift is altered from f to \({{\widetilde{f}}}\) then there exist \(\psi _{{{\widetilde{f}}}}\) and \(\alpha _{{{\widetilde{f}}}}\) such that V is invariant for \({\dot{x}}=(\psi _{{{\widetilde{f}}}}\cdot {{\widetilde{f}}}+g\cdot \alpha _{{{\widetilde{f}}}})(x)\). This holds by definition.

    2. (ii)

      Let a (smooth) vector field \(f_1\) be given. Then for sufficiently small \(\varepsilon \), every nonstationary point \(a\in V\) of \( f+{\psi }^{-1}g\alpha \) admits a neighborhood U and a local invariant manifold \(V^*\) for the perturbed system

      $$\begin{aligned} f+\varepsilon f_1+{\psi }^{-1}g\alpha \end{aligned}$$

      with \(V^*\) close to V (with respect to the Hausdorff distance). This is a direct consequence of standard dependency theorems.

While for every given variety it is easy to construct nontrivial polynomial vector fields that leave this variety invariant (see Proposition 1), there exist controls which do not admit interesting rationally natural controlled invariant varieties. We look at a simple example.

Example 4

  1. (a)

    In \({\mathbb {R}}^2\) the input matrix

    $$\begin{aligned} g(x)=\begin{pmatrix} -x_2\\ x_1\end{pmatrix} \end{aligned}$$

    admits no smooth RNCIV of dimension one. To see this, assume that \(V={{\mathcal {V}}}(\varphi )\) is a RNCIV, and let \(y\in V\) be a point of minimal distance to 0. Setting \(\rho (x):=(x_1^2+x_2^2)/2\), the Lagrange multiplier theorem implies that either \(\nabla \varphi (y)=0\) (which is impossible by smoothness of V) or

    $$\begin{aligned} \lambda \cdot \nabla \varphi (y)=\nabla \rho (y)=y\text { for some } \lambda . \end{aligned}$$

    When \(\lambda =0\) then \(y=0\), and \(g(y)=0\in T_0(V)\); a contradiction to Remark 5(a). But when \(\lambda \not =0\) then \(\left<g(y),\,\nabla \varphi (y)\right>=0\) which also implies \(g(y)\in T_y(V)\); again we obtain a contradiction.

  2. (b)

    Note: It is unproblematic to generalize this example to \({\mathbb {R}}^n\), with the columns of g generating the submodule of \(R^n\) which leaves \({\mathbb {S}}^{n-1}\) invariant. Moreover, one has the same result for closed submanifolds (rather than varieties).

  3. (c)

    Nonexistence of RNCIV’s may imply scarcity of CIV’s for a given drift. To see this, we continue part (a) with the particular drift \(f(x)=x\). Let V be a one dimensional smooth invariant variety for some \(f+g\alpha \), with \(y\in V\) having minimal distance to 0. The arguments from part (a) show that \(\lambda =0\), with \((f+g\alpha )(y)=0\), or

    $$\begin{aligned} 0=\left<(f+g\alpha )(y),y\right>=\left<y,y\right>. \end{aligned}$$

    Since f(z) and g(z) are linearly independent for all \(z\not =0\), we find \(y=0\) in both cases. To summarize, if there exists a CIV for some \(f+g\alpha \) then this variety must contain 0. There obviously exist invariant varieties for \(f= f+g\cdot 0\) (\(\alpha =0\); control is switched off), viz. all straight lines through the origin. For \(\alpha (0)\not =0\) the stationary point 0 is a focus of \(f+g\alpha \), which admits no local analytic invariant curves in \({\mathbb {R}}^2\), and a fortiori no algebraic invariant curves. In case \(\alpha (0)=0\) the vector field is locally analytically equivalent to f by Poincaré–Dulac normal form theory (see e.g. Bibikov [4]). Conclusion At most, the input matrix g can deform existing invariant curves of f.

4.2 Characterization

Our main result on natural controlled invariant varieties provides equivalent conditions for a variety V to satisfy the “pointwise conditions” from Remark 5. This can be used for the algorithmic verification of the NCIV property, and it is also helpful for the construction of varieties, and for the computation of feedbacks. We are mainly interested in the real case, which is the underlying reason for the introduction of rational feedbacks. On the other hand, a proper understanding of the real case requires to consider the complex setting as well.

We keep the notation from Sect. 2.1, in particular V is a variety with vanishing ideal \({{\mathcal {J}}}(V)\) generated by \(\varphi _1,\ldots ,\varphi _k\), and its Jacobian J is defined in (5).

Theorem 2

Let V be equidimensional and smooth with \(\dim (V)=d\); furthermore let \(g\in R^{n \times m}\).

  1. (a)

    The following statements are equivalent for \({\mathbb {K}}={\mathbb {R}}\) as well as \({\mathbb {K}}={\mathbb {C}}\).

    1. (i)

      V is rationally natural controlled invariant with respect to g.

    2. (ii)

      For all \(f\in R^n\) there exists \(\psi _{f}\in R\) such that \({\mathcal {V}}(\psi _{f})=\emptyset \) and

      $$\begin{aligned} \psi _{f}\cdot f\in {\mathcal {M}}+ \text { im}_{R}(g) \end{aligned}$$
    3. (iii)

      \(\text {rank}((J \cdot g)(a))=\text {rank}(J (a))\) for all \(a \in V\).

    4. (iv)

      \(T_aV+ \text { im}_{{\mathbb {K}}}(g(a)) = {\mathbb {K}}^n\) for all \(a \in V\).

  2. (b)

    In case \({\mathbb {K}}={\mathbb {C}}\), (i)–(iv) are equivalent to

    1. (v)

      \(\mathcal {M}+\mathrm{im}_R(g) = R^n\).

    2. (vi)

      V is natural controlled invariant with respect to g.

  3. (c)

    If \({\mathbb {K}}={\mathbb {R}}\) and any of (ii), (iii), (iv) holds for the complexification of R or V respectively, then V is natural controlled invariant with respect to g.

Proof

We first prove part (a); parts (b) and (c) are rather simple consequences. Since V is smooth and equidimensional, the equality \(\text {rank}(J(a))=n-d\) holds for all \(a \in V\).

  1. 1.

    For a fixed \(\psi _f \in R\) we can find an \(\alpha _f \in R^m\) such that \(\psi _f\cdot f + g\cdot \alpha _f \in \mathcal {M}\) if and only if \(\psi _f\cdot f \in {\mathcal {M}}+ \mathrm{im}_R(g)\). From this and Lemma 1 we get (i) \(\Leftrightarrow \) (ii).

    To prove equivalence of (iii) and (iv) we use a fact from Linear Algebra (see e.g. Lemma 5.46 in [17]): For matrices \(A \in {\mathbb {K}}^{k\times n}\), \(B\in {\mathbb {K}}^{n \times m}\), one has \(\text {rank}(A)=\text {rank}(AB)\) if and only if \(\text {ker}_{\mathbb {K}}(A) + \text {im}_{\mathbb {K}}(B)={\mathbb {K}}^n\). The assertion follows with \(\text {ker}(J(a)) = T_aV\).

  2. 2.

    In order to show the implication (ii) \(\Rightarrow \) (iv) we first prove that

    $$\begin{aligned} \mathcal {M}(a) := \{h(a) \ | \ h \in {\mathcal {M}}\} \subseteq T_aV \quad \text { for all } \ a \in V. \end{aligned}$$
    (8)

    Thus let \(a \in V\) and \(h \in {\mathcal {M}}\) be arbitrary. Then Lemma 1 implies \(J\cdot h \in {\mathcal {I}}\cdot R^k\) and thus we have \(0=(J\cdot h)(a) = J(a)\cdot h(a)\). Because of \({\mathcal {J}}({\mathcal {V}}({\mathcal {I}}))={\mathcal {I}}\) this yields \(h(a) \in \text {ker}(J(a))=T_aV\) as desired.

    Next, we prove that statement (ii) implies \({\mathbb {K}}^n = {\mathcal {M}}(a) + \mathrm{im}_{{\mathbb {K}}}(g(a))\). Combined with (8) this will yield

    $$\begin{aligned} {\mathbb {K}}^n = {\mathcal {M}}(a) + {{{\,\mathrm{im}\,}}}_{{\mathbb {K}}}(g(a)) \subseteq T_aV + {{{\,\mathrm{im}\,}}}_{{\mathbb {K}}}(g(a)) \subseteq {\mathbb {K}}^n \end{aligned}$$

    which shows (iv). So let \(v \in {\mathbb {K}}^n\subseteq R^{n}\). By (ii) there exists \(\psi _v \in R\) with \({\mathcal {V}}(\psi _v)=\emptyset \) and \(q\in {\mathcal {M}}, \ w \in R^m\) such that \(\psi _v\cdot v = q + g\cdot w\). But then for every \(a \in V\) we have \(\psi _v(a) \ne 0\) and thus

    $$\begin{aligned} v= v(a) = (\psi _v(a))^{-1}\cdot (q(a) + g(a)\cdot w(a)) \in {\mathcal {M}}(a) + \mathrm{im}_{{\mathbb {K}}}(g(a)) \end{aligned}$$

    as desired.

  3. 3.

    As a preliminary step for the proof of “(iv)\(\Rightarrow \)(ii)” we strengthen the subset relation in (8) to equality, thus we prove

    $$\begin{aligned} \mathcal {M}(a) = T_aV \ \text { for all } \quad a \in V. \end{aligned}$$
    (9)

    To see this, partition

    $$\begin{aligned} J(x)= \begin{pmatrix} A_{11}(x)&{}\quad A_{12}(x)\\ A_{21}(x)&{}\quad A_{22}(x) \end{pmatrix},\quad A_{11}(x)\in R^{(n-d)\times (n-d)}, \end{aligned}$$

    and assume w.l.o.g. that \(A_{11}(a)\) is invertible, hence \(A_{11}(v)\) is invertible for all v in a neighborhood of a. Since J(v) has rank \(n-d\) for all \(v\in V\), we have

    $$\begin{aligned} J(v) \begin{pmatrix} z_1\\ z_2 \end{pmatrix}=0\Leftrightarrow A_{11}(v)z_1+A_{12}(v)z_2=0, \end{aligned}$$

    whence the columns

    $$\begin{aligned} w_1(x),\ldots , w_d(x) \text { of } \begin{pmatrix} -A_{11}(x)^{-1}A_{12}(x)\\ I_d \end{pmatrix} \end{aligned}$$

    are defined at a and form a basis of \({\mathrm{ker}}\,J(x)\subseteq {\mathbb {K}}(x_1,\ldots ,x_n)^n\). Multiplying by a common denominator \(\rho \) of the \(w_i\) with \(\rho (a)\not =0\), we get

    $$\begin{aligned} {{\widetilde{w}}}_i:=\rho \cdot w_i\in {{\mathcal {M}}},\quad \,1\le i\le d, \end{aligned}$$

    and \({{\widetilde{w}}}_1(a),\ldots , {{\widetilde{w}}}_d(a)\in {{\mathcal {M}}}(a)\) are linearly independent in \({\mathbb {K}}^n\).

  4. 4.

    Now we show that (iv) implies (ii). Let \(q_1,\ldots ,q_s\) generate the module \({\mathcal {M}}\), and let \(f\in R^n\). Then for every \(a\in V\) there exist polynomials

    $$\begin{aligned} \rho _a,\,\mu _{a,j}\,(1\le j\le s),\quad \nu _{a,\ell }\,(1\le \ell \le m) \end{aligned}$$

    such that \(\rho _a(a)\not =0\), and

    $$\begin{aligned} \rho _a\cdot f=\sum _j\mu _{a,j}q_j+\sum _\ell \nu _{a,\ell }g_\ell . \end{aligned}$$

    To verify this, assume w.l.o.g. that

    $$\begin{aligned} q_1(a),\ldots ,q_{d}(a),g_1(a),\ldots ,g_{n-d}(a) \end{aligned}$$

    span \({\mathbb {K}}^n\), and use Cramer’s rule over \({\mathbb {K}}(x_1,\ldots ,x_n)\).

    Due to Hilbert’s basis theorem [9, Thm. 1.3.5], the variety V is quasi-compact [12, Prop. 1.3]. Therefore there exists \(p \in {\mathbb {N}}\) and \(\{a_{1},\dots ,a_{p}\}\subseteq V\) such that the \(\rho _i:=\rho _{a_i}\) have no common zero in V, hence \(\rho _1,\ldots ,\rho _p\) and \(\varphi _1,\ldots ,\varphi _k\) have no common zero in \({\mathbb {K}}^n\). By the Nullstellensatz (see Remark 1) there exist \(\beta _i,\eta _j\in R\) such that

    $$\begin{aligned} \sum \rho _i\beta _i +\sum \varphi _j\eta _j=1+\sigma \end{aligned}$$

    with \(\sigma =0\) in case \({\mathbb {K}}={\mathbb {C}}\), and \(\sigma (x)\ge 0\) for all x when \({\mathbb {K}}={\mathbb {R}}\). Abbreviating \(\mu _{ij}:=\mu _{a_i,j}\) and \(\nu _{ik}:=\nu _{a_i,k}\), summation yields

    $$\begin{aligned} (1+\sigma )\,f=\sum _j\varphi _j(\eta _j f)+\sum _{i,j}\beta _i\mu _{ij}q_j+\sum _{i,\ell }\beta _i\nu _{i,\ell }g_\ell . \end{aligned}$$

    The first two sums on the right hand side lie in \({\mathcal {M}}\), since \({{\mathcal {I}}}\cdot R^n\subseteq {{\mathcal {M}}}\), and the last sum lies in \(\mathrm{im}_R(g)\).

  5. 5.

    For \({\mathbb {K}}={\mathbb {C}}\) the equivalence of (ii) and (v) follows by Hilbert’s Nullstellensatz (Remark 1); this shows part (b). Finally in part (c) we may choose \(\psi _f=1\) in the complexification by (b), and then take real parts. Thus V is a NCIV with respect to g. \(\square \)

4.3 Examples

As shown by Example 4, RNCIV’s for a given g do not exist in general. Moreover their construction (if existence is given) is a nontrivial task, although considerably easier than finding CIV’s for given f and g. In this section, we construct RNCIV’s and NCIV’s for special classes of input matrices \(g\in R^{n\times m}\).

Proposition 3

For \({\mathbb {K}}={\mathbb {R}}\), let \(\psi _1,\ldots ,\psi _m\in R\), and \(A\in R^{n\times n}\) such that A(z) is symmetric and positive semidefinite for all \(z\in {\mathbb {R}}^n\). Define

$$\begin{aligned} g(x):=A(x)\cdot \left( \nabla \psi _1(x),\ldots ,\nabla \psi _m(x)\right) . \end{aligned}$$

If \(c_1,\ldots ,c_m\in {\mathbb {K}}\) are such that

$$\begin{aligned} W:={{\mathcal {V}}}(\psi _1-c_1,\ldots ,\psi _m-c_m) \end{aligned}$$

is smooth of dimension d, \(\mathrm{rank}\,\left( \nabla \psi _1(x),\ldots ,\nabla \psi _m(x)\right) =n-d\) on W, and A(z) is positive definite for all \(z\in W\) then W is a RNCIV for g, and a NCIV given the conditions of Theorem 2(c).

Proof

For any \(z\in W\), a positive definite scalar product \(\tau _z\) is defined by

$$\begin{aligned} \tau _z(u,v):=\left<u,A(z)v\right>. \end{aligned}$$

Then the vector space \(\mathrm{im}_{{\mathbb {K}}}(g(z))\) is spanned by the \(\nabla \psi _j(z)\), and the tangent space \(T_z(W)\) is the \(\tau _z\)–orthogonal complement of this space. This implies the “pointwise” condition (ii) in Theorem 2(a). \(\square \)

Remark 6

In particular, if A is given as in Lemma 3 (or A is such that Remark 2 is applicable) and the conditions of Theorem 1 hold for W then any drift admits a feedback such that W is locally attracting for (3): First find a feedback such that W is invariant for (3), then apply Corollary 1.

The next class of examples generalizes invariance properties of homogeneous polynomials, and also works in the complex setting.

Proposition 4

For an input matrix \(g=(g_1,\ldots ,g_m) \in R^{n\times m}\) assume there exist nonconstant \(\mu _1,\ldots ,\mu _k \in R\) such that

$$\begin{aligned} L_{g_i}(\mu _j)=b_{ji}\cdot \mu _j \,\text { with some }b_{ji} \in {\mathbb {K}}; \quad j \in \{1,\ldots ,k\}, \,\ i \in \{1,\ldots ,m\}. \end{aligned}$$

Assume that there exist \(c_1,\ldots ,c_k\in {\mathbb {K}}\) such that

$$\begin{aligned} Y:={{\mathcal {V}}}(\mu _1-c_1,\ldots ,\mu _k-c_k) \end{aligned}$$

satisfies \({{\mathcal {J}}}(Y)=\left<\mu _1-c_1,\ldots ,\mu _k-c_k\right>\), and Y is equidimensional and smooth, of dimension d. If the matrix

$$\begin{aligned} B=( b_{ji} ) \in {\mathbb {K}}^{k\times m} \end{aligned}$$

satisfies \(\text {rank}(B)=n-d\) then Y is a NCIV for g.

Proof

Let J be the Jacobian of \({{\mathcal {J}}}(Y)\), and \(M:={{{\,\mathrm{diag}\,}}}(\mu _1,\ldots ,\mu _k)\). We have

$$\begin{aligned} J \cdot g = \begin{pmatrix} D\mu _1 \\ \vdots \\ D\mu _k \end{pmatrix} \cdot (g_1,\ldots ,g_m)= \begin{pmatrix} b_{11}\mu _1 &{} \cdots &{} b_{1m}\mu _1 \\ \vdots &{} &{} \vdots \\ b_{k1} \mu _k &{} \cdots &{} b_{km} \mu _k \end{pmatrix} = M\cdot B. \end{aligned}$$

Since \(\mu _j(a)=c_j \ne 0\) for all \(a\in V\) and \(j=1,\ldots ,k\), we have \(\text {rank}(M(a))=k\) for all \(a \in Y\) and thus

$$\begin{aligned} \text {rank}((J\cdot g)(a)) = \text {rank}((M\cdot B)(a)) = \text {rank}(M(a)\cdot B) = \text {rank}(B) = \text {rank}(J(a)) \end{aligned}$$

Therefore Y is smooth, and all assumptions of Theorem 2 are satisfied. The assertion follows. \(\square \)

Example 5

  1. (a)

    Let \({\mathbb {K}}={\mathbb {R}}\) and \(n\ge 2\). Consider \(g\in R^{n}\) with \(g(x)=x\) and let \(\mu \) be any homogeneous polynomial of degree \(\ell \ge 1\). By the familiar Euler differential equation one has \(L_g(\mu )=\ell \cdot \mu \), So, whenever \(c\in {\mathbb {R}}\) is such that \(W:={{\mathcal {V}}}(\mu -c)\) is smooth then the assumptions of Propositions 3 and 4 are fulfilled and W is a NCIV with respect to g.

    As a special example consider the real case and \(\mu =\sum _{i=1}^n \alpha _i x_i^2\), with all \(\alpha _i>0\), and \(c>0\). Here Remark 6 is applicable.

  2. (b)

    Let \({\mathbb {K}}={\mathbb {R}}\) and

    $$\begin{aligned} g= \begin{pmatrix} g_1&\quad g_2 \end{pmatrix}= \begin{pmatrix} x_1&{}\quad 0\\ 0&{}\quad x_2\\ 0&{}\quad x_3 \end{pmatrix}. \end{aligned}$$

    Then \(W:=\mathcal {V}(x_1-c_1,x_2^2+x_3^2-c_2)\), with \(c_1\in {\mathbb {R}}\) and \(c_2>0\), is a NCIV with respect to g. To see this, note that the complexification of W is smooth of dimension one, and for

    $$\begin{aligned} \mu _1=x_1,\quad \mu _2=x_2^2+x_3^2 \end{aligned}$$

    the identities

    $$\begin{aligned} L_{g_1}(\mu _1)=\mu _1,\quad L_{g_2}(\mu _1)=0,\quad L_{g_1}(\mu _2)=0,\quad L_{g_2}(\mu _2)=2\mu _2 \end{aligned}$$

    hold; therefore

    $$\begin{aligned} B= \begin{pmatrix} 1&{}\quad 0\\ 0&{}\quad 2 \end{pmatrix} \end{aligned}$$

    in the notation of Proposition 4. Consequently, we get

    $$\begin{aligned} \text {rank}(B)=2=3-1 \end{aligned}$$

    and by applying Proposition 4 the assertion follows.

Example 6

We provide an application of Proposition 3. With \({\mathbb {K}}={\mathbb {R}}\) and

$$\begin{aligned} \psi := x_2^2-x_1(x_1+1)(x_1+2) \end{aligned}$$

(compare Example 1), consider the input matrix

$$\begin{aligned} g=\nabla \psi = \begin{pmatrix} -(3x_1^2+6x_1+2)\\ 2x_2 \end{pmatrix}. \end{aligned}$$

The elements of the module \({\mathcal {M}}\) are given by

$$\begin{aligned} \rho \cdot q+\psi \cdot h, \end{aligned}$$

with \(\rho \in R\) and \(h\in R^2\) arbitrary, and

$$\begin{aligned} q:= \begin{pmatrix} 2x_2\\ 3x_1^2+6x_1+2 \end{pmatrix}, \end{aligned}$$

as follows e.g. from [6] (and is easily verified directly). We note that

$$\begin{aligned} \Delta (x):=\det \begin{pmatrix} q(x)&g(x) \end{pmatrix}=4x_2^2+(3x_1^2+6x_1+2)^2 \end{aligned}$$

has real zeros only at \(x_1=(-6\pm 2\sqrt{3})/6\) and \(x_2=0\). At these points one has \(\psi (x)=\pm 2\sqrt{3}/9\). Thus for all \(c\in {\mathbb {R}}{\setminus } \{\pm 2\sqrt{3}/9\}\) Proposition 3 is applicable to \(V_c:={{\mathcal {V}}}(\psi -c)\). Thus for any \(a\in V_c\) we have that \(T_a(V_c)\) is spanned by q(a); moreover \(q(a),\,g(a)\) span \({\mathbb {R}}^2\).

Given any \(f\in R^2\) we obtain

$$\begin{aligned} \Delta (x)\,f(x)=\det \left( f(x), \,g(x)\right) \cdot q(x)+\det \left( q(x),\,f(x)\right) \cdot g(x) \end{aligned}$$

by Cramer’s rule.

We now consider the special case \(c=0\), for the sake of simplicity. According to step # 4 in the proof of Theorem 2 one would determine polynomials \(\beta \) and \(\eta \) such that \(\beta \Delta +\eta \psi =1+\sigma \), with \(\sigma \) only attaining nonnegative values. But the relevant point is to find some linear combination of \(\Delta \) and \(\psi \) that has no real zero. In the present example, determining a Gröbner basis of \(\left<\Delta ,\,\psi \right>\) yields one element

$$\begin{aligned} \lambda :=\beta \Delta +\eta \psi =729x_2^8-584x_2^6-72x_2^4+96x_2^2+16, \end{aligned}$$

with

$$\begin{aligned} \begin{aligned} \eta&= 729x_1^3x_2^4+1863x_1^2x_2^4+729x_2^6 -108x_1^3x_2^2+954x_1x_2^4-324x_1^2x_2^2\\&\quad -396x_2^4-108x1^3-72x_1x_2^2-324x_1^2+36x_2^2-216x_1,\\ \beta&= 81x_1^2x_2^4+126x_1x_2^4 -12 x_1^2x_2^2-47x_2^4-24x_1x_2^2-12x_1^2+20x_2^2-24x_1+4. \end{aligned} \end{aligned}$$

Note that \(\lambda \) is a polynomial in one variable; an elementary discussion shows that \(\lambda \) attains a positive minimum in \({\mathbb {R}}\). We thus obtain

$$\begin{aligned} \lambda f=\left( \eta \psi \cdot f+ \beta \det \left( f, \,g\right) \cdot q\right) + \beta \det \left( q,\,f\right) \cdot g, \end{aligned}$$

and choosing the feedback

$$\begin{aligned} \alpha =\frac{\beta \det \left( q,\,f\right) }{\lambda }-\varepsilon ^{-1}\psi \end{aligned}$$

(with any \(\varepsilon \)) yields a vector field which admits the invariant variety \(V_0=V\). Choosing \(\varepsilon >0\) sufficiently small yields a vector field which admits \(\psi \) as a Lyapunov function in some neighborhood of the compact connected component \({{\widetilde{V}}}\) of V.