1 Introduction

Let us consider a real polynomial differential system in the plane with some parameters, \(\lambda \in \mathbb {R}^d\), written in complex coordinates as

$$\begin{aligned} {\left\{ \begin{array}{ll} \dot{z}=iz+Z(z,w,\lambda ),\\ \dot{w}=-iw+W(z,w,\lambda ), \end{array}\right. } \end{aligned}$$
(1)

where \(w=\bar{z}\) and \(Z(z,w,\lambda )\), \(W(z,w,\lambda )=\bar{Z}(z,w,\lambda )\) are polynomial perturbations having neither linear nor constant terms in zw. The center problem consists in identifying whether the origin of (1) is a center or a focus, when the origin is a monodromic nondegenerate equilibrium point. This problem is related to the local cyclicity problem, which aims to determine the maximum number of small limit cycles which bifurcate from the origin when perturbing the system in a polynomial class of fixed degree. All of them are relevant studies in the 16th Hilbert problem.

To deal with this problem let us consider the Poincaré map \(\Pi \), which maps a given point \(\rho \) in a section \(\Sigma \) transversal to the orbit \(\gamma \) to the first intersection \(\Pi (\rho )\) of \(\Sigma \) and \(\gamma \) in positive time. The Poincaré map can be analytically extended to \(\rho = 0\), so we can consider its Taylor expansion and define the displacement map

$$\begin{aligned} d(\rho ):=\Pi (\rho )-\rho =V_3\,\rho ^3+V_4\,\rho ^4+V_5\, \rho ^5+V_6\, \rho ^6+\cdots = \sum _{n=3}^\infty V_n\,\rho ^n, \end{aligned}$$
(2)

for certain values \(V_n\). Observe that the center problem is equivalent to determine whether all \(V_n\) are zero or not, since periodic orbits are fixed points of the Poincaré map. If not all \(V_n\) vanish, the first nonzero \(V_n\) must have odd subindex. These \(V_n\) with odd \(n\ge 3\) are known as Lyapunov constants, and they will be denoted by \(L_{(n-1)/2}:=V_n\). According to [6], the Lyapunov constants are polynomials, whose variables are the parameters of system (1). In this case for which not all \(V_n\) vanish, the origin of the system is a focus and its stability is determined by the first nonzero Lyapunov constant. As a consequence, the center problem reduces to the problem of finding and vanishing all the Lyapunov constants \(L_k\), that is solving the nonlinear system \(\{L_1=L_2=\cdots =0\}\). They also are an essential tool in the study of the cyclicity problem, since the limit cycles correspond to the isolated zeroes of (2). In this short paper, we will briefly present two methods to compute these Lyapunov constants or study some of their useful properties to deal with the center and cyclicity problems.

2 A Parallelization of Lyapunov Method

An algorithm to find Lyapunov constants is the so-called Lyapunov method, which is based on the utilization of a first integral of system (1). The computations could be made using real values (see [9]), but we consider complex coordinates because the obtained expressions are shorter. The objective is then to find a formal first integral \(F=F_2+F_3+F_4+\cdots \) of system (1), with \(F_k (z,w):=\sum _{j=0}^k h_{k-j,j} \, z^{k-j} w^{j}\) homogeneous degree k polynomials. We aim to study whether \(\dot{F}\) vanishes or not. We compute

$$\begin{aligned} \dot{F}=F_z\,\dot{z}+F_w\,\dot{w}=F_z\,(iz+Z(z,w,\lambda ))+F_w\,(-iw+W(z,w,\lambda ))=\sum _{k\ge 1}L_k(\lambda )\,(zw)^{k+1}. \end{aligned}$$
(3)

The last equality is a consequence of a result which states that if there exists such F, then in suitable coordinates it is analytic on zw; see [3]. Therefore, \(\dot{F}\) is also analytic on zw. Observe that if all \(L_k(\lambda )\) vanish then \(\dot{F}=0\), and therefore F is a first integral, so the origin is a center. These \(L_k(\lambda )\) are actually the Lyapunov constants, which are polynomials in the parameters \(\lambda \); see [4]. For the sake of simplicity, we will denote them simply as \(L_k\). F can be found recursively, starting by imposing equation (3) and performing formal operations as follows:

$$\begin{aligned}&\quad \left( F_{2z}+F_{3z}+F_{4z}+\cdots \right) \,(iz+Z_2+Z_3+Z_4+\cdots )+\\&+\left( F_{2w}+F_{3w}+F_{4w}+\cdots \right) \,(-iw+W_2+W_3+W_4+\cdots )=\\&\qquad =L_1\,(zw)^2+L_2\,(zw)^3+L_3\,(zw)^4+\cdots . \end{aligned}$$

Here we solve the linear system obtained by equating the same degree coefficients in zw. This way one can find the coefficients \(h_{k-j,j}\) of each term \(F_k\) of the first integral and use it to find the corresponding Lyapunov constants.

The above technique has been implemented in PARI/GP (or simply PARI) programming language; see [5]. As the computation of Lyapunov constants is a highly computationally expensive procedure, this algorithm has been optimized and improved by means of parallelization, which allows to significantly increase computation velocity. The idea is to find each of the Lyapunov constants and the coefficients \(h_{k-j,j}\) of \(F_k\) of degree k in terms of the coefficients of lower degree. This part is relatively fast computationally speaking since the manipulated expressions are not too large. Then we parallelize the substitution of those coefficients with their actual value, and here parallelization is essential because this process deals with very large expressions.

The results of this parallelization technique are amazing, and its efficiency has allowed our method to find Lyapunov constants in a relatively short time for cases which had not been solved before due to the huge amount of time and computational complexity required. In particular, we have applied this method to the complete cubic system

$$\begin{aligned} {\left\{ \begin{array}{ll} \dot{z}=iz+\hat{r}_{20}z^2+\hat{r}_{11}zw+\hat{r}_{02}w^2+\hat{r}_{30}z^3+\hat{r}_{21}z^2w+\hat{r}_{12}zw^2+\hat{r}_{03}w^3,\\ \dot{w}=-iw+\hat{s}_{20}w^2+\hat{s}_{11}wz+\hat{s}_{02}z^2+\hat{s}_{30}w^3+\hat{s}_{21}w^2z+\hat{s}_{12}wz^2+\hat{s}_{03}z^3. \end{array}\right. } \end{aligned}$$
(4)

We have observed that if time is rescaled by dividing by the imaginary unit i, computations are much more efficient and the calculation time decreases. Actually, the computations we describe here cannot be performed if this time rescaling is not done. If we denote \(r_{jk}=\hat{r}_{jk}/i\) and \(s_{jk}=\hat{s}_{jk}/i\), the system in the new time variable can be written as

$$\begin{aligned} {\left\{ \begin{array}{ll} z'=z+r_{20}z^2+r_{11}zw+r_{02}w^2+r_{30}z^3+r_{21}z^2w+r_{12}zw^2+r_{03}w^3,\\ w'=-w+s_{20}w^2+s_{11}wz+s_{02}z^2+s_{30}w^3+s_{21}w^2z+s_{12}wz^2+s_{03}z^3. \end{array}\right. } \end{aligned}$$
(5)

Up to our knowledge, the highest known Lyapunov constant for the above system is the 10th; see [7]. But with our parallelization technique, we have been able to reach the 14th. To perform this computation we have used the computer network of our department. The parallelization has been done with the software PBala; see [8]. This server has eight nodes with Intel Xeon 2.60 GHz processors. The total memory is 640 GB and 96 threads can be run at the same time. The size of the new Lyapunov constants is shown in Table 1. The total computing time was around 22 h.

Table 1 Size of the computed Lyapunov constants

It is well-known, see for example [2], that the solution of the center problem for the general cubic differential system needs at least 11 Lyapunov constants. Now, the obstacle to obtain a complete characterization of the cubic centers is how can we solve the nonlinear system \(\{L_1=L_2=\cdots =0\}\), and not how to construct it because we think that we have computed enough Lyapunov constants.

3 Interpolation and Reconstruction Technique

Let us consider the ideal in \(\mathbb {C}[\lambda ]\) generated by all Lyapunov constants \(\langle L_1,L_2,L_3,\ldots \rangle \) associated to the differential system (1) with some fixed degree. Due to the Hilbert Basis Theorem, this ideal is finitely generated, so there must exist \(m\in \mathbb {N}\) such that

$$\begin{aligned} \langle L_1,L_2,L_3,\ldots \rangle =\langle L_1,L_2,L_3,\ldots ,L_m\rangle . \end{aligned}$$
(6)

To know this m would significantly simplify the problem, because by computing the first m Lyapunov constants we would obtain the center conditions. Nevertheless, as [1] states, there are no general methods to find this m and this is the reason why the center problem has been solved only for certain polynomial families.

Let \(\mathcal {B}_{k}:=\langle L_1,\ldots ,L_{k} \rangle \) be the Bautin ideal generated by the first k Lyapunov constants. The method we suggest aims to check whether a certain Lyapunov constant \(L_n\) belongs to \(\mathcal {B}_{n-1}\), and therefore it vanishes when the previous are equal to zero. It is important to remark that to apply this technique at this step we assume that we have been able to compute the first n Lyapunov constants.

Let us start by writing

$$\begin{aligned} L_n=\sum _{j=1}^{n-1} A_j L_j, \end{aligned}$$
(7)

where \(A_j\) are polynomials whose variables are the parameters of (1). Our method consists in trying to see whether we can determine these polynomials \(A_j\), since this will tell if expression (7) is possible or not.

Using the notation of (5) for the parameters, let us consider a monomial \(M=\prod _{k,\ell } r_{k\ell }^{p_{k\ell }} s_{k\ell }^{q_{k\ell }}\), where \(r_{k\ell }\) and \(s_{k\ell }\) correspond to the coefficients of \(z^k w^\ell \) of \(Z(z,w,\lambda )\) and \(W(z,w,\lambda )\), respectively. We define the quasi-degree of M as \(\sum _{k,\ell } (k+\ell -1)(p_{k\ell }+q_{k\ell })\) and its weight as \(\sum _{k, \ell }(1-k- \ell )(p_{k \ell }-q_{k\ell })\). Then, by [4], the monomials of a Lyapunov constant \(L_j\) satisfy that they have quasi-degree 2j and weight 0. Now using these properties together with the degree of \(L_j\), we can select which monomials are candidates to be part of each \(A_j\), but with undetermined coefficients. Thus, we have that \(A_j\) are polynomials whose monomials have been selected and have undetermined coefficients, and these coefficients of \(A_j\) are what we try to compute.

Now knowing the structure of \(A_j\), we would substitute it in (7), expand the products and the sum and finally equate the coefficients of monomials with the same literal part. This gives a set of linear equations consisting of the coefficients of equality (7). If this system of linear equations is compatible, then the polynomials \(A_j\) do exist and \(L_n\) vanishes when \(L_1,\ldots ,L_{n-1}\) are zero; otherwise, if the system is incompatible then the polynomials \(A_j\) do not exist and \(L_n\) does not belong to \(\mathcal {B}_{n-1}\). Instead of explicitly solving the system of equations, we have compared ranks of the system matrices to see if they are equal or not.

With this method we have studied three different families and we have obtained the following results.

Proposition 1

Consider the Kukles differential system

$$\begin{aligned} {\left\{ \begin{array}{ll} \dot{x}=-y,\\ \dot{y}=x+b_{20}x^2+b_{11}xy+b_{02}y^2+b_{30}x^3+b_{21}x^2y+b_{12}xy^2+b_{03}y^3, \end{array}\right. } \end{aligned}$$

which in complex coordinates is written as

$$\begin{aligned} {\left\{ \begin{array}{ll} \dot{z}=iz+r_{20}z^2+r_{11}zw+r_{02}w^2+r_{30}z^3+r_{21}z^2w+r_{12}zw^2+r_{03}w^3,\\ \dot{w}=-iw-r_{20}z^2-r_{11}zw-r_{02}w^2-r_{30}z^3-r_{21}z^2w-r_{12}zw^2-r_{03}w^3. \end{array}\right. } \end{aligned}$$

Then \(L_9\) does not belong to \(\mathcal {B}_8\). In the case \(r_{12}=0\), \(L_9\) again does not belong to \(\mathcal {B}_8\), but \(L_{10}\) does belong to \(\mathcal {B}_9\) since there exist \(A_j\) such that \(L_{10}=\sum _{j=1}^{9} A_j L_j\).

From the above result, we can guess that only the first 9 Lyapunov constants are enough to solve the center problem for this family when \(r_{12}=0\). This interpolation method works better than the standard approach using a Groebner basis for the simplifications.

The center problem for degree 5 homogeneous perturbations of the linear oscillator is an open problem, and even the value m in (6) is unknown. The mechanism proposed here fails for the general family due to the size of the computations. The next result presents some particular cases.

Proposition 2

Consider the linear plus homogeneous degree 5 polynomial differential system

$$\begin{aligned} {\left\{ \begin{array}{ll} \dot{z}=iz+r_{41}z^4w+r_{32}z^3w^2+r_{23}z^2 w^3+r_{14}zw^4+r_{05}w^5,\\ \dot{w}=-iw+s_{41}w^4z+s_{32}w^3z^2+s_{23}w^2 z^3+s_{14}wz^4+s_{05}z^5. \end{array}\right. } \end{aligned}$$

Then the next properties hold:

  1. (i)

    if \(r_{41}=s_{41}=0\), then \(L_{10}\) does not belong to \(\mathcal {B}_9\) but \(L_{11}\) does belong to \(\mathcal {B}_{10}\);

  2. (ii)

    if \(r_{32}=s_{32}=0\), then \(L_{11}\) and \(L_{12}\) do not belong to \(\mathcal {B}_{10}\) and \(\mathcal {B}_{11}\), respectively.

The last considered family is a special quartic differential system with four invariant straight lines.

Proposition 3

Consider the following system with two parallel invariant lines

$$\begin{aligned} {\left\{ \begin{array}{ll} \dot{x}=(1-x^2)(-y+a_{20}x^2+a_{11}xy+a_{02}y^2),\\ \dot{y}=(1-y^2)(x+b_{20}x^2+b_{11}xy+b_{02}y^2), \end{array}\right. } \end{aligned}$$

which can be written in complex coordinates as

$$\begin{aligned} {\left\{ \begin{array}{ll} \begin{aligned} \dot{z}= \;&{} iz+r_{40}z^4+r_{31}z^3w+r_{22}z^2w^2+r_{14}z w^3+r_{04}w^4+r_{21}z^2w+r_{03}w^3+ \\ &{} r_{20}z^2+r_{11}zw+r_{02}w^2, \\ \dot{w}= &{} -iw+s_{40}w^4+s_{31}w^3z+s_{22}w^2z^2+s_{14}w z^3+s_{04}z^4+s_{21}w^2z+s_{03}z^3+ \\ &{} s_{20}w^2+s_{11}wz+s_{02}z^2. \end{aligned} \end{array}\right. } \end{aligned}$$

For this system both \(L_7\), \(L_8\), and \(L_9\) do not belong to \(\mathcal {B}_6\), \(\mathcal {B}_7\), and \(\mathcal {B}_8\), respectively. However, when \(r_{11}=s_{11}=0\), \(L_7\) does belong to \(\mathcal {B}_6\).