This is a preprint of: “On the computation of Darboux first integrals of a class of planar polynomial vector fields”, Antoni Ferragut, Carlos Galindo, Francisco Monserrat, J. Math. Anal. Appl., vol. 478, 743–763, 2019. ON THE COMPUTATION OF DARBOUX FIRST INTEGRALS OF A CLASS OF PLANAR POLYNOMIAL VECTOR FIELDS A. FERRAGUT, C. GALINDO AND F. MONSERRAT Abstract. We study the Q class of planar polynomial vector fields admitting Darboux first integrals of the type ri=1 fiαi , where the αi ’s are positive real numbers and the fi ’s are polynomials defining curves with only one place at infinity. We show that these vector fields have an extended reduction procedure and give an algorithm which, from a part of the extended reduction of the vector field, computes a Darboux first integral for generic exponents. 1. Introduction Complex planar polynomial differential systems are being studied since the 19th cen- tury when Darboux [16], Poincaré [38, 39], Painlevé [37] and Autonne [5] significantly contributed to this topic. Surprisingly, nowadays, the problem of characterizing inte- grable differential systems as above remains open. To compute a first integral is a very interesting issue because this function provides the solution curves of the system within their domain of definition, determining the phase portrait of the system. The Darboux theory of integrability of planar differential systems (as presented for example in [18]) considers a remarkable family of multi-valued functions, named Darboux functions, which have the following shape: Yp q Y  µj λi hj H := fi exp , (1) gj i=1 j=1 where fi , and gj and hj are bivariate complex polynomials and λi and µj complex numbers. The Darboux theory states that if a system has p invariant algebraic  curves  with equations hj fi = 0 with cofactors ki , i ≤ i ≤ p, and q exponential factors exp gj with cofactors `j , P P 1 ≤ j ≤ q, such that pi=1 λi ki + qj=1 µj `j = 0 for some complex numbers {λi }pi=1 and {µj }qj=1 , not all zero, then the function H given in (1) is a first integral of the differential system. A particular and desirable type of Darboux functions are rational functions because when H = f /g is a first integral, all the invariant curves of the system are algebraic and are determined from the equations λf + βg = 0, where the pair (λ : β) runs over the complex projective line. Poincaré in [39] observed that “to find out whether a differential equation of the first order and the first degree is algebraically integrable, it is enough to get an upper bound of the degree of the integral”. This observation gave rise to the 2010 Mathematics Subject Classification. 34A34; 34C05; 34C08; 14C21. Key words and phrases. Planar polynomial vector field, Darboux first integral, reduction of singularities, curve with only one place at infinity. Partially supported by the Spanish Government Ministerio de Economı́a, Industria y Competitivi- dad (MINECO), grants MTM2015-65764-C3-2-P, MTM2016-81735-REDT, MTM2016-81932-REDT and MTM2016-77278-P, as well as by Universitat Jaume I grants P1-1B2015-02 and P1-1B2015-16. 1 http://www.gsd.uab.cat 2 A. FERRAGUT, C. GALINDO AND F. MONSERRAT so-called Poincaré problem, which looks for a bound of the degree of the first integral in terms of the degree of the polynomial system, and generated a lot of literature. Although it is well-known that this upper bound does not exist in general, in some cases it can be computed. For instance, when the singularities of the corresponding vector field are non-degenerated [39], when they are of nodal type [13] or when the reduction of the before mentioned vector field admits only one non-invariant exceptional divisor [25]. Notice also that, when a bound of the degree of the rational first integral is known, efficient algorithms to compute that integral have been described [23, 8]. Recently in [22], the authors considered a family of planar polynomial differential sys- tems F formed by those systems admitting a polynomial first integral which factorizes as a product of bivariate polynomials, each of them defining a curve with only one place at infinity. These first integrals were called well-behaved at infinity, WAI for short. A plane curve has only one place at infinity when it meets the line at infinity in a unique point where it is reduced and unibranched. Abhyankar and Moh [1, 2, 3] introduced these curves. They have a very good local-global behavior, which makes them useful when studying some algebraic and geometric problems [10, 11, 19, 20, 24]. In addition, many interesting (but hard to compute) tools, introduced for improving the knowledge of the algebraic varieties, are much easier to describe when one considers surfaces having a close relation with curves with only one place at infinity [41, 26, 36, 27]. Returning to the family F of differential systems, we proved in [22] that when a vector field, or equivalently a 1-form ω, corresponds to a system S in F , then the degree of the polynomial first integral can be bounded from the knowledge of a part of the Seidenberg reduction of ω. Furthermore, from this reduction, we are able to decide whether S belongs to F or not and, in the affirmative case, to compute the corresponding first integral. This solves the problem of deciding if a system has a polynomial first integral given by (natural) powers of curves with only one place at infinity. We want to study whether a similar procedure can be performed for families of polyno- mial differential systems having a non-polynomial Darboux first integral defined by curves with only one place at infinity. So, in this paper, we consider a new family D of planar polynomial differential systems having what we call a Darboux positive well-behaved at infinity (DPWAI) first integral. This family satisfies D ∩ F = ∅ and roughly speaking (see Definition Q 4.1 for the precise concept) a DPWAI function is a (multi-valued) function H = ri=1 fiαi , where fi , 1 ≤ i ≤ r, are bivariate polynomials defining plane curves Ci with only one place at infinity and satisfying that each one of them does not belong to the pencil at infinity defined by any other. In addition, the values αi , 1 ≤ i ≤ r, are positive real numbers satisfying a certain condition which holds when they are linearly independent over the rational numbers. The main result in this paper is an algorithm whose input is a differential system X and whose output is either a first integral of X or “0”. The output is a DPWAI first integral when X belongs to D and its first integral has generic exponents (see Definition 4.4); if the output is “0” then either X does not belong to D, or it belongs to D but the exponents of the first integral are not generic. Vector fields admit a (possibly infinite) extended reduction of singularities (see Definition 4.3). This extended reduction shows that simple singularities whose quotient of eigenvalues is a positive irrational number can be “simplified” by an infinite sequence of point blowing-ups and represented by means of a proximity graph (see Subsection 2.4 and Section 4). Our algorithm uses a (finite) part of that extended reduction and, also, when X belongs to D and its first integral has generic exponents, determines the complete extended reduction over the line at infinity. Notice ON THE COMPUTATION OF DARBOUX FIRST INTEGRALS 3 that, with this algorithm, we are able to compute much more Darboux first integrals (which are not rational) than in [22]. The algorithm has two steps. The first one, Algorithm 5.3, uses the mentioned part of the extended reduction to get candidates to polynomials defining the invariant curves Ci , and the second one computes the exponents αi by using Darboux theory of integrability (Theorem 5.1). We think that, in practice, our algorithm works for any system in D; how- ever, due to our algebraic techniques, we can only guarantee that it computes a Darboux first integral when the exponents {αi }ri=1 are generic. Section 5 provides the mentioned algorithm together with an example showing how it works. The ingredients we need to develop the paper are given in Section 2. WAI first integrals are recalled in Section 3 and Section 4 introduces the concept of extended reduction of a vector field and describes it for vector fields in D (generic exponents). 2. Preliminaires Let X be a complex planar polynomial differential system given by ẋ = p(x, y), ẏ = q(x, y), (2) where p, q ∈ C[x, y] and gcd(p, q) = 1. Assume that d = max{deg p, deg q} is the degree of the system X, deg meaning total degree. In the sequel X also denotes the corresponding ∂ ∂ vector field X = p ∂x + q ∂y . Recall that a function H = H(x, y) (may be multi-valued) is a first integral of X if H is constant on the solutions of the system. If H ∈ C 1 then it satisfies the equation ∂H ∂H XH = p +q = 0, ∂x ∂y whereas H is defined. In this paper, we will study a certain family of vector fields X admitting a particular class of Darboux first integrals. We devote this section to summarize some concepts and properties we will need. We have introduced the polynomial differential system (2) by using affine coordinates, however, in this paper, we will need to consider its complex projectivization. Therefore we start by studing the complex projectivization X of the vector fields X and their corre- sponding 1-forms. 2.1. Polynomial vector fields in CP2 . Let A, B, and C be homogeneous polynomials of degree d + 1 in the variables X, Y , and Z with coefficients in the complex numbers. A homogeneous 1-form Ω = AdX + BdY + CdZ of degree d + 1 is called projective if XA + Y B + ZC = 0. This means that there exist three homogeneous polynomials P , Q, and R, in the variables X, Y, Z, of degree d such that A = ZQ − Y R, B = XR − ZP, C = Y P − XQ. Then, we can write Ω = P (Y dZ − ZdY ) + Q(ZdX − XdZ) + R(XdY − Y dX). (3) The 1-form Ω is usually called a Pfaff algebraic form of the complex projective plane CP2 [30], and the triple (P, Q, R) determines a homogeneous polynomial vector field in CP2 of degree d: ∂ ∂ ∂ X =P +Q +R . ∂X ∂Y ∂Z 4 A. FERRAGUT, C. GALINDO AND F. MONSERRAT Let F ∈ C[X, Y, Z] be a homogeneous polynomial. The curve F = 0 in CP2 is invariant under the flow of the vector field X if ∂F ∂F ∂F XF = P +Q +R = KF, (4) ∂X ∂Y ∂Z for some homogeneous polynomial K ∈ C[X, Y, Z] of degree d − 1, called the cofactor of F. The singular points of a projective 1-form Ω of degree d + 1 or of its associated ho- mogeneous polynomial vector field X of degree d are those points in the projective plane satisfying the following system of equations: ZQ − Y R = 0, XR − ZP = 0, Y P − XQ = 0. (5) Next we show how to get the projectivization, as a 1-form or as a vector field, of System (2). System (2) is equivalent to the 1-form p(x, y)dy − q(x, y)dx, which extends to CP2 as the projective 1-form of degree d + 1       d+2 X Y Y dZ − ZdY X Y XdZ − ZdX Z p , −q , , (6) Z Z Z2 Z Z Z2 where we have replaced (x, y) by (X/Z, Y /Z). Set P (X, Y, Z) = Z d p(X/Z, Y /Z) and Q(X, Y, Z) = Z d q(X/Z, Y /Z), then the 1-form (6) becomes P (X, Y, Z)(Y dZ − ZdY ) + Q(X, Y, Z)(ZdX − XdZ). As a consequence, the vector field X is extended to the homogeneous polynomial vector field of degree d in CP2 ∂ ∂ X =P +Q . (7) ∂X ∂Y which is called the complex projectivization of the vector field X. Notice that the line at infinity Z = 0 is a solution of the projective vector field because the third component R in X is identically zero. In addition, by (5), it turns out that the singular points of the complex projectivization of System (2) satisfy the following equalities: ZQ(X, Y, Z) = 0, ZP (X, Y, Z) = 0, Y P (X, Y, Z) − XQ(X, Y, Z) = 0. The third equation and the line Z = 0 determine the singular points at infinity. Setting Z = 1, the singular points which are not at infinity are obtained from the equalities P = Q = 0. Recall that an invariant algebraic curve of the vector field X is an affine algebraic curve with local equation f (x, y) = 0, f ∈ C[x, y], such that Xf = kf , where k ∈ C[x, y] is called the cofactor of f = 0 and has degree at most d − 1. Now, if f (x, y) = 0 has degree n ∈ N, then F (X, Y, Z) = Z n f (X/Z, Y /Z) = 0 is an invariant algebraic curve of the vector field (7) with cofactor K(X, Y, Z) = Z d−1 k(X/Z, Y /Z). We have briefly reviewed the projectivization procedure for affine systems. We conclude this subsection by explaining how the affinization works. We will consider the local chart determined by Z = 1. Let F = 0 be an invariant algebraic curve of degree n of the vector field defined by (3) with cofactor K. Applying Euler’s Theorem for homogeneous functions and taking (4) into account, it holds that f (x, y) = F (X, Y, 1) = 0 is an equation of an invariant algebraic curve of the restriction of Ω to the affine plane: (P (x, y, 1) − xR(x, y, 1)) dy − (Q(x, y, 1) − yR(x, y, 1)) dx. ON THE COMPUTATION OF DARBOUX FIRST INTEGRALS 5 This 1-form has degree d+1 and the cofactor of the invariant curve f (x, y) = 0 is k(x, y) = K(x, y, 1) − nR(x, y, 1). It has degree at most d whenever the line Z = 0 is not invariant. We notice that the line Z = 0 is invariant if and only if Z|R. In such a case, the degree of k is at most d − 1. Next, we give a short overview of the blow-up technique to reduce the singularities of a planar vector field, which will be a key element in this paper. 2.2. Reduction of singularities. The singularities of planar vector fields can be reduced by blowing-up (see [22, Section 4.1] for details). This procedure, due to Seidenberg, performs algebraic modifications and gives rise to a simpler vector field over a different to CP2 surface, which makes easier the study of the original vector field [40, 17, 4]. Next we recall the concepts of singularity and simple singularity. Definition 2.1. A point O ∈ C2 is called a singularity of a polynomial vector field ∂ ∂ X = p(x, y) ∂x + q(x, y) ∂y in C2 , {x, y} being local coordinates at O, if the multiplicity of X at O (that is, the minimum of the orders of p = p(x, y) and q = q(x, y) at O) is strictly positive. Moreover O is called a simple singularity whenever X has multiplicity 1 at O and the matrix ! ∂p1 ∂p1 ∂x ∂y ∂q1 ∂q1 , ∂x ∂y defined by the first nonzero jet p1 dy − q1 dx of the differential 1-form pdy − qdx, has eigenvalues λ1 , λ2 satisfying either λ1 λ2 6= 0 and λλ12 6∈ Q+ , or λ1 λ2 = 0 and λ21 + λ22 6= 0. An ordinary singularity is a singularity that is not simple. Seidenberg’s reduction theorem [40] (see also [9]) shows that the singularities of a planar vector field can be transformed into simple singularities by means of blowing-ups: Theorem 2.2. Let O ∈ C2 be an isolated singularity of a polynomial vector field X = ∂ ∂ p ∂x + q ∂y in C2 . Then there exists a finite sequence of blowing-ups centered at closed points of the successively obtained surfaces, π : Z → CP2 , such that all the singularities of the strict transform of the vector field at the surface Z are simple. From a global point of view, Seidenberg’s result states that, given an homogeneous polynomial vector field X in CP2 , there exists a set of points (or configuration, according with a forthcoming definition) S(X ) = {Q0 , Q1 , . . . , Qn } such that Q0 ∈ X0 := CP2 , πQi−1 : BlQi−1 (Xi−1 ) → Xi−1 is the blowing-up of Xi−1 centered at Qi−1 , Qi ∈ BlQi−1 (Xi−1 ) =: Xi for 1 ≤ i ≤ n, and the composition πQ0 ◦ · · · ◦ πQn : Z := Xn+1 −→ CP2 is such that all the singularities of the strict transform X̃ of X in Z are simple. We call S(X ) the singular configuration of X . For an explicit local description of the reduction of singularities and the obtention of the singular configuration, including a detailed example, see Section 4 of [22]. A solution of X at a point p ∈ CP2 is a holomorphic (possibly singular) irreducible curve on a neighborhood of P which passes through p and is invariant by X . A singularity is called dicritical if there are infinitely many solutions through it (see [22, Definition 1] for an equivalent definition that allows us to detect the dicritical character of a singularity from the reduction process). 6 A. FERRAGUT, C. GALINDO AND F. MONSERRAT Along the paper, we will denote by D(X ) the dicritical configuration of X , which is the set of points Qi in S(X ) such that Qi is a dicritical singularity of the strict transform of the vector field X at Qi (see [22, page 360] for the definition of strict transform of a vector field and the straightforward translation of the concept of dicritical singularity to these vector fields over surfaces obtained by blowing-up). In the following two subsections we recall the concepts of configuration of infinitely near points and its proximity graph, and that of proximity graph defined by a positive real number. 2.3. Proximity graph of a configuration: singular and dicritical graphs. Let P be a point of a complex surface. The exceptional divisor EP produced by blowing-up P is called the first infinitesimal neighborhood of P . By induction, if i > 0, then the points in the ith infinitesimal neighborhood of P are the points in the first infinitesimal neighborhood of some point in the (i − 1)th infinitesimal neighborhood of P . A point Q 6= P in some infinitesimal neighborhood of P is called proximate to P if Q belongs to the strict transform of EP . Also Q is a satellite point if it is proximate to two points; that is, if it is the intersection point of the strict transforms of two exceptional divisors. Non-satellite points are named free. Points in the ith infinitesimal neighborhood of P , for some i > 0, are infinitely near to P . These points admit a natural ordering: a point R precedes Q if and only if Q is infinitely near to R. Note that we agree that a point is infinitely near to itself. A configuration of infinitely near points (or, simply, a configuration) of a complex surface X0 (it could be CP2 ) is a (finite or infinite) set of points C = {P0 , P1 , . . .}, such that P0 ∈ X0 and, for all i ≥ 1, Pi belongs to the blow-up Xi of Xi−1 with center at Pi−1 . The Hasse diagram of C, HC , with respect to the above alluded order relation is a union of rooted trees whose set of vertices is bijective with C. The proximity graph of C, ΓC , is a labeled graph formed by HC where, also, we join with a dotted edge those vertices corresponding with points P and Q of C such that Q is proximate to P but Q is not in the first infinitesimal neighborhood of P . For simplicity we delete those dotted edges that can be deduced from others. If X is, as above, a projective vector field over CP2 , the proximity graph ΓS(X ) (respec- tively, ΓD(X ) ) is called the singular graph (respectively, dicritical graph) of X . 2.4. The proximity graph defined by a positive real number. Let X0 be a complex surface, P a point in X0 and C a germ of curve on the local ring of X0 at P having only one analytic branch. Assuming that P is singular, one can determine the configuration of infinitely near points DC = {P0 , P1 , . . . , Ps } such that: (i) P0 = P and, for all i ≥ 1, Pi is the point where the exceptional divisor EPi−1 meets the strict transform of C. (ii) The composition of the blowing-ups centered at the points of DC gives rise to a minimal embedded resolution of the singularity of C at P . For i ≥ 0, let mi denote the multiplicity at Pi of the strict transform of C. Each one of these numbers P mi satisfies the so-called proximity equalities: mi = 1 if i = s and, otherwise, mi = mj , where the sum runs over the set of indices j such that Pj is proximate to Pi ON THE COMPUTATION OF DARBOUX FIRST INTEGRALS 7 [12]. Notice that the (s + 1)-tuple of multiplicities (m0 , m1 , . . . , ms ) uniquely determines the proximity graph of the configuration DC . If the singularity of C at P has only one Puiseux pair (i.e., the minimal embedded res- olution is obtained by blowing-up some free points and, afterwards, finitely many satellite points), then the sequence of multiplicities of C at P has the shape (r0 (c0 ) , r1 (c1 ) , . . . , r`(c` ) = 1(c` ) ), where the subindices (ci )`i=0 indicate the number of times that each multiplicity is repeated. Moreover, the numbers ci come from the continued fraction expansion of the rational number Ps 2 i=0 mi 1 2 = [c0 ; c1 , . . . , c` ] := c0 + 1 ; m0 c1 + c +... 1 2 c` r0 = m0 and r1 , r2 , . . . ,P r` are the successive remainders appearing when the Euclidean algorithm is applied to si=0 m2i and m20 [12]. PHence, in this case, the proximity graph s m2 of DC is determined by the rational number i=0 m20 i . Similarly, the continued fraction expansion of any positive rational number β determines a proximity graph, which we shall denote by Prox(β). Now, let γ be a positive irrational number and consider its (infinite) continued fraction expansion 1 γ = [c0 ; c1 , c2 , . . .] := c0 + 1 . c1 + c2 +... For each i ≥ 0 set βi := [c0 ; c1 , . . . , ci ]. Then, the proximity graph defined by γ, Prox(γ), is given by the limit of the graphs Prox(βi ) in the following sense: the vertices (respectively, edges) of Prox(γ) are the vertices (respectively, edges) of Prox(βi ) for i large enough. It has the shape described in Figure 1. .. . sPc0 +c1 sPc0 +c1 −1 .. . sPc0 +1 sPc0 sPc0 −1 .. . sP1 sP0 Figure 1. Proximity graph defined by γ. The relation between elimination of base points of certain linear systems and the reduc- tion of singularities of planar vector fields having a rational first integral supports some reasonings in this paper. So we conclude this section with a brief of those concepts close to linear systems we will use. 8 A. FERRAGUT, C. GALINDO AND F. MONSERRAT 2.5. Linear systems and pencils. A linear system on CP2 is the set of algebraic curves defined by the polynomials in a subspace of Cm [X, Y, Z] for some natural number m > 0, where Cm [X, Y, Z] denotes the (projective) space of homogeneous polynomials of degree m in the variables X, Y, Z. Notice that a linear system has structure of projective space. A pencil is a linear system of projective dimension 1. Next, we introduce the concept of cluster of CP2 . Definition 2.3. A cluster of infinitely near points (or, simply, a cluster) of CP2 is a pair (C, m) where C = {Q0 , Q1 , . . . , Qh } is a configuration of infinitely near points of CP2 and m = (m0 , m1 , . . . , mh ) ∈ Nn , N being the set of positive integers. We desire to consider linear systems determined by clusters. To this purpose, we require some notations and concepts. We start by recalling the concept of virtual transform (respectively, passing virtually) at (respectively, through) a point of a cluster. For each Qi ∈ C, we set `(Qi ) := card{Qj ∈ C| Qi is infinitely near to Qj }. Now consider a cluster K = (C, m), an algebraic curve C in CP2 , and a point Qk ∈ C. When `(Qk ) = 1, we take a local chart at Qk with local coordinates (x, y) and a local equation of C, f (x, y) = 0. The virtual transform of C at Qk with respect to the cluster K (denoted by CQ K ) is the (local) curve defined by f (x, y) = 0. The multiplicity of C K k Qk at Qk , denoted mQk (CQ K ), is the degree of the first non-zero jet of f (x, y). Finally, we say k that C passes virtually through Qk with respect to K whenever mQk (CQ K )≥m . k k Suppose now that `(Qk ) > 1 and set Qj ∈ C such that Qk is in the first infinitesi- mal neighborhood of Qj . Assume inductively that C passes virtually through Qj with respect to K, take local coordinates (x, y) at Qj and let f (x, y) = 0 be a local equa- tion of CQK . The point Q belongs to the surface obtained by blowing-up Q and thus j k j Qk = (0, λ) (respectively, Qk = (λ, 0)) in local coordinates (x, t = y/x) (respectively, (s = x/y, y)). This allows us to define the virtual transform of C at Qk with respect to the cluster K, CQK , as the (local) curve defined by x−mj f (x, x(t + λ)) = 0 (respectively, k x−mj f ((s + λ)y, y) = 0). As above, the multiplicity of CQ K at Q is denoted by m (C K ) k k Qk Qk and C passes virtually through Qk with respect to K if mQk (CQ K ) ≥ m . When the curve k k C passes virtually through Qi with respect to K for all Qi ∈ K, we say that C passes virtually through K. Next we define the above mentioned linear system determined by a cluster and a positive integer. Definition 2.4. Given a positive integer m and a cluster K = (C, m) of CP2 , the linear system determined by m and K, denoted by Lm (K) or Lm (C, m), is the linear system in CP2 given by those curves defined by polynomials in Cm [X, Y, Z] that pass virtually through K. Another important concept for us is that of the strict transform of a curve on a surface obtained by a sequence of point blowing-ups. Definition 2.5. The strict transform C̃ of an algebraic curve C on a complex surface Z obtained by the composition π : Z → CP2 of the sequence of point blowing-ups associated with a (finite) configuration of infinitely near points C is the image of C by the birational map π −1 . ON THE COMPUTATION OF DARBOUX FIRST INTEGRALS 9 Let n be a positive integer, let F1 , F2 , . . . , Fs ∈ Cn [X, Y, Z] be linearly independent polynomials in Cn [X, Y, Z] and assume that F1 , F2 , . . . , Fs have no common factor. Set L = PV the linear system on CP2 associated to the linear space over C, V = hF1 , F2 , . . . , Fs i, spanned by the polynomials Fi , 1 ≤ i ≤ s. Then, there exists a configuration of infinitely near points of CP2 , BP(L), and a finite set of linear subspaces Hi ( CPs−1 , 1 ≤ i ≤ t, such that the strict transforms of the curves with equations α1 F1 (X, Y, Z) + α2 F2 (X, Y, Z) + · · · + αs Fs (X, Y, Z) = 0, S (α1 , α2 , . . . , αs ) ∈ CPs−1 \ ti=1 Hi (called generic curves of L) have the same multiplicities at every point Q ∈ BP(L) (denoted by multQ (L)) and have pairwise empty intersections at the surface obtained by blowing-up the points in BP(L). Notice that, if L is a pencil, S then ti=1 Hi is a finite set. Definition 2.6. With the above notations, the pair (BP(L), m), where m = (multQ (L))Q∈BP(L) , is a cluster of inifinitely near points of CP2 called the cluster of base points of L. 3. Reduction of singularities of a vector field with WAI first integral We start this section by recalling the concept of plane curve with only one place at infinity, which was initially considered in [1, 2, 3]. Definition 3.1. An algebraic projective curve C defined by a homogeneous polynomial F ∈ C[X, Y, Z] has only one place at infinity if C meets the line at infinity Z = 0 at a unique point P and C is reduced and unibranched (i.e., analytically irreducible) at P . Next we introduce the concept of well-behaved at infinity (WAI) first integral. Definition 3.2. A complex planar polynomial differential system (or vector field) X has a WAI first integral if it has a polynomial first integral of the form r Y H= fini , i=1 where r and ni , 1 ≤ i ≤ r, are positive integers and fi , 1 ≤ i ≤ r, are polynomials in C[x, y] of degree di ∈ N such that each complex projective curve Ci of CP2 defined by the projectivization Fi (X, Y, Z) = Z di fi (X/Z, Y /Z) of fi has only one place at infinity. Along this paper we will also assume that, for having a WAI first integral H, gcd(n1 , n2 , . . . , nr ) = 1, r ≥ 2, and that H fulfills the following condition: fi − λfj 6∈ C for all i, j ∈ {1, 2, . . . , r} such that i 6= j and for all λ ∈ C. (8) For 1 ≤ j 6= i ≤ r, write X ρji := (Cj , Ci )Q , (9) Q where Q runs over the set of common points of Cj and Ci outside the line at infinity (defined by Z = 0), and (Cj , Ci )Q is the intersection multiplicity between Ci and Cj at Q. We will assume in the remaining of this section that X is a complex planar polyno- mial vector field which admits a WAI first integral. By [22, Corollary 1], the dicritical 10 A. FERRAGUT, C. GALINDO AND F. MONSERRAT configuration D(X ) of the complex projectivization X of X to CP2 coincides Qr with the con- ni Pr of the cluster of base points of the pencil PV , where V = h i=1 Fi , Z i and figuration d d = i=1 ni di , di := deg(Fi ). This cluster is studied in [11]. Taking advantage of it we state the following result, which provides a very specific information about the dicritical configuration D(X ). Proposition 3.3. Let X and X be as above. Then [r D(X ) = (BP(Pi ) ∪ {Si } ∪ Li ) , i=1 where, for each i = 1, 2, . . . , r: (a) BP(Pi ) is the configuration of base points of the pencil Pi defined by the non-zero linear combinations of the polynomials Fi and Z di . (b) The configuration BP(Pi ), ordered by the relation “to be infinitely near to”, has only one maximal point Qi . Moreover, the strict transform of the curve Ci with equation Fi = 0 meets the exceptional divisor EQi at a unique point Si . The local 1-form at Si defining the strict transform of X has the shape δi u dt − ni t du, where u = 0 (respectively, t = 0) is a local equation of the strict transform of Ci at Si (respectively, the exceptional divisor EQi ) and r X δi = nj ρji . j=1 j6=i Furthermore, {Si } ∪ Li is the configuration of base points of the (local) pencil (at Si ) defined by the non-zero linear combinations of uni and tδi . (c) No value ρji equals zero. (d) The point Si is free. (e) If i 6= j then Si is not infinitely near to Sj and Sj is not infinitely near to Si . Proof. Items (a), (b), and (e) follow from [11, Lemma 1] and its proof. The composition of the blowing-ups centered at the points of Pi is an embedded resolution of the singularity of Ci at infinity (see [2, 34]) and, as a consequence, the point Si is free. This proves Item (d). It remains to prove (c). Reasoning by contradiction, assume that ρji = 0 for some indexes i, j ∈ {1, 2, . . . , r} such that i 6= j. Let Y be the surface obtained by blowing-up the points in BP(Pi ) and let C̃i and C̃j be the respective strict transforms of Ci and Cj on Y . By (b) and (e) and our assumption, C̃i and C̃j do not meet, and then C̃i · C̃j = 0. This means, by the projection formula, that C̃j is contracted by the morphism defined by a basis of global sections of the sheaf OY (C̃i ) [29]. Thus Cj must be a curve of the pencil Pi , and this contradicts Condition (8), which is assumed for the WAI first integral H.  S Remark 3.4. The configuration ri=1 (BP(Pi ) ∪ {Si }) is independent of the exponents n1 , n2 , . . . , nr appearing in the WAI first integral. 4. Extended reduction of singularities and DPWAI first integrals An algorithm for deciding whether a polynomial differential system as (2) has a WAI first integral, and computing that integral in the affirmative case, was given in [22]. This algorithm uses a part of the reduction of the corresponding vector field X . We want to find out whether there is some close procedure to compute other types of Darboux first ON THE COMPUTATION OF DARBOUX FIRST INTEGRALS 11 integrals involving curves with only one place at infinity. Next we introduce a class of Darboux functions and an extended reduction of singularities of vector fields suitable for our purposes. Definition 4.1. A Darboux positive well-behaved at infinity (DPWAI, for short) function is a multi-valued function of the form r Y H= fiαi , r ≥ 2, i=1 where: (1) The fi ’s, i ≤ i ≤ r, are polynomials in C[x, y] of degree di ∈ N such that the curve Ci defined by the projectivization Fi (X, Y, Z) = Z di fi (X/Z, Y /Z) of fi has only one place at infinity. (2) The values αi , i ≤ i ≤ r, are strictly positive real numbers. (3) The polynomials fi , 1 ≤ i ≤ r satisfy Condition (8). (4) For all i ∈ {1, 2, . . . , n}, there is no positive rational number β such that r X βαi = ρji αj , j=0 j6=i where ρji is the value defined in (9). Remark 4.2. Note that our last condition holds, in particular, when {αi }ri=1 is a linearly independent set over the field Q. Now, we define the concept of extended reduction of singularities. Definition 4.3. An extended reduction of singularities of an arbitrary singular polynomial vector field X on CP2 is a sequence of blowing-ups · · · → Xi+1 → Xi → · · · → X1 → X0 = CP2 (10) obtained by performing, first, a reduction of singularities of X and, then, by successively blowing-up every simple singularity of the transformed vector field whose quotient of eigenvalues is a positive real number. This extended reduction can be regarded as a more natural procedure than Seidenberg’s reduction because we keep blowing-up points while the quotient of eigenvalues is a positive real number γ. Although we can obtain an infinite sequence of blowing-ups, this sequence is completely determined by the continued fraction expansion of γ. Seidenberg applies only this procedure when γ is rational giving rise to a finite sequence of point blowing-ups. Let us denote by E(X ) the configuration of infinitely near points of CP2 formed by the centers of the extended reduction of singularities of X . Also, E∞ (X ) will denote the configuration of points in E(X ) whose images on CP2 by the sequence (10) belong to the line at infinity. Definition 4.4. We will say that a property P is satisfied for generic exponents {αi }ri=1 if there exists a finite set of non-zero polynomials {hj (z1 , z2 , . . . , zr )}j∈J ⊆ C[z1 , . . . , zr ], J a set of indexes, fulfilling the following condition: P is satisfied for all r-tuples (α1 , α2 , . . . , αr ) such that hj (α1 , . . . , αr ) 6= 0 for all j ∈ J. 12 A. FERRAGUT, C. GALINDO AND F. MONSERRAT Until the end of this section, we will suppose that X is a polynomial vector field (or differential system) of C2 having a DPWAI first integral r Y H= fiαi . i=1 Consider the complex projectivization X of X and set ΩX = AdX + BdY + CdZ a homogeneous reduced 1-form defining X . The following result explains how ΩX writes for generic exponents. See [33] for the affine version with a polynomial differential system having a generalized Darboux first integral. Proposition 4.5. With the above notation it follows that, for generic exponents α1 , . . . , αr , the reduced 1-form ΩX is, up to multiplication by a non-zero constant, equal to     r r r r X Y ∂Fi  X Y ∂Fi   αi Z Fj  dX +  αi Z Fj  dY  ∂X   ∂Y  i=1 j=1 i=1 j=1 j6=i j6=i   r X r Y r Y  ∂Fi  +  αi Z Fj −d Fj   dZ, ∂Z i=1 j=1 j=1 j6=i P where Fi is the projectivization of fi , 1 ≤ i ≤ r, and d = ri=1 αi deg(Fi ). Q Proof. It is straightforward to check that ri=1 fiαi is a first integral the vector field ob- tained by the restriction of ΩX to the affine plane. So, it only remains to prove that ΩX is reduced. Let X 0 be the map which sends every element β̄ = (β1 , β2 , . . . , βr ) ∈ Rr to the vector field X 0 (β̄) of CP2 defined by the homogeneous 1-form     r r r r X Y ∂Fi  X Y ∂Fi   Ω(β1 , β2 , . . . , βr ) :=  βi Z Fj  dX +  β i Z Fj  dY ∂X   ∂Y  i=1 j=1 i=1 j=1 j6=i j6=i   r r r ! r X Y ∂Fi X Y  +  βi Z Fj − βi deg(Fi ) Fj   dZ. ∂Z i=1 j=1 i=1 j=1 j6=i Denote by Q+ the set of positive rational numbers. Q It is straightforward to check that, for each β̄ ∈ (Q+ )r , the vector field X 0 (β̄) has ri=1 Fini /Z m as a first integral, where ni = eβi , 1 ≤ i ≤ r, e is the least common multiple of the denominators P of the irreducible expressions of the rational numbers β1 , β2 , . . . , βr and m = ri=1 ni deg(Fi ). By [11, Lemma 1 (iv)], the pencil of curves defined by the equations ( r ) Y ni m 1 λ1 Fi + λ2 Z = 0 | (λ1 : λ2 ) ∈ CP i=1 has exactly two elements whichQ are not integral (reduced and irreducible) curves. These curves are those with equations ri=1 Fini = 0 and Z m = 0. We must recall that this result ON THE COMPUTATION OF DARBOUX FIRST INTEGRALS 13 holds when the curves Fi = 0 have only one place at infinity. Otherwise this number may be larger [21]. Now, Ω(β̄) is reduced for all β̄ ∈ (Q+ )r because, otherwise, the formula relating the degrees of the pencil and the form, and the factorization of the remarkable curves [28, Lemma 1.2], does not hold. Consider now the function ω(β̄) which maps any element β̄ ∈ Rr to the affine 1-form ω(β̄) = aβ̄ (x, y)dx + bβ̄ (x, y)dy, where r X r Y r X Y ∂fi r ∂fi aβ̄ (x, y) := βi fj and bβ̄ (x, y) := βi fj . ∂x ∂y i=1 j=1 i=1 j=1 j6=i j6=i Regarding aβ̄ (x, y) and bβ̄ (x, y) as polynomials (with coefficients in a suitable ring) in the variable x (respectively y), we can compute the resultant Resx (aβ̄ , bβ̄ ) (respectively Resy (aβ̄ , bβ̄ )). The fact that Ω(β̄) is reduced for vectors β̄ ∈ (Q+ )r implies the same fact for ω(β̄), which proves that Resx (aβ̄ , bβ̄ ) ∈ C[β1 , β2 , . . . , βr ][y] (respectively, Resy (aβ̄ , bβ̄ ) ∈ C[β1 , β2 , β2 , . . . , βr ][x]) is a nonzero polynomial. As a consequence, setting R+ the set of positive real numbers, the 1-form ω(ᾱ) is reduced for all values ᾱ ∈ (R+ )r such that Resx (aᾱ , bᾱ ) 6= 0 and Resy (aᾱ , bᾱ ) 6= 0. This proves that the 1-form ΩX is reduced for generic exponents α1 , α2 , . . . , αr ∈ R+ and concludes the proof.  Now we state one of our main results, which determines the configuration E∞ (X ) cor- responding to projective vector fields X having a DPWAI first integral with generic expo- nents. Theorem 4.6. Assume that X is the complex projectivization of a polynomial vector field X having a DPWAI first integral as above whose exponents α1 , α2 , . . . , αr are generic. Then the following equality of configurations holds: r [ E∞ (X ) = (BP(Pi ) ∪ {Si } ∪ Ji ) , i=1 where, for 1 ≤ i ≤ r, the Si ’s are the points defined in Proposition 3.3 and each Ji = {R1i , R2i , . . .} is an infinite chain of infinitely near points such that R1i (respectively, Rji , j ≥ 2) is a point that belongs to the exceptional divisor obtained by blowing-up Si (respectively, Rj−1,i ). Moreover, the proximity graph of each chain {Si } ∪ Ji is determined by the irrational number δi /αi and named Prox(δi /αi ), where r X δi := αj ρji , j=0 j6=i P and ρji are the integers Q (Cj , Ci )Q defined in (9). Proof. Consider the vector ᾱ = (α1 , α2 , . . . , αr ) ∈ (R+ )r given by some generic elements {αi }ri=1 . Let B := Bᾱ = {β̄n = (β1n , β2n , . . . , βrn )}∞ + r n=1 be a sequence of vectors in (Q ) such that limn→∞ β̄n = ᾱ and, for each positive integer n, denote by XnB the vector field of CP2 given by the homogeneous 1-form Ω(β̄n ) defined as in the proof of Proposition 4.5. Notice that each vector field XnB has the following rational first integral: Qn en βin i=1 Fi , Z mβ̄n 14 A. FERRAGUT, C. GALINDO AND F. MONSERRAT where en is the least common multiple of the denominators of the irreducible expressions of β1n , β2n , . . . , βrn and Xr mβ̄n := en βin deg(Fi ). i=1 Hence, the restriction of XnB to the affine chart given by the complement of the line Z = 0 the vector fields XnB , has a WAI first integral. Notice that the dicritical configurations of S n ≥ 1, contain the configuration of infinitely near points of CP : ri=1 (BP(Pi ) ∪ {Si }) 2 (see Remark 3.4), and also that D(XnB ) ∩ CP2 = E∞ (X ) ∩ CP2 by the proof of Proposition 4.5. Let PnB be the pencil of curves defined by the equations n Y λ1 Fien βin + λ2 Z mβ̄n = 0, i=1 where (λ1 : λ2 ) ∈ CP1 . By Proposition 3.3, the configuration of base points of this pencil, which coincides with D(XnB ) [22, Corollary 1], is given by r [  BP(Pi ) ∪ {Si } ∪ LB in , i=1 where {Si } ∪ LB inis the configuration of base points of the (local) pencil (at Si ) defined B by the non-zero linear combinations of uen βin and tδin , where u = 0 (respectively, t = 0) is a local equation of the strict transform of Ci at Si (respectively, the exceptional divisor containing Si ) and r X B δin := en βjn ρji . j=0 j6=i Notice that, since (u, t) is a regular system of parameters of the local ring at Si [11, Lemma 1], the proximity graph of the configuration {Si } ∪ LB in is  B  δin Prox . en βin Now consider the configuration of infinitely near points of CP2 [r B := (BP(Pi ) ∪ {Si }) . i=1 The reduction of singularities of X shows that B ⊆ E∞ (X ) because ᾱ is taken to be generic. In addition, S1 , S2 , . . . , Sr are the unique common points of E∞ (X ) and the surface V obtained by blowing-up the points in ∪ri=1 BP(Pi ). This statement is a consequence of the forthcoming Lemma 4.7, [22, Lemma 1] (where it is proved that under our conditions the operations “blowing-up” and “taking associated 1-forms” commute) and the fact that the local equation of the strict transform of X at any point of V is the limit (when n tends to infinity) of the local equations of the strict transforms of XnB . To finish our proof and give a complete description of E∞ (X ). We notice that by [22, Lemma 1] the 1-form B en βin t du − δin u dt, 1 ≤ i ≤ r, ON THE COMPUTATION OF DARBOUX FIRST INTEGRALS 15 locally defines the strict transform of XnB at Si , where u = 0 is a local equation of the strict transform of Ci at Si and t = 0 is a local equation of the exceptional divisor. Then, taking limits, the 1-form δi t du − dt αi defines the strict transform of X at Si . From this local expression of the vector field, it is straightforward to deduce that the configuration of infinitely near points to Si belonging to E∞ (X ) is an infinite chain whose proximity graph is Prox(δi /αi ). In fact, this chain is infinite because Condition (3) in Definition 4.1 implies the irrationality of δi /αi for all i ∈ {1, 2, . . . , r}.  We conclude this section by stating and proving the above used Lemma 4.7, which allows us to prove that, with the notation as in the proof of the above theorem, the surface V obtained by blowing-up the points in ∪ri=1 BP(Pi ) has no points in E∞ (X ) different from the Si ’s, 1 ≤ i ≤ r. The proof of Lemma 4.7 will require to use some objects of algebraic geometry which we briefly summarize for convenience of the reader. We will consider divisors on a surface W and the Nerón-Severi group of W , NS(W ), which is the group of numerical (equivalently, linear, in our case) equivalence classes [C] of divisors C on W . Recall that two divisors in W are linearly equivalent whenever its difference is principal [29]. One can transform this group into an R-linear space by using tensorial product, NS(W ) ⊗ R, and then the cone of curves of W is defined as nX o NE(W ) = ai [Ci ] | Ci is a reduced and irreducible curve of W , ai ∈ R and ai ≥ 0 . The topological closure of NE(W ) in NS(W ) ⊗ R, NE(W ), is the so-called closed cone of curves of W . Extremal rays of cones NE(X) of algebraic varieties X are crucial objects in the model minimal program in algebraic geometry [35, 31, 7]. Lemma 4.7. Keep the notation as in Theorem 4.6 and its proof. Let π : W → CP2 be the composition of the blowing-ups centered at the points of the dicritical configuration, D(XnB ), of the vector field of CP2 defined by Ω(β̄n ). Consider the set {Q1 , Q2 , . . . , Qr } of S maximal points of D(XnB ) and the union Γ = ri=1 ẼQi of the strict transforms on W of the exceptional divisors obtained by blowing-up the points Qi , 1 ≤ i ≤ r. Then, the singularities of the strict transform of XnB on W which belong to the excep- tional locus of π, but not to Γ, are simple and the local equation of XnB at any of them has the form at2 dt1 + bt1 dt2 , where a, b ∈ Q+ ∪ {0}, a + b 6= 0 and, t1 = 0 (respectively, t2 = 0) is the local equation, at the singularity, of the strict transform of an irreducible exceptional divisor (respectively, the line at infinity Z = 0). Proof. First of all notice that, by Proposition 3.3, the dicritical configuration of XnB and the base points configuration of PnB coincide; i.e., D(XnB ) = BP(PnB ). Let H be an arbitrary irreducible component of a curve of the pencil PnB , different from Z = 0, and denote by H̃ its strict transform on W . To prove the lemma, it is enough to show that, outside Γ, H̃ has no singularity on the exceptional locus of π. We can assume H 6= Ci for all i ∈ {1, 2, . . . , r} because π is a common resolution of the singularities at infinity of these curves (see [11, Lemma 1 (iii)] and [2, 34]). 16 A. FERRAGUT, C. GALINDO AND F. MONSERRAT Notice that the self-intersection of H̃ cannot be negative because, in this case, the class of H̃ in N S(W ) ⊗ R would generate an extremal ray of the closed cone of curves of W [32, Lemma 1.22], and this is not possible by [11, Theorem 3]. Hence, H̃ 2 ≥ 0. The pencil PnB defines a rational map CP2 · · · → CP1 , that is a morphism from an open set of CP2 to CP1 which cannot be extended to any larger open set. The elimination of its indeterminacies induces a morphism f : W → CP1 contracting to a point the strict transform of any curve in the pencil [6, Theorem II.7]. In particular, it contracts H̃. The morphism f is defined by global sections of the invertible sheaf [29] associated to the divisor D on W given by the strict transform of a general curve of the pencil PnB . Notice that D2 = 0 because the strict transforms on W of two different general curves of the pencil do not meet. Then, D · H̃ = 0 2 (and H̃ ≥ 0 by the previous paragraph). Hence H̃ must be linearly equivalent to D [6, Lemma III.9]. To conclude the proof, we take into account that the unique exceptional irreducible divisors which are not contracted by the morphism f are the irreducible components of Γ [11, Lemma 1 (iii)], and this implies that, if E is the strict transform of an irreducible exceptional divisor, then H̃ · E = D · E > 0 if and only if E is contained in Γ. This proves that H̃ can only have singularities on Γ and the lemma.  5. The algorithm In this last section we state the previously mentioned algorithm which computes a first integral of planar polynomial vector fields having a DPWAI first integral with generic exponents. Darboux  proved in [16] that if a polynomial vector field X of degree d has at least d+1 2 + 1 invariant algebraic curves, then it has a Darboux first integral, which can be computed using these invariant algebraic curves. This result was improved in [15] (see also [14]). Next we state the Darboux theorem. Theorem 5.1. Suppose that a polynomial differential system X as in (2) of degree d admits r irreducible invariant algebraic curves fi (x, y) = 0 with respective cofactor ki (x, y), 1 ≤ i ≤ r. Then: (a) There exist λi ∈ C, not all zero, such that r X λi ki (x, y) = 0 (11) i=1 if and only if the function H = f1λ1 · · · fpλr (12) is a first integral of the system X.  P r (b) If r = d+12 + 1, then there exist λi ∈ C, not all zero, such that λi ki (x, y) = 0. i=1 As a consequence of the above result, finding invariant algebraic curves is an important tool in the study of Darboux integrability; notice also that it is a very hard problem. ON THE COMPUTATION OF DARBOUX FIRST INTEGRALS 17 Next we present Theorem 5.2 which, together with some previous results, allows us to state our algorithm. This algorithm provides enough invariant curves to apply Theorem 5.1 and determine a Darboux first integral in case the input we supply is a polynomial vector field having a DPWAI first integral with generic exponents. The mentioned theorem will use a cluster (K, mK ) attached to any finite chain K of infinitely near points of CP2 . Recall that a configuration K = {Q1 , Q2 , . . . , Qs } is a chain if Qi , i > 1, belongs to the exceptional divisor created by Qi−1 . The sequence of positive integers mKP:= (mQ )Q∈K is defined as follows: mQ = 1 if Q is the maximal point of K and mQ = mR otherwise, where the sum is taken over the set of points R in K which are proximate to Q. Also, given an arbitrary configuration C and any point Q ∈ C, we shall denote by CQ the finite chain defined by those points R in C such that Q is infinitely near to R. Theorem 5.2. Let X be a projective vector field and α1 , α2 , . . . , αr real numbers as in Theorem 4.6. Keep the above notation and consider the clusters Ki := (Ci , mCi ), 1 ≤ i ≤ r, where Ci = {Li0 , Li1 , . . . , Li`i := Si } := CSi = BP(Pi ) ∪ {Si }. Set mCi = (mQ )Q∈Ci . Then the following equalities hold: Pi (i) [deg(Ci )]2 − `j=0 m2Lij = −1, and Pκi (ii) deg(Ci ) = j=0 mLij , where κi denotes the maximum index j such that the strict transform of the line at infinity passes through Lij . Moreover, Ci is the unique curve in the linear system LPκi mL (Ki ). j=1 ij Proof. Let U be the surface obtained after blowing-up the points in BP(Pi ). Consider the line at infinity L and two different general curves ∆1 and ∆2 of the pencil Pi . Then, their ˜ 1 and ∆ strict transforms on U , L̃, ∆ ˜ 2 , do not meet. Therefore ∆ ˜1 ·∆ ˜ 2 = 0 and ∆ ˜ 1 · L̃ = 0. Both equalities prove, respectively, the equalities (i) and (ii) after noticing that ∆˜ 1 and ˜ ∆2 are linearly equivalent to the strict transform of Ci . We conclude the proof by noticing that our last assertion follows from (i) and Bézout Theorem [6, I.9 (a)].  Now we present our algorithm which, applied to a polynomial vector field, computes candidates to be the polynomials f1 , f2 , . . . , fr appearing in a DPWAI first integral. The- orems 4.6 and 5.2 prove that when the input has a DPWAI first integral with generic exponents, the output will be the mentioned polynomials fi . We will need the following notation: given an arbitrary configuration P C we define, for each maximal point Q of C, the integer IQ (C) := dQ (C)2 − P ∈CQ m2P , where mCQ = P (mP )P ∈CQ and dQ (C) := mP , the sum being taken over the points P in CQ such that the strict transform of the line at infinity passes through P . Algorithm 5.3. • Input: An arbitrary polynomial vector field X. • Output: Either a finite set {fi (x, y)}ri=1 of polynomials in two variables which are candidates for applying Theorem 5.1 and obtaining a Darboux first integral, or 0. (1) Compute an homogeneous 1-form defining the complex projectivization X of X. (2) Compute the set Ω0 consisting of the points Q in the singular configuration S(X ) which are infinitely near to a point of the line at infinity. (3) Let Q1 , Q2 , . . . , Q` be the maximal points of Ω0 . For every i ∈ {1, 2, . . . , `} com- pute the maximal configuration Ωi of points P infinitely near to Qi satisfying the following conditions: 18 A. FERRAGUT, C. GALINDO AND F. MONSERRAT (a) P is free, (b) P ∈ E∞ (X ) (that is, P is a simple singularity of the strict transform of the vector field X whose associated quotient of eigenvalues is a positive irrational number), (c) IP (E∞ (X )) ≥ −1. If Ωi is empty for some i ∈ {1, 2, . . . , `}, then return 0. Else, define Ω := Ω0 ∪ Ω1 ∪ · · · ∪ Ω` and go to Step (4). (4) Let M = {S1 , S2 , . . . , Sr } be the set of maximal points of Ω. If ISi (E∞ (X )) 6= −1 for some i ∈ {1, 2, . . . , r} then return 0. Else go to Step (5). (5) If the linear systems LdSi (ΩSi , mΩSi ) have projective dimension 0 for all i ∈ {1, 2, . . . , r} (where dSi := dSi (E∞ (X )) ), then return {F1 (x, y, 1), F2 (x, y, 1), . . . , Fr (x, y, 1)}, Fi (X, Y, Z) being an homogeneous polynomial defining the unique curve in LdSi (ΩSi , mΩSi ). Else, return 0. Our procedure to decide about DPWAI integrability of a vector field X has two steps. First we run Algorithm 5.3 with input X and, when the output is not 0, we get r candidates to be invariant algebraic curves of X given by equations fi = 0, 1 ≤ i ≤ r. When these curves are invariant by X, we compute their cofactors p ∂f i ∂fi ∂x + q ∂y ki = , fi and then, we check whether there exist values λi ∈ R+ , 1 ≤ i ≤ r, satisfying Equality (11). Notice that we only need to solve a homogeneous linear system of equations and this linear system has d+1 2 equations, corresponding with the number of monomials of a polynomial of degree d − 1 in two variables, and r unknowns, say the λi ’s. If such values λi exist, then (12) is a first integral of the system X. When the input X has a DPWAI first integral with generic exponents, we also obtain its extended resolution of singularities over the line at infinity. Otherwise, X has not a DPWAI first integral with generic exponents, the output of Algorithm 5.3 could be 0 or some not necessarily invariant curves by X. However, the output of Algorithm 5.3 could also provide enough invariant curves and then, we would obtain a DPWAI first integral by means of Theorem 5.1. We conclude this paper with an example where we detail our procedure to determine a Darboux first integral of the mentioned class of polynomial vector fields. Example 5.4. Consider the polynomial vector field X = a(x, y)dx + b(x, y)dy, where √ √ √ √ a(x, y) = (3+4π)x6 y 2 +(3+ 2+4π)x7 +4πx3 y 3 +( 2+4π)x4 y−3x2 y 3 −(3+ 2)x3 y− 2y 2 and √ √ √ √ b(x, y) = 2 2x7 y +(1+2 2)x4 y 2 +x5 −(2 2+π)x3 y 2 −πx4 −(1+2 2+π)y 3 −(1+π)xy. ON THE COMPUTATION OF DARBOUX FIRST INTEGRALS 19 Algorithm 5.3 gives rise to a configuration of infinitely near points of CP2 , Ω = {Pi }18 i=1 , which has 3 maximal points: S1 = P9 , S2 = P13 and S3 = P18 . The proximity graph of the configuration is displayed in Figure 2. Moreover, the multi- plicity sequences are mΩS1 = (3, 1, 1, 1, 1, 1, 1, 1, 1), mΩS2 = (2, 1, 1, 1, 1, 1, 1), mΩS3 = (1, 1, 1, 1, 1) and, since the strict transforms of the line at infinity pass through P1 and P2 , dS1 = 4, dS2 = 3, dS3 = 2 and ISi = −1 for all i ∈ {1, 2, 3}. In addition the algorithm allows us to determine that Ldi (ΩSi , mΩSi ) = {Ci }, where C1 (respectively, C2 , C3 ) is the projective curve (having only one place at infinity) with equation X 4 − Y Z 3 = 0 (respectively, X 3 + Y Z 2 = 0, Y 2 + XZ = 0). In fact, Algorithm 5.3 returns the set {f1 , f2 , f3 }, where f1 (x, y) = x4 − y, f2 (x, y) = x3 + y and f3 (x, y) = y 2 + x. √ Now, applying Theorem 5.1, one obtains that f1π f2 f3 2 is a DPWAI first integral of X. s P9 = S1 @ @sP8 @sP7 @ sP13 = S2 @ @sP6 sP12 @@sP5 sP11 sP18 = S3 @sP4 @ sP10 sP17 @@ s sP16 sP2 sP15 P3 P1 s sP14 Figure 2. Proximity graph of the configuration obtained applying Algo- rithm 5.3. Finally, we notice that, with notations as in Theorem 4.6, √ √ δ1 = 4 + 8 2, δ2 = 6 2 + 4π and δ3 = 6 + 8π. Therefore, the proximity graph of the extended reduction of singularities over the line at infinity, E∞ (X ), is obtained from that in Figure 2 by adding three infinite chains J1 , J2 and J3 over S1 , S2 and S3 such that the proximity graph of J1 ∪ {S1 } (respectively,   √ 4+8 2 √ J2 ∪ {S2 }, J3 ∪ {S3 }) is Prox( π ) (respectively, Prox(6 2 + 4π), Prox 6+8π √ 2 ). To complete our example we show, in Figure 3, the bottom part of the proximity graph of the chain J1 ∪ {S1 }, without labels. A similar procedure provides the remaining chains. 20 A. FERRAGUT, C. GALINDO AND F. MONSERRAT .. s . s s s s s s s s s s s Figure 3. Proximity graph of the chain J1 ∪ {S1 } References [1] S. S. Abhyankar, Lectures on expansion techniques in Algebraic Geometry, Tata Institute of Funda- mental Research Lectures on Mathematics and Physics 57, Tata Institute of Fundamental Research, Bombay (1977). [2] S. S. Abhyankar and T. T. Moh, Newton-Puiseux expansion and generalized Tschirnhausen transfor- mation, J. Reine Angew. Math. 260 (1973), 47–83 and 261 (1973), 29–54. [3] S. S. Abhyankar and T. T. Moh, “On the semigroup of a meromorphic curve”, Proc. Int. Symp. Algebraic Geometry Kyoto (1977), 249–414. [4] M.J. Álvarez, A. Ferragut and X. Jarque, A survey on the blow-up technique, Int. J. Bifur. Chaos 21 (2011), 3103–3118. [5] L. Autonne, Sur la théorie des équations différentielles du premier ordre et du premier degré, J. Éc. Polytech. 61 (1891), 35–122; 62 (1892), 47–180. [6] A. Beauville, Complex algebraic surfaces, London Math. Soc. Student Texts 34, Cambridge University Press, 1996. [7] C. Birkar, et al. Existence of minimal models for varieties of log general type, J. Amer. Math. Soc. 23 (2010), 405–468. [8] A. Bostan et al., Efficient algorithms for computing rational first integrals and Darboux polynomials of planar polynomial vector fields, Math. Comp. 85 (2016), 1393–1425. [9] M. Brunella, Birational Geometry of Foliations, Springer, 2000. [10] A. Campillo, O. Piltant and A.J. Reguera, Cones of curves and of line-bundles on surfaces associated with curves having one place at infinity, Proc. London Math. Soc. 84 (2002), 559–580. [11] A. Campillo, O. Piltant and A.J. Reguera, Cones of curves and of line bundles “at infinity” J. Algebra 293 (2005), 513–542. [12] E. Casas-Alvero, Singularities of plane curves, London Math. Soc. Lect. Notes Series 276 (2000), Cambridge University Press. [13] D. Cerveau and A. Lins-Neto, Holomorphic foliations in CP(2) having an invariant algebraic curve, Ann. Inst. Fourier 41 (4) (1991), 883–903. [14] G. Chèze, Darboux theory of integrability in the sparse case, J. Diff. Eq. 257 (2014), 601–609. [15] C. Christopher and J. Llibre, Integrability via invariant algebraic curves for planar polynomial differ- ential systems, Ann. Diff. Eq. 16 (2000), 5–19. [16] G. Darboux, Mémoire sur les équations différentielles algébriques du premier ordre et du premier degré (Mélanges), Bull. Sci. Math. 32 (1878), 60–96; 123–144; 151–200. [17] F. Dumortier, Singularities of vector fields on the plane, J. Diff. Eq. 23 (1977), 53–106. ON THE COMPUTATION OF DARBOUX FIRST INTEGRALS 21 [18] F. Dumortier, J. Llibre and J.C. Artés. Qualitative theory of planar differential systems, UniversiText, Springer-Verlag, New York, 2006. [19] C. Favre and M. Jonsson, Eigenvaluations, Ann. Sci. Éc. Norm. Sup. 40 (2007), 309–349. [20] C. Favre and M. Jonsson, Dynamical compactifications of C2 , Ann. Math. 173 (2011), 211–248. [21] A. Ferragut, Some new results on Darboux integrable differential systems, J. Math. Anal. Appl. 394 (2012), 416–424. [22] A. Ferragut, C. Galindo and F. Monserrat, A class of polynomial planar vector fields with polynomial first integral, J. Math. Anal. Appl. 430 (2015), 354–380. [23] A. Ferragut and H. Giacomini, A new algorithm for finding rational first integrals of polynomial vector fields, Qual. Th. Dyn. Syst. 9 (2010), 89–99. [24] C. Galindo and F. Monserrat, The Abhyankar-Moh theorem for plane valuations at infinity, J. Algebra 374 (2013), 3181–194. [25] C. Galindo and F. Monserrat, The Poincaré problem, algebraic integrability and dicritical divisors, J. Diff. Eq. 256 (2014), 3614–3633. [26] C. Galindo and F. Monserrat, The cone of curves and the Cox ring of rational surfaces given by divisorial valuations, Adv. Math. 290 (2016), 1040-1061. [27] C. Galindo, F. Monserrat and J.J. Moyano-Fernández, Minimal plane valuations, J. Alg. Geom. 27 (2018), 751–783. [28] A. Garcı́a Zamora, Foliations in algebraic surfaces having a rational first integral, Publ. Mat. 41 (1997), 357–373. [29] R. Hartshorne, Algebraic Geometry, Springer-Verlag, 1977. [30] J.P. Jouanolou, Equations de Pfaff algébriques, Lect. Notes Math. 708, Springer-Verlag, 1979. [31] Y. Kawamata, The cone of curves of algebraic varieties, Ann. Math. 119 (1984), 603–633. [32] J. Kollár and S. Mori, Birational geometry of rational varieties, Cambridge Tracts in Math. 134, Cambridge University Press, 1998. [33] J. Llibre and C. Pantazi, Polynomial differential systems having a given Darbouxian first integral, Bull. Sci. Math. 128 (2004), 775–788. [34] T.T. Moh, On analytic irreducibility at infinity of a pencil of curves, Proc. Amer. Math. Soc. 44 (1974), 22–23. [35] S. Mori, Threefolds whose canonical bundles are not numerically effective, Ann. Math. 116 (1982), 133–176. [36] P. Mondal, How to determine the sign of valuation on C[x, y], Michigan Math. J. 66 (2017), 227-244. [37] P. Painlevé, “Sur les intégrales algébriques des équations différentielles du premier ordre” and “Mémoire sur les équations différentielles du premier ordre” in Ouvres de Paul Painlevé, Tome II, Éditions du Centre National de la Recherche Scientifique 15, quai Anatole-France, Paris 1974. [38] H. Poincaré, Mémoire sur les courbes définies par les équations différentielles, J. Math. Pures Appl. 3 (7) (1881), 375—442; 3 (8) (1882), 251—296; 4 (1) (1885), 167—244; in Oeuvres de Henri Poincaré, vol. I, Gauthier-Villars, Paris 1951, 3–84, 95–114. [39] H. Poincaré, Sur l’intégration algébrique des équations différentielles du premier ordre et du premier degré (I), Rend. Circ. Mat. Palermo 5 (1891), 161–191; (II) 11 (1897), 193–239. [40] A. Seidenberg, Reduction of singularities of the differentiable equation Ady = Bdx, Amer. J. Math. 90 (1968), 248–269. [41] J. Xie, Intersections of valuation rings in k[x, y], Proc. London Math. Soc. 111 (2015), 240-274. A. Ferragut and C. Galindo: Institut Universitari de Matemàtiques i Aplicacions de Castelló (IMAC) and Departament de Matemàtiques, Universitat Jaume I, Edifici TI (ESTCE), Av. de Vicent Sos Baynat, s/n, Campus del Riu Sec, 12071 Castelló de la Plana, Spain E-mail address: ferragut@uji.es, galindo@uji.es F. Monserrat: E.T.S. d’Informàtica Aplicada, Universitat Politècnica de València, Camı́ de Vera, s/n, 46002 València, Spain E-mail address: framonde@mat.upv.es