This is a preprint of: “On the polynomial solutions of the polynomial differential equations yy 0 = a0 (x) + a1 (x)y + a2 (x)y 2 + ... + an (x)y n ”, Antoni Ferragut, Jaume Llibre, Indian J. Pure Appl. Math., vol. 51, 217–232, 2020. DOI: [10.1007/s13226-020-0396-6] ON THE POLYNOMIAL SOLUTIONS OF THE POLYNOMIAL DIFFERENTIAL EQUATIONS y y 0 = a0 (x) + a1 (x) y + a2 (x) y 2 + . . . + an (x) y n ANTONI FERRAGUT1 AND JAUME LLIBRE2 Abstract. In this paper we deal with differential equations of the form yy 0 = P (x, y) where y 0 = dy/dx and P (x, y) is a polynomial in the variables x and y of degree n in the variable y. We provide the maximum number of polynomial solutions of this class of differential equations, and for some particular classes we study properties of their polynomial solutions. 1. Introduction and statement of the main results The study of given solutions (as polynomial or rational solutions) of differential equations is of main interest for understanding the set of solutions of a differential equation. Rainville [14] in 1936 characterized all the Riccati differential equations of the form y 0 = a0 (x) + a1 (x)y + y 2 , where a0 and a1 are polynomials in x, having polynomial solutions. He also gave an algebraic method for studying these polynomial solutions. In 1954 Campbell and Golomb [6] gave an algorithm for computing all the polynomial solutions of the differential equation a(x)y 0 = a0 (x) + a1 (x)y + a2 (x)y 2 , where a, a0 , a1 , a2 are polynomials in x. In 2006 Behloul and Cheng [2] P provided another algorithm for finding all the rational solutions of the equation a(x)y 0 = ni=0 ai (x)y i , where a, ai are polynomials in x. The differential equations y 0 = a0 (x)+a1 (x)y +a2 (x)y 2 +a3 (x)y 3 are the Abel differential equations, which have been studied widely, either computing their periodic orbits (see for instance [8, 11]), or studying their centers (see [3, 4, 5]). More recently Pn in [9] the authors 0 studied the polynomial solutions of the differential equation y = i=0 ai (x)y i . Also polynomial solutions of non-autonomous differential equations, or polynomial solu- tions of matrix differential equations have been studied, see for instance the articles [15] or [1] respectively, and the references quoted therein. The Riccati-Abel equation (a(x) + y(x))y 0 (x) = a0 (x) + a1 (x) y + a2 (x) y 2 is studied in [16]. Moreover, in [10] (p. 28) the differential equation (a(x) + b(x)y(x))y 0 (x) = a0 (x) + a1 (x) y + a2 (x) y 2 + a3 (x) y 3 is considered. We deal in this paper with the generalization to degree n of these two equations with the restrictions a(x) ≡ 0 and b(x) ≡ 1. Indeed, we consider ordinary differential equations of the form dy y = a0 (x) + a1 (x) y + a2 (x) y 2 + . . . + an (x) y n , (1) dx where x and y are complex variables, ai (x) are polynomials in C[x] for i = 0, 1, 2, . . . , n and an (x) 6≡ 0, with n a nonnegative integer. We denote the derivative of y with respect to x by dy/dx or y 0 . We assume that a0 6≡ 0, otherwise this differential equation becomes the one studied in [9]. We note that while the solutions of linear differential equations with constant coefficients admit relatively easily methods for solving them see for instance [12, 13], the solutions of nonlinear equations as equations (1) require special investigations. 2010 Mathematics Subject Classification. 34A05, 34A34, 34C05. http://www.gsd.uab.cat Key words and phrases. polynomial differential equation, polynomial solution, linear differential equation, Riccati differential equation, Abel differential equation. 1 2 A. FERRAGUT AND J. LLIBRE Differential equation (1) can be also written as the planar polynomial differential system ẋ = y, ẏ = a0 (x) + a1 (x) y + a2 (x) y 2 + . . . + an (x) y n , (2) where the dot denotes derivative with respect to an independent variable t. We are interested in the polynomial solutions y = p(x) of the differential equation (1), i.e. the solutions y = p(x) of (1) where p(x) ∈ C[x]. Notice that we can also consider the algebraic curves p(x) − y = 0 as invariant solutions of system (2). Let N = max{2, n}. Our four main results are the following. Theorem 1. The differential equation (1) has at most N 2deg a0 polynomials solutions, and this bound is sharp. The next two results concern special families of differential equations (1). Theorem 2. If the differential equation (1), with n ≥ 2 and ai (x) ≡ 0 for all i = 1, . . . , n − 1, has more than one polynomial solution, then either it has exactly n solutions, all constant, or it has exactly two polynomial solutions y = ±p(x), for some polynomial p(x) ∈ C[x]. Theorem 3. If the differential equation (1), with n even and a2i−1 (x) ≡ 0 for i = 1, . . . , n/2, with a2i (x) 6≡ 0 for some i, has more than one polynomial solution, then it has exactly two polynomial solutions y = ±p(x), for some polynomial p(x) ∈ C[x]. The next theorem deals with the differential equation (1) for several small values of n. Theorem 4. Consider the differential equation (1). Then the following statements hold. (a) If n = 0, then either equation (1) has no polynomial solutions, or it has two non- constant polynomial solutions of the form y = ±p(x), p(x) ∈ C[x]. (b) If n = 1, then two polynomial solutions y = pi (x), i = 0, 1, of (1) always have a non-constant common factor. Moreover every factor of p0 (x) − p1 (x) divides both p0 (x) and p1 (x). (c) If n = 2 and there exist three polynomial solutions y = pi (x), i = 0, 1, 2, then pi (x)/pj (x) is not a constant function, for i 6= j. (d) If n = 3 and there exist four polynomial solutions y = pi (x), i = 0, 1, 2, 3, then pi (x)/pj (x) is not a constant function, for i 6= j. Moreover, if y = p(x) is a polynomial solution of (1), then a0 (x)/p(x) is a polynomial solution of the Abel differential equation a0 y 0 = −a20 a3 + (a00 − a0 a2 )y − a1 y 2 − y 3 . The paper is organized as follows. In section 2 we prove Theorem 1. Theorem 2 is proved in section 3. Section 4 is devoted to the proof of Theorem 3. Finally in section 5 we prove Theorem 4. We must mention that all the algebraic computations that appear in this paper have been done with the help of the algebraic manipulator Mathematica. 2. An upper bound for the number of polynomial solutions of (1) The following lemma, despite that it has a trivial proof, provides important information on the polynomial solutions of the differential equation (1). Lemma 5. If y = p(x) is a polynomial solution of the differential equation (1), then p(x)|a0 (x). The next lemma is a key-point in the proof of Theorem 1. Lemma 6. If y = p(x) is a polynomial solution of (1), then there exist at most N complex solutions of (1) of the form y = κp(x), with κ ∈ C. POLYNOMIAL SOLUTIONS OF A DIFFERENTIAL EQUATION 3 Proof. Let y = p(x) be a polynomial solution of (1). Suppose that y = κp(x), with κ ∈ C \ {0, 1}, is another polynomial solution of (1). Then n X n X κ2 ai (x)p(x)i = κ2 p(x)p0 (x) = κi ai (x)p(x)i . i=0 i=0 Here the first equality holds because y = p(x) is a solution of (1) and the second one because y = κp(x) also is a solution. Hence we get n X (κi − κ2 )ai (x)p(x)i = 0. (3) i=0 This is a polynomial equation of degree exactly N in the variable κ for all x fixed, except perhaps for a finite number of values. Therefore this equation, for almost all fixed x, has exactly N complex solutions for κ, and of course this set of solutions includes κ = 1.  Next we provide some definitions concerning integrability. They will be used later no. If ẋ = P (x, y), ẏ = Q(x, y) is a differential system, a non-constant C 1 -function H(x, y) is a first integral of this system if it is constant on the solutions of the system; i.e., if it satisfies the equation ∂H ∂H P (x, y) + Q(x, y) = 0. (4) ∂x ∂y An algebraic curve f = 0 is invariant under the flow of the differential system ẋ = P (x, y), ẏ = Q(x, y) if there exists a polynomial k ∈ C[x, y], called the cofactor, such that ∂f ∂f P (x, y) + Q(x, y) = kf. ∂x ∂y The Darboux Theory of Integrability relates the number of invariant algebraic curves of a differential system with the existence of a (Darboux) first integral, see [7]. The key point in the existence of such a Darboux first integral is whether a linear combination of the cofactors of such curves is identically zero. Example 1. Consider the following differential equation (1) with n = 1: yy 0 = −2x(2x2 − 1) + 6xy. (5) 2 2 This equation √ has√ four polynomial solutions given by p0 (x) = x − 1/2, p1 (x) = 2x − 1 and y(x) = 2x( 2x ± 1). Notice that all of them divide a0 and have common factors. Moreover, we have p1 (x) = 2p0 (x), hence equation (3) in this case and for p(x) = p0 (x) has the maximum number of solutions κ, which is N = max{1, 2} = 2. Finally we note that the differential system associated to the differential equation (5) has the rational first integral (y − 2p0 (x))2 H(x, y) = , y − p0 (x) as is easy to check using (4).  Proof of Theorem 1. We recall from Lemma 5 that a polynomial solution y = p(x) must divide a0 (x). This means that, up to a multiplicative constant, we can obtain at most 2deg a0 different polynomial solutions of (1). Now from Lemma 6 the first part of the theorem follows. Q The differential equation yy 0 = ni=1 (y − ci ), with n ≥ 2 and ci 6= 0 for all i, has n polynomial solutions given by y = pi (x) = ci , i = 1, . . . , n. This is an example where the upper bound given by Theorem 1 is sharp, since it is N 2deg a0 = n · 20 = n. This completes the proof of the theorem.  4 A. FERRAGUT AND J. LLIBRE 3. Proof of Theorem 2 We consider in this section the subfamily of (1) given by the differential equation dy y = a0 (x) + an (x) y n . (6) dx The case n = 1 will be studied in section 5. We assume here that n ≥ 2. Proof of Theorem 2. Suppose that the differential equation (6) has two polynomial solu- tions y = p(x) and y = q(x) such that p(x)n 6≡ q(x)n . Substituting p(x) and q(x) into (6) we obtain two linear equations with unknowns a0 (x), an (x), from which p(x)n q(x)q 0 (x) − q(x)n p(x)p0 (x) p(x)p0 (x) − q(x)q 0 (x) a0 (x) = , an (x) = . p(x)n − q(x)n p(x)n − q(x)n Note that, since n ≥ 2, an (x) is not a polynomial, which is a contradiction. Hence this situation cannot happen. Therefore we must have p(x)n ≡ q(x)n . Then pp0 − a0 qq 0 − a0 = pn = q n = . an an Hence pp0 = qq 0 . We distinguish two cases. If p0 = q 0 = 0 then p and q are constant, and therefore a0 pn = q n = − an is a constant, meaning that we have n constant solutions given by r a0 y= n − . an If p0 , q 0 6= 0 then integrating pp0 = qq 0 we have p2 = q 2 and hence p = ±q.  Example 2. The differential equation yy 0 = x(1 − x)(3x − 4) + (3x − 1)y has the polynomial solutions y = ±(x − 1).  Example 3. The differential equation yy 0 = 1 − y 4 has four constant solutions: the fourth roots of unity.  4. Proof of Theorem 3 We consider in this section the subfamily of (1) given by the differential equation X m dy y = a2i (x)y 2i , (7) dx i=0 with m = n/2 ∈ N, with a0 , a2j , a2m 6≡ 0, for some 0 < j < m. Set z = y 2 /2. Then z 0 = yy 0 , and hence the differential equation (7) can be written, in terms of z, as Xm dz = b2i (x)z i , (8) dx i=0 where b2i = 2i a 2i . The following result appears in [9]. Theorem 7. The differential equation (8) has at most m polynomial solutions. The dif- ference between two such polynomial solutions is a constant. POLYNOMIAL SOLUTIONS OF A DIFFERENTIAL EQUATION 5 p Proof of Theorem 3. Let z = r(x)/2 be a solution of (8). Then y = ± r(x) are two solutions of (7). They are polynomial if and only if r(x) is a perfect square; that is, if there exists p(x) ∈ C[x] such that r(x) = p(x)2 . In such a case, y = ±p(x) are two polynomial solutions of (7). From Theorem 7, this implies that we have at most n = 2m polynomial solutions for (7). Now suppose that indeed r(x) = p(x)2 is a perfect square. Suppose also that z = s(x)/2 is another polynomial solution of (8). Again from Theorem 7, we know that p there exists a 2 non-zero constant C such that s(x) = p(x) + C, for all x. Hence y = ± p(x)2 + C are two solutions of (7). If s(x) is a perfect square, that is s(x) = q(x)2 , then from the proof of Proposition 8 and from q(x)2 − p(x)2 = C we get that C = 0, and therefore r(x) = s(x). Thus only two polynomial solutions can exist for the differential equation (7), which are y = ±p(x), and the theorem follows.  5. Proof of Theorem 4 5.1. The differential equation (1) with n = 0. The following proposition proves state- ment (a) of Theorem 4. Proposition 8. The differential equation (1) with n = 0, dy y= a0 (x), (9) dx has either zero or two distinct polynomial solutions. They have the form y = ±p(x), p(x) ∈ C[x]. Proof. Equation (9) can be directly solved, providing the solutions s Z y(x) = ± K + 2 a0 (x) dx, where K is an arbitrary constant. Now we must prove that, if there exists K ∈ C such that y = p(x) is a polynomial solution, then this K is unique and y = −p(x) is another polynomial solution. Indeed, if y = q(x) is a solution of (9) different from y = p(x), then p2 − q 2 is a constant. We need to prove that this constant is zero, and hence q(x) = −p(x). P P i Let p(x) = pi xi and q(x) = qi x . It is clear that deg p = deg q. Let m ∈ N be this degree. Thus p2 − q 2 = (p2m − qm 2 )x2m + 2(pm pm−1 − qm qm−1 )x2m−1 + (p2m−1 − qm−1 2 + 2(pm pm−2 − qm qm−2 ))x2m−2 + · · · . Since p2 −q 2 is a constant, all the monomials of the previous polynomial except the constant one must be zero. In particular, p2m = qm 2 . If p m = qm 6= 0, then from the monomial of x 2m−1 we have pm−1 = qm−1 . Otherwise pm = −qm 6= 0 and then pm−1 = −qm−1 . From the next monomial, x2m−2 , we get either pm−2 = qm−2 (in case pm = qm ), or pm−2 = −qm−2 (in case pm = −qm ). We can continue this argument by using the induction principle to have either pi = qi or pi = −qi , for all i = m, . . . , 0 from the monomials from x2m to xm : the coefficient of the monomial xm+i is the sum of non-zero multiples of the expressions pm pi − qm qi and pj pk − qj qk , with j + k = m + i, i < j, k < m. Since pj pk = qj qk , we have pm pi = qm qi . So again if pm = qm 6= 0, then pi = qi , and if pm = −qm 6= 0 then pi = −qi . Hence we obtain either p(x) = q(x) or p(x) = −q(x), and the proposition follows.  Example 4. The only polynomial solutions y = p(x) of the differential equation (9) with a0 (x) = 2(x − 1)(x + 1)(x − 3) are y(x) = ±(x − 3)(x + 1).  6 A. FERRAGUT AND J. LLIBRE 5.2. The differential equation (1) with n = 1. We recall that a polynomial is square-free if it has no multiple factors in this factorization. Proposition 9. Consider the differential equation (1) with n = 1: dy y = a0 (x) + a1 (x)y. (10) dx Then two polynomial solutions of (10) have a square-free common factor. Proof. Let y = p(x) a polynomial solution of (10). Then, by Lemma 5, p(x)|a0 (x), that is a0 (x) = p(x)ã0 (x), for some ã0 (x) ∈ C[x]. Hence p(x) satisfies p0 (x) = ã0 (x) + a1 (x). Then a1 (x) = p0 (x) − ã0 (x). Substituting the expressions of a0 (x) and a1 (x) into (10), we have dy y = p(x)ã0 (x) + (p0 (x) − ã0 (x))y. dx Let y = q(x) be another solution of (10). Then q(x)q 0 (x) = p(x)ã0 (x) + (p0 (x) − ã0 (x))q(x), and consequently p0 (x) − q 0 (x) ã0 (x) = −q(x) . p(x) − q(x) This must be a non-zero polynomial. Since deg(p − q) > deg(p0 − q 0 ), the polynomials q and p − q have a square-free common factor dividing also p. Therefore the proposition follows.  We prove that the existence of n + 1 solutions determines completely the differential equation (1). We shall use this result later on. Proposition 10. Let y = pi (x), for i = 0, . . . , n, be n + 1 distinct C 1 -solutions of the differential equation (1). Then, for all i ∈ {0, . . . , n}, ai (x) can be written as a function of p0 (x), . . . , pn (x) and their first derivatives. Proof. For j = 0, . . . , n, since y = pj (x) is a solution of (1), we have n X pj (x)p0j (x) = ai (x)pj (x)i . i=0 These n + 1 equations can be written altogether as a linear system of equations with unknowns the ai :      1 p0 p20 · · · pn0 a0 p0 p00  1 p1 p2 · · · pn1  a1   p1 p01   1      .. .. .. . . ..  .. = .. . (11)  . . . . .  .   .  1 pn p2n · · · pnn an pn p0n The square matrix has non-zero determinant, since it is a Vandermonde matrix. Then there exist unique a0 , . . . , an that satisfy this linear system. In particular, the solutions ai depend on the pj ’s and their first derivatives.  Remark 1. When the pi ’s are polynomials, Q the linear system (11) provides rational solu- tions a0 , . . . , an with denominator 0≤i (deg a0 + 1)/2, then deg a1 = deg p − 1. 5.3. The differential equation (1) with n = 2. When n = 2, the proof of Proposition 10 gives   p0 p1 p2 p00 (p1 − p2 ) + p01 (p2 − p0 ) + p02 (p0 − p1 ) a0 (x) = Q , i