This is a preprint of: “Solving polynomials with ordinary differential equations”, Armengol Gasull, Hector Giacomini, Exposition. Math., vol. 39, 624–643, 2021. DOI: [10.1016/j.exmath.2021.06.0010] SOLVING POLYNOMIALS WITH ORDINARY DIFFERENTIAL EQUATIONS ARMENGOL GASULL AND HECTOR GIACOMINI Abstract. In this work we consider a given root of a family of n-degree polyno- mials as a one-variable function that depends only on the independent term. Then we prove that this function satisfies several ordinary differential equations (ODE). More concretely, it satisfies several simple separated variables ODE, a first order generalized Abel ODE of degree n − 1 and an (n − 1)-th order linear ODE. Alt- hough some of our results are not new, our approach is simple and self-contained. For n = 2, 3 and 4 we recover, from these ODE, the classical formulas for solving these polynomials. 1. Introduction and main results It is known that although general polynomial equations of degree n ≥ 5 can not be solved by radicals, their roots can be obtained in terms of elliptic or hyperelliptic functions, their inverses or other trascendental functions, like hypergeometric or theta functions. This is a classical subject which starts with results of Hermite, Kronecker and Brioschi and continues with contributions of many others authors, see for instance [1, 7, 9, 12] and the references therein. We will not try to survey all the different points of view from which the question of solving polynomials is addressed. Because we usually work on ordinary differential equations (ODE) we simply decided to explore which kind of results about polynomial equations can be obtained by using ODE as a main tool. As we will see, our results are self-contained and recover some of the known results on the subject. Before we state our contributions and compare them with these known results, we present a brief survey of the most relevant results that we have found on this subject that also use ODE as a main tool. To the best of our knowledge this approach started with the contributions of Betti ([2]) in 1854 and the ones around 1860 of Cockle and Hartley ([4, 10]). In fact, Enrico Betti proved that the solutions of general polynomial equations satisfy a separated variables ODE and using this fact that he proved that the solutions of these equations can be obtained in terms of hyperelliptic functions and their inverses. He also proved that for quintic equations it suffices to consider elliptic functions and their inverses. On the other hand, James Cockle and Robert Harley showed explicit linear ODE satisfied for a solution of an arbitrary trinomial polynomial equation in terms of its coefficients. For instance, they found a linear homogeneous ODE of 4-th order for a solution x(q) of the quintic polynomial equation in the Bring-Jerrard form x5 − x + q = 0. These results are presented and extended a litle in the 1865 Boole’s book [3, pp. 190–199]. In his Thesis (“première thèse”), published as a book 2010 Mathematics Subject Classification. Primary: 26C05; Secondary: 12D10; 12E12; 13P15; 33C75; 33E05. Key words and phrases. Polynomial equation; Ordinary differential equation; Abel equations; Elliptic and hyperelliptic integrals. 1 2 A. GASULL AND H. GIACOMINI in 1874 and as an article in 1875 ([14]), Tannery consider a more general question and proved that each branch y = y(x) of an algebraic curve F (x, y) = 0, of degree n in y satisfies an n-th order linear homogeneous ODE. In 1887, Heymann ([8]) showed that a solution of a trinomial equation with only one parameter satisfies a linear ODE and realizes for the first time that this solution can be expressed as a hypergeometric function. Mellin ([11]) around 1915 published the quoted paper and others about the representation of the solutions of polynomial equations in terms of multiple integrals, proving again that the solution of a trinomial equations satisfy a linear ODE. Owing to the complexity of explicitly constructing these ODE for non-trinomial polynomial equations, some authors decided to use also functions of several variables, and their corresponding partial differential equations, to express the roots of arbitrary polynomial equations. Bellardinelli, in his extensive review work of 1960 ([1]) presents this type of results and discuss also the previous works about ODE. We want to stress that results like the one of Tannery have practical applicati- ons when people deal with some generating functions appearing in combinatorial problems, see for instance the nice paper of Comtet([5]) and his classical book on Combinatorics ([6]). There, the author gives also a proof that the branches of alge- braic curves satisfy linear ODE and several applications of this fact. In a few words, in this paper we will recover with independent proofs some of the above results and give a few new ones. More concretely, we will re-obtain the results of Betti as a particular case of our more general result and we will give a simple and constructive procedure to obtain non homogeneous (n−1)-order linear ODE satisfied by the solutions of general polynomial equations of degree n. During the way, we prove that these solutions satisfy also Abel type polynomial differential equations of degree n − 1. We also apply all our results for small n and to some particular examples. It is funny to observe for instance that we obtain the celebrated Cardano’s formula for n = 3, by reducing the computations to solve the simple second order ODE of the harmonic oscillator x00 = −x. Before stating our main results, we start giving an idea of our approach to the problem. In principle, we do not consider all real polynomials, but generic ones. Let R(x) be a monic degree n real polynomial satisfying R(0) = 0 and R0 (0) 6= 0. We are interested in the degree n polynomial equation P (x) = R(x) − q = 0, (1) q ∈ R, and more in particular, in finding a local explicit expression of the analytic solution x(q) of (1) such that limq→0 x(q) = 0, which exists and is unique by the implicit function theorem because R0 (0) 6= 0. Let F be any invertible diffeomorphism such that F (0) = 0. Then, from (1) we have the locally equivalent equation F (R(x)) = F (q). We know that F (R(x(q))) = F (q). By derivating it with respect to q, and multiplying both sides by G(R(x(q)) = G(q), with G an arbitrary continuous function, we obtain an ODE with separated variables for x(q) G(R(x(q))F 0 (R(x(q)))R0 (x(q))x0 (q) = G(q)F 0 (q), with initial condition x(0) = 0. It can be easily solved giving rise to Z x Z q 0 0 φ(x) := G(R(s))F (R(s))R (s) ds = G(t)F 0 (t) dt =: ϕ(q). (2) 0 0 SOLVING POLYNOMIALS WITH ODE 3 Hopefully, this new equation φ(x) = ϕ(q), which is equivalent to R(x) = q, allows to obtain x = φ−1 (ϕ(q)) being φ−1 ◦ ϕ an explicit computable function that it is not trivially equivalent to x = R−1 (q). A key point is to chose a suitable F that provides some cancellation in the expression F 0 (R(x))R0 (x). As we will see, this wished cancellation can be obtained from the next proposition, where disx (P (x)) denotes the discriminant of P (x) with respect to x. Recall that if Pn (x) = an xn + · · · + a1 + a0 , an 6= 0, n(n−1) (−1) 2 disx (P (x)) = Resx (Pn (x), Pn0 (x)), an where Resx (Pn (x), Qm (x)) is the resultant between Pn and Qm and can be computed as the n + m determinant an an−1 an−2 · · · a1 a0 0 0 0 0 an an−1 an−2 · · · a1 a0 0 0 .. .. .. .. .. 0 0 . . . ··· . . 0 0 0 0 an an−1 an−2 . . . a1 a0 Resx (Pn (x), Qn (x)) = bm bm−1 · · · b1 b0 0 0 0 0 0 bm bm−1 ··· b1 b0 0 0 0 .. .. .. .. .. 0 0 . . ... . . . 0 0 0 0 bm bm−1 . . . b1 b0 0 0 0 0 0 bm bm−1 . . . b1 b0 where Qm (x) = bm xm + · · · + b1 x + b0 , bm 6= 0. It turns out that Pn and Qm share some (real or complex) root if and only if this determinant vanishes. Hence Pn has some multiple root if and only if its discriminant vanishes, see [13]. Proposition 1.1. Let P (x) = R(x) − q be a real polynomial of degree n ≥ 2, with R(0) = 0 and q ∈ R. Set D(q) = disx (P (x)). Then D(R(x)) = (R0 (x))2 U (x) = (P 0 (x))2 U (x), (3) for some polynomial U of degree (n − 1)(n − 2). Moreover, if all the roots of R are simple, U (0) 6= 0. Next theorem is our first main result and proves that a root of a generic polynomial equations P (x) = R(x)−q = 0, for q in a neighborhood of 0, can be obtained in terms of hyperelliptic functions and their inverses. As we will comment in Remark 2.1, the restriction that all the roots of R are simple can be removed obtaining a similar result. As we have commented, this result is similar, but more general, to the one given by Betti. Theorem 1.2. Let P (x) = R(x) − q be a real polynomial of degree n ≥ 2, with R(0) = 0 and q ∈ R. Set D(q) = disx (P (x)) and assume that all the roots of R are simple. Define the polynomials D(q) = sgn(D(0))D(q) and U(x) = D(R(x))/(R0 (x))2 , and the functions Z x Z q 0 G(R(s)) G(t) φ(x) = sgn(R (0)) p ds and ϕ(q) = p dt, (4) 0 U(s) 0 D(t) where G is any continuous function satisfying G(0) 6= 0. Then, in a neighborhood of 0, φ is invertible and x = φ−1 (ϕ(q)) 4 A. GASULL AND H. GIACOMINI is a root of P (x) = 0 that goes to 0 as q tends to 0. In particular, if G is polynomial, φ and ϕ are elliptic or hyperelliptic integrals. As an illustration, we apply our results to the low degree cases. In particular, when n = 2 and n = 3 we reobtain the Babylonian and Cardano’s formulas, see Sections 2.1 and 2.2, respectively. In Section 2.3 we apply them to the quartic case. Finally, in Section 2.4 we reproduce the results of Betti’s work for quintic equations with our point of view. To state our second main result we recall some definitions. Given 0 < m ∈ N we will say that a non autonomous first order real ODE of the from x0 = am (q)xm + am−1 (q)xm−1 + · · · + a2 (q)x2 + a1 (q)x + a0 (q) (5) is a generalized Abel ODE of degree m. Notice that for m = 1, 2 and 3 these equations are usually called linear, Riccati and Abel ODE, respectively. All of them are a subject of classical interest in mathematics. By using Corollary 2.3, we prove: Theorem 1.3. Let P (x) = R(x) − q be a real polynomial of degree n ≥ 2, with R(0) = 0 and q ∈ R. Let x(q) be one of the roots of this equation, defined in a neighborhood of 0, that tends to zero as q tends to 0. Then x(q) satisfies a generalized Abel ODE (5) of degree m = n − 1, where aj (q), j = 0, 1, . . . , n − 1 are rational functions with coefficients depending on the coefficients of R. A straightforward consequence of this result is the following corollary. Corollary 1.4. Let P (x) = R(x)−q be a real quadratic, cubic or quartic polynomial equation with R(0) = 0. Let x(q) be one of the roots of this equation, defined in a neighborhood of 0, that tends to zero as q tends to 0. Then x(q) satisfies, respectively, a linear, Riccati or Abel ODE whose coefficients are rational functions in q. The proof of the above results, together with the explicit ODE when n ∈ {2, 3, 4} and P has the canonical form P (x) = xn + px − q are given in Section 3. A second consequence of the above results is: Theorem 1.5. Let P (x) = R(x) − q be a real polynomial of degree n ≥ 2, with R(0) = 0 and q ∈ R. Let x(q) be one of the roots of this equation, defined in a neighborhood of 0, that tends to zero as q tends to 0. Then x = x(q) satisfies a (n − 1)-th order linear ODE, bn−1 (q)x(n−1) + bn−2 (q)x(n−2) + · · · + b1 (q)x0 + b0 (q)x + bn (q) = 0, where the functions bj (q) are polynomials in q, with coefficients depending on the coefficients of R. Our proof provides a constructive algorithm to obtain all the functions bj . As we will see in Section 4, when the equation P (x) = 0 is the the trinomial one, P (x) = xn + px − q = 0, these bj are extremely simple. We obtain them for n ≤ 6. We also recover again Cardano’s formula by showing that for n = 3, and with suitable changes of variables, this differential equation can be written as the equation for the harmonic oscillator. For n = 4 in Section 4.1 we present three different expressions of its solution x(q), two of them in terms of hypergeometric functions, and also the classical one. Finally, in a short Appendix, we present some classical ways to solve the cubic and the quartic equations. This is done, not only for completeness, but for obtaining SOLVING POLYNOMIALS WITH ODE 5 a simple and suitable way (for our interests) of presenting the solution of the quartic equation. 2. Proof of Theorem 1.2 and some applications We start proving Proposition 1.1. Proof of Proposition 1.1. The polynomial P 0 = R0 has degree n − 1. We give the proof when all its roots in C, α1 , α2 , . . . , αn−1 , are different and moreover R(αj ) 6= R(αk ) unless j = k. The general result follows from this generic case. Consider the system ( P (x) = R(x) − q = 0, (6) P 0 (x) = R0 (x) = 0. Recall, that modulus some non-zero constant, the discriminant between P and P 0 is the resultant. Hence, by the properties of the resultant we know that D(q) is a polynomial of degree n − 1 and moreover it vanishes for all values of q for which the above system is compatible. Thus, system (6) is compatible if and only if q = R(αj ), j = 1, 2, . . . , n − 1. Hence    D(q) = K q − R(α1 ) q − R(α2 ) · · · q − R(αn−1 ) , K 6= 0. Consider the new polynomial Q(x) = D(R(x)), of degree n(n − 1). It is clear that Q(αj ) = D(R(αj )) = 0. Moreover, Q0 (x) = D0 (R(x))R0 (x). Therefore, Q0 (αj ) = D0 (R(αj ))R0 (αj ) = 0. As a consequence, all αj are double roots of Q(x) and (3) holds. Finally, since D(0) = C Resx (R(x), R0 (x)), with C 6= 0, the hypothesis that all the roots of R are simple is equivalent to D(0) 6= 0. Since R0 (0) 6= 0, we get that U (0) 6= 0, as we wanted to prove.  Proof of Theorem 1.2. Our proof starts with the discussion given in the introduction of the paper and uses the notations introduced there. Recall that (2) writes as Z x Z q 0 0 φ(x) = G(R(s))F (R(s))R (s) ds = G(t)F 0 (t) dt = ϕ(q). (7) 0 0 We take Z t 1 F (t) = p ds, 0 D(s) that is a local diffeomorphism p at 0 because D(0) = sgn(D(0))D(0) > 0 and, as a 0 consequence, F (0) = 1/ D(0) 6= 0. Then, by Proposition 1.1, 1 1 sgn(R0 (0)) F 0 (R(s)) = p =p = p (8) D(R(s)) (R0 (s))2 U(s) R0 (s) U(s) and (7) reads as Z x Z q 0 G(R(s)) G(t) φ(x) = sgn(R (0)) p ds = p dt = ϕ(q). 0 U(s) 0 D(t) p Notice that ϕ0 (0) = G(0)/ D(0) 6= 0. Hence, ϕ is a local diffeomorphism p at 0. 0 0 The same happens with φ, because φ (0) = sgn(R (0))G(0)/ U(0) 6= 0. Thus x = φ−1 (ϕ(q)) as we wanted to prove.  6 A. GASULL AND H. GIACOMINI Next remark clarifies the situation when some of the hypotheses in Theorem 1.2 are not satisfied. Remark 2.1. In Theorem 1.2 the hypothesis that all the roots of R are simple is used to ensure that R0 (0) 6= 0 and D(0) 6= 0. These conditions together with the hypothesis that G(0) 6= 0 imply that the functions defined by the hyperelliptic integrals φ and ϕ are invertible at 0. If we do not mind about their invertibility we arrive also to equality φ(x) = ϕ(q) with these functions given as in (4) of the statement. We also remark that in this situation the value sgn(R0 (0)) must be replaced by the sign of R(s) for s in the interval containing 0 and x. Moreover, in this situation, if R0 (0) = 0, that is when near x = 0 the polynomial equation R(x) = q writes as xk + O(xk+1 ) = q, for some 1 < k ∈ N, k smooth branches of solutions, xj (q), j = 1, . . . , k, solve the equation and satisfy xj (0) = 0. This result is a consequence of Weierstrass’ preparation theorem. Each one of these branches satisfies the ODE that we are considering and, as a consequence, the equality φ(x) = ϕ(q) with both functions given in (4). Similar branches appear also when we try to invert φ. We will also need the following corollaries of previous results. Notice that from the first corollary, the functions defined by the hyperelliptic integrals given in The- orem 1.2 are replaced by primitives of rational functions. Corollary 2.2. Let P (x) = R(x) − q be a real polynomial of degree n ≥ 2, with R(0) = 0 and q ∈ R. Set D(q) = disx (P (x)) and assume that all the roots of R are simple. Define the polynomial U (x) = D(R(x))/(R0 (x))2 and the functions Z x Z q H(R(s)) H(t) Φ(x) = 0 ds and Ψ(q) = dt, 0 R (s)U (s) 0 D(t) where H is any continuous function satisfying H(0) 6= 0. Then, in a neighborhood of 0, Φ is invertible and x = Φ−1 (Ψ(q)) is a root of P (x) = 0 that goes to 0 as q tends to 0. In particular, if H is polynomial, Φ and Ψ are primitives of rational functions. Proof. To prove this result we take H(t) G(t) = p D(t) in Theorem 1.2. Notice that by using (8) we obtain that H(R(s)) sgn(R0 (0))H(R(s)) G(R(s)) = p = p . D(R(s)) R0 (s) U(s) Therefore, G(R(s)) 2 H(R(s)) H(R(s)) sgn(R0 (0)) p = sgn(R0 (0)) p 2 = sgn(U (0)) 0 . U(s) 0 R (s) U(s) R (s)U (s) Similarly, G(t) H(t) H(t) H(t) p = p 2 = sgn(D(0)) = sgn(U (0)) . D(t) D(t) D(t) D(t) SOLVING POLYNOMIALS WITH ODE 7 By replacing both expressions in (4) we obtain that Φ(x) = Ψ(q) and the corollary follows.  This second corollary is essentially a version of Remark 2.1 in this situation. Notice that the hypothesis that all the roots of R are simple it is not needed. Corollary 2.3. Let P (x) = R(x) − q be a real polynomial of degree n ≥ 2, with R(0) = 0 and q ∈ R. Set D(q) = disx (P (x)). Let x = x(q) be a root of P (x) = 0 that goes to 0 as q tends to 0. Then R0 (x)U (x) x0 = , D(q) where U is the polynomial U (x) = D(R(x))/(R0 (x))2 . Proof. By Weierstrass’ Preparation theorem we know that the algebraic curve P (x) = R(x) − q has at most n branches passing by the point (x, q) = (0, 0). Moreover, each of these branches, say x = x(q), satisfies R(x(q)) = q. Hence, R0 (x(q))x0 (q) = 1. From Proposition 1.1, it holds that D(R(x)) = (R0 (x))2 U (x) and, as a consequence, 1 R0 (x)U (x) R0 (x)U (x) x0 = = = , R0 (x) D(R(x)) D(q) as desired.  We will apply the above results for n ≤ 5. 2.1. A toy example: the quadratic equation. Consider P (x) = x2 +px−q, with p 6= 0. Then D(q) = disx (P (x)) = p2 + 4q, D(q) ≡ D(q) and D(R(x)) = (2x + p)2 . Then U = 1. Moreover, since R0 (0) = p, we get from (4), that for |q| < p2 /4, Z x Z x sgn(R0 (0)) φ(x) = p ds = sgn(p) ds = sgn(p)x, 0 U(s) 0 Z q Z q p p 1p 2 q 1 1 p2 + 4q − p2 ϕ(q) = p dt = p dt = p + 4t = . 0 D(t) 0 p2 + 4t 2 0 2 Then, by Theorem 1.2 we get equation φ(x) = ϕ(q), that gives the Babylonian formula p −p + sgn(p) p2 + 4q x= . 2 By using Corollary 2.2 instead of Theorem 1.2 with H = 1 we obtain Z x Z x   1 1 1 2x + p Φ(x) = 0 ds = ds = log , 0 R (s)U (s) 0 2s + p 2 p Z q Z q  2  1 1 1 p + 4q Ψ(q) = dt = 2 dt = log . 0 D(t) 0 p + 4t 4 p2 By using that Φ(x) = Ψ(q) we obtain again the classical formula. Finally, notice that although the obtained formula for x = x(q) is valid when |q| < p2 /4, their algebraic nature makes it valid for all values of p and q. 8 A. GASULL AND H. GIACOMINI 2.2. Cubic equations. We find a solution for the cubic polynomial equation P (x) = x3 + px − q = 0. (9) Notice the minus sign in front of q, in contrast with the usual notation given in (26) utilized in Section 5.1 of the Appendix. We exclude the trivial case p 6= 0. In the notation of Theorem 1.2, D(q) = −(4p3 + 27q 2 ) and D(q) = sgn(p)(4p3 + 27q 2 ). After some computations, D(R(x)) = sgn(p)(3x2 + 4p)(3x2 + p)2 , and, as a consequence, U(x) = sgn(p)(3x2 + 4p). Hence, taking G = 1, equation φ(x) = ϕ(q) writes as Z x Z q sgn(p) 1 p ds = p dt. (10) 0 sgn(p)(3s2 + 4p) 0 sgn(p)(4p3 + 27t2 ) It is well-known that  p    arcsinh A/B x   Z x   √ , when A > 0, B > 0, 1 A p dy = p  (11) 0 Ay 2 + B   arcsin −A/B x     √ , when A < 0, B > 0, −A p where the second equality is only valid for for |x| < −B/A . Thus, for instance applying the first one when p > 0 in (10) we obtain that √ √ ! √ √ ! 3 3x 3 3 3q arcsinh √ = arcsinh √ , 3 2 p 9 2p p or equivalently, √ √ !! 2 p 1 3 3q x = √ sinh arcsinh √ . (12) 3 3 2p p √  By using that arcsinh(z) = ln z + z 2 + 1 we obtain that   q ! 1 1 3 √ 1 sinh arcsinh (z) = z + z2 + 1 − p √ 3 2 3 z + z2 + 1 and hence, after some computations, from (12) we get s r 3 q q 2 p3 p x= + + − r q , (13) 2 4 27 2 p3 3 2q + q4 + 3 27 that is, Cardano’s formula for equation (9). If we consider the case p < 0 and perform the same type of computations but using the second equality in (11) we arrive to √ √ !! 2 −p 1 3 3q x = √ sin arcsin √ , (14) 3 3 2 p −p p that is similar to (12), but for p < 0 and only valid when |q| < −4p3 /27 . SOLVING POLYNOMIALS WITH ODE 9 In any case, as for the quadratic equations, the algebraic nature of the formula (13) allows to consider it for all values of p and q. 2.3. Quartic equations. As we will see, it is difficult to recover the classical solu- tion with this approach. We start with a particularly simple case. We will return to this case in Section 4.1. Consider the particular quartic equation P (x) = x4 − 2x3 + 2x2 − x − q = 0. (15) We will apply Theorem 1.2 with G = −2. After some calculations we obtain that U(x) = (2x2 − 2x + 1)2 (4x2 − 4x + 3) and D(q) = (4q + 1)2 (16q + 3). Hence, Z x Z x 0 G(R(s)) 2 φ(x) = sgn(R (0)) p ds = √ ds 2 2 0 U(s) 0 (2s − 2s + 1) 4s − 4s + 3   2x − 1 π =2 arctan √ + 2 4x − 4x + 3 3 and Z q Z q p  π G(t) −2 ϕ(q) = p dt = √ dt = − arctan 16q + 3 + . 0 D(t) 0 (4q + 1) 16q + 3 3 For the sake of shortness we introduce the new variables 2x − 1 p z=√ and w = 16q + 3 . 4x2 − 4x + 3 Notice that given z the corresponding values of x can be obtained by solving a quadratic equation. Hence, the equation φ(x) = ϕ(q) can be written as 2 arctan (z) = − arctan (w) , or, equivalently, tan(2 arctan (z)) = −w, that gives 2z = w. −1 z2 Thus, for each w, the corresponding value of z can be obtained again by solving a new quadratic equation wz 2 − w − 2z = 0. In short, solving two quadratic equations the quartic equation (15) can be solved. In fact, this is the particularity of the equation that we have considered and makes its study easier: there is no need to solve any cubic equation to find its roots. Their four solutions are q 1 1 p ± −1 ± 2 1 + 4q . 2 2 Let us explore what gives our approach when we apply it to a general quartic equation. Recall first, that similarly of what happens with cubic equations, the general quartic case can be reduced to x4 + px − q = 0, (16) for some p, q ∈ R. In this situation, a translation is not enough to arrive to (16) and the so-called Tschirnhausen transformations must be used. 10 A. GASULL AND H. GIACOMINI If we apply Theorem 1.2 with G = 1, we obtain that D(q) = −(27p4 + 256q 3 ) and D(q) = 27p4 + 256q 3 . Then, some computations give  D(R(x)) = (R0 (x))2 U(x) = (4x3 + p)2 16x6 + 40px3 + 27p2 . Hence, Z x Z x sgn(R0 (0)) 1 φ(x) = p ds = p ds 0 U(s) 0 16s + 40ps3 + 27p2 6 and Z q Z q 1 1 ϕ(q) = p ds = p ds. 0 D(s) 0 256s3 + 27p4 The above functions can be expressed as an Appell function and a hypergeometric function, respectively. Therefore, this approach gives no satisfactory results in order to obtain the roots of the quartic equation in terms of radicals. We will return to the quartic equation in Section 4.1. 2.4. Quintic equations. In this section, with our approach, we recover the result of Betti ([2]) that asserts that the solution of these equations can be obtained in terms of the inverse of an elliptic integral. Following Betti, it suffices to study the particular quintic equation P (x) = x5 + 5x3 − q. We can not apply directly Theorem 1.2 because the above case is not under its 5 3 0 hypotheses. In fact R(x) √ = x + 5x and hence R (0) = 0. Moreover, as we will see, we will use G(x) = 5 5x and thus G(0) = 0. Therefore two of the hypotheses of the theorem are not satisfied, but instead we will use the extended result explained in Remark 2.1. There we explain that in this more general situation, it holds that φ(x) = ϕ(q) with φ and ϕ given also in (4). Following the notation of Theorem 1.2 we have that D(q) = 55 q 2 (q 2 + 108) and U(x) = 53 x2 (x2 + 5)2 (x6 + 4x4 − 8x2 + 12). Moreover, as it is explained in Remark 2.1, sign(R0 (0)) can be replaced by +1, because near 0, R0 √ is positive. Taking G(x) = 5 5x, we get that Z x Z q s2 1 φ(x) = √ ds and ϕ(q) = √ dt. 6 4 2 s + 4s − 8s + 12 2 0 0 5 t + 108 Hence, by introducing the new variable u = s2 , the equality φ(x) = ϕ(q) writes as Z x2 Z q u 2 p du = √ dt. 0 u(u3 + 4u2 − 8u + 12) 0 5 t2 + 108 This expression is precisely the one obtained in [2] and gives a root of the considered quintic equation in terms of elementary functions and the inverse of an elliptic integral. SOLVING POLYNOMIALS WITH ODE 11 3. Polynomials and Abel equations: proof of Theorem 1.3 This section is devoted to prove Theorem 1.3 and its corollary. By Corollary 2.3, any branch of solutions x = x(q) of P (x) = R(x)−q = 0 passing by (x, q) = (0, 0) satisfies the differential equation 0 R0 (x)U (x) x = , (17) D(q) where R0 (x)U (x) is a polynomial in x of degree (n−1)2 and D(q) is a polynomial in q of degree n − 1. By dividing R0 U by P we get that R0 (x)U (x) = P (x)Q(x) + W (x), where W is a polynomial in q and x of degree at most n − 1 in this last variable. That is, n−1 X W (x) = wj (q)xj , j=0 where the functions wj (q) are polynomials in q. Hence, since P (x(q)) ≡ 0, when x = x(q) it holds that n−1 n−1 0 R0 (x)U (x) P (x)Q(x) + W (x) W (x) X wj (q) j X x = = = = x = aj (q)xj , (18) D(q) D(q) D(q) j=0 D(q) j=0 as we wanted to prove. Let us detail the corresponding ODE (18) for n = 2, 3, 4. For the quadratic equation P (x) = x2 + px − q = 0, we have that D(q) = p2 + 4q and U (x) = 1. Hence x(q) satisfies (17), R0 (x)U (x) 2x + p 2 p x0 = = 2 = 2 x+ 2 , (19) D(q) p + 4q p + 4q p + 4q that is already a linear ODE. Its general solution is p −p + K p2 + 4q x(q) = . 2 By imposing the initial condition x(0) = 0 we arrive again to the babylonian solution p −p + sgn(p) p2 + 4q x(q) = . 2 For the cubic equation P (x) = x3 + px − q = 0, D(q) = −(4p3 + 27q 2 ) and U (x) = −(3x2 + 4p). Since R0 (x)U (x) = −(9x4 + 15px2 + 4p2 ) = −9xP (x) − (6px2 + 9qx + 4p2 ) and P (x(q)) ≡ 0, we have that x = x(q) satisfies the Riccati equation 6px2 + 9qx + 4p2 6p 9q 4p2 x0 = = x 2 + x + . (20) 4p3 + 27q 2 4p3 + 27q 2 4p3 + 27q 2 4p3 + 27q 2 Finally, we consider the quartic equation P (x) = x4 + px − q = 0. Here we have D(q) = −(27p4 + 256q 3 ) and U (x) = −(16x6 + 40px3 + 27p2 ) 12 A. GASULL AND H. GIACOMINI and R0 (x)U (x) = −(64x9 + 176px6 + 148p2 x3 − 27p3 )   = − 64x5 + 112px2 + 64qx P (x) − 36p2 x3 + 48pqx2 + 64q 2 x + 27p3 . Hence x(q) satisfies the Abel ODE 36p2 48pq 64q 2 27p3 x0 = x 3 + x 2 + x + . 27p4 + 256q 3 27p4 + 256q 3 27p4 + 256q 3 27p4 + 256q 3 4. Polynomials and linear ODE: proof of Theorem 1.5 We prove Theorem 1.5 and we apply it to the low degree cases. We recover again Cardano’s formula, obtaining it as a particular solution of the equation for the harmonic oscillator. We also get the solution of quartic equations in terms of a generalized hypergeometric function that gives an alternative expression to the classical algebraic one, also presented in Section 5.2 of the Appendix. We start proving the following simple lemma. Lemma 4.1. Let x(q) be a solution of the polynomial equation P (x) = R(x) − q = 0 and consider v(q) = A(x(q), q)/Dm (q), where 0 < m ∈ N, D(q) = disx (P (x)) and A is a polynomial. Then v 0 (q) = B(x(q), q)/Dm+1 (q), for some new polynomial B(x, q). Proof. We have that ∂A(x(q), q) 0 ∂A(x(q), q) x (q) + ∂x ∂q A(x(q), q)D0 (q) B(x(q), q) v 0 (q) = m − m m+1 = , D (q) D (q) Dm+1 (q) ∂A(x, q) 0 ∂A(x, q) where B(x, q) = R (x)U (x) + D(q) − mA(x, q)D0 (q), we have used ∂x ∂q Corollary 2.3 and U is the polynomial appearing in its statement.  Proof of Theorem 1.5. We start as in the proof of Theorem 1.3, recalling that by Corollary 2.3 it holds that R0 (x)U (x) c1 (x) x0 = =: , D(q) D(q) where c1 is a polynomial in x of degree (n − 1)2 . Notice that applying re-iteratively Lemma 4.1, defining v = x(k) , k = 2, 3, . . . we obtain that Ck (x, q) x(k) = , 1 < k ∈ N, Dk (q) where Ck (x, q) are polynomials of increasing degrees in x, defined recursively as ∂Ck (x, q) 0 ∂Ck (x, q) Ck+1 (x, q) = R (x)U (x) + D(q) − kCk (x, q)D0 (q), ∂x ∂q and C1 (x, q) = c1 (x). As in the proof of Theorem 1.3, we can write Ck (x, q) = Qk (x, q)P (x) + Bk (x, q), 0 < k ∈ N, SOLVING POLYNOMIALS WITH ODE 13 where each Bk is a polynomial in q and x, of degree at most n−1 in this last variable. Hence, x = x(q) satisfies n−1 Bk (x, q) X x(k) = = bk,j (q)xj , 0 < k ∈ N. (21) Dk (q) j=0 For k = 1 this ODE in the one of Abel type given in Theorem 1.3. Let us explain how to obtain a (n − 1)-th order linear differential equation by using (21) for k = 1, 2, . . . , n − 1. In fact, as a first step, we prove that these n − 1 ODE can be transformed into n−2 ODE, where their left hand sides are polynomials of degree one in the variables x0 , x00 , . . . , x(n−1) and with coefficients that are rational functions of q, while their right hand sides continue being polynomials in x but have decreased their degrees to n − 2. If at least n − 2 of the functions bn−1,j j = 1, 2, . . . , n − 1, identically vanish, we are done. Otherwise, at least two of them, say bn−1,i and bn−1,` , are not identically zero. Then, by computing x(i) /bn−1,i (q) − x(`) /bn−1,` (q) we cancel the term xn−1 in the corresponding right hand side, obtaining one of the new desired relations. Doing the same procedure with several couples of relations (21) satisfying that bn−1,j 6= 0 we obtain the n − 2 searched relations. Starting from these new relations, combining them in a similar way, we obtain, for each m = 3, . . . , n − 1, in each step n − m ODE whose right hand sides have degree n − m in the variable x. The last step of this procedure gives the desired linear differential equation.  Although the linear ODE given in Theorem 1.5 can be obtained in general, their expressions are huge. To show some examples we give these ODE for the particular case of trinomial polynomials P (x) = xn + px − q = 0, (22) when n = 3, 4, 5, 6. As we will see, in this case of trinomial polynomials the resulting ODE has a simple expression. Notice also that it is not difficult to see that for n > 1, near q = 0, the solution of (22) is 1 1 x = x(q) = q − n+1 q n + o(q n ). p p Hence all the (n − 1)-th order linear ODE that we will obtain have to be solved with the initial conditions 1 x(0) = 0, x0 (0) = , x00 (0) = x000 (0) = · · · = x(n−2) (0) = 0. (23) p For n = 3, we already know from (20) that 6p 9q 4p2 x0 = x 2 + x + . 4p3 + 27q 2 4p3 + 27q 2 4p3 + 27q 2 By using the procedure detailed in the proof of Theorem 1.5 we obtain that 162pq 12p3 − 162q 2 108p2 q x00 = − x 2 + x − . (4p3 + 27q 2 )2 (4p3 + 27q 2 )2 (4p3 + 27q 2 )2 Hence, since 27qx0 + (4p3 + 27q 2 )x00 = 3x, we arrive to the ODE (4p3 + 27q 2 )x00 + 27qx0 − 3x = 0. (24) 14 A. GASULL AND H. GIACOMINI For the non trinomial case the associated ODE is non homogeneous in general (see Remark 4.2). Let us solve it. We introduce a new independent variable t, as q = g(t), for some smooth function g invertible at t = 0 and such that g(0) = 0. Then y(t) = x(g(t)) is a solution of a new second order linear ODE in y(t). Straightforward computations give that the coefficient of y 00 (t) for this new ODE is (4p3 + 27g 2 (t))/(g 0 (t))2 . Hence, to find a new simple ODE we impose that 4p3 + 27g 2 (t) = sgn(p)3. (g 0 (t))2 Solving it we obtain that, when p 6= 0, one of its solutions satisfying g(0) = 0 and g 0 (0) 6= 0, is  √   2 3 √   p p sinh (3t) , when p > 0, 9 g(t) = √   2 3 √   p −p sin (3t) , when p < 0. 9 In fact, taking these g’s we get that (24) is transformed into the simple equation y 00 − sgn(p) y = 0. Hence, the general solution of (24) is  C1 sinh (g −1 (q)) + C2 cosh (g −1 (q)) , when p > 0, x(q) =  C1 sin (g −1 (q)) + C2 cos (g −1 (q)) , when p < 0, where C1 and C2 are arbitrary constants. By imposing the initial conditions (23) and computing g −1 (q) we get  √ √ !!   2 p 1 3 3q   √3 sinh  3 arcsinh √ 2p p , when p > 0, x(q) = √ √ !!   2 −p 1 3 3q   √ sin  3 arcsin √ 2 p −p , when p < 0, 3 p where the second equality takes real values only for |q| < −4p3 /27 . These expres- sions coincide with the ones obtained in Section 2.2, see (12) and (14), and lead us again to Cardano’s formula. The ODE obtained for n = 4, 5 and 6 can be obtained similarly. We skip the details and we only show the final results. For n = 4, (27p4 + 256q 3 )x000 + 1152q 2 x00 + 688qx0 − 40x = 0. (25) For n = 5, (256p5 + 3125q 4 )x0000 + 31250q 3 x000 + 73125q 2 x00 + 31875qx0 − 1155x = 0. For n = 6, (3125p6 + 46656q 5 )x00000 + 816480q 4 x0000 + 4153680q 3 x000 + 6658200q 2 x00 + 2307456qx0 − 57456x = 0. SOLVING POLYNOMIALS WITH ODE 15 Remark 4.2. For general polynomials (not in trinomial form) it can be seen that the linear differential equations given in Theorem 1.5 are no more homogeneous. This is already the case for polynomials of degree 2, see (19). As an example we give it for x3 + sx2 + px − q = 0. The associated ODE is  4p3 + 27q 2 + 18pqs − p2 s2 − 4qs3 )x00 + 27q + 9ps − 2s3 x0 − 3x − s = 0. When s = 0, the above ODE reduces to (24). 4.1. Again quartic equations. To solve the quartic we have to find the solution of (25) with the initial conditions given in (23), that is x(0) = x00 (0) = 0 and x0 (0) = 1/p. By using Mathematica we arrive to   1 1 3 2 4 256q 3 q x = x1 (q) =3F2 , , ; , ;− 4 2 4 3 3 27p4 p and with Maple we obtain     1 5 2 256q 3 7 13 4 256q 3 q x = x2 (q) =2F1 − , ; ; − · 2 F1 , ; ;− , 24 24 3 27p4 24 24 3 27p4 p where n Fm (·; ·; x) are the classical hypergeometric functions. As an other result for the quartic, by a direct substitution it is easy to check that 1 p  x = x3 (q) = 2pw3 (q) − 1 − 1 , 2w(q) √ where w = w(q) satisfies −p2 w6 + 4qw4 + 1 = 0 and w(0) = 1/ 3 p, solves it. Notice that this can be done algebraically because there is the algebraic relation between x3 (q) and w(q), (2x3 w + 1)2 = 2pw3 − 1, and w(q) also satisfies a bi-cubic algebraic equation. See Section 5.2, and in particular (29), to understand how we have obtained the expression x3 . In particular, by the uniqueness of solutions theorem, it holds that xi (q) = xj (q), for all i, j ∈ {1, 2, 3}, although it seems not easy to prove these equalities without passing by the differential equation. It is a challenge to extract the expression of the algebraic solution of (25) by using only the associated ODE. 5. Appendix For completeness we include in this appendix some classical approaches to solve cubic and quartic equations. While for the cubic equations there is nothing new, the solutions of the quartic are given in a form that is not the most commonly used, but that is very practical and it is also suitable for our approach to the problem. 5.1. Cubic equations. The cubic polynomial equations were solved during the XVI Century by the Italian school and the protagonists were Scipione del Ferro, Niccolò Fontana (Tartaglia) and Gerolamo Cardano. As usual, the cubic polynomial equation y 3 + by 2 + cy + d = 0, is transformed into the simpler one x3 + px + q = 0, (26) b for some suitable p and q, by introducing the new variable x = y + 3 . We also consider that p 6= 0, because otherwise its solutions can be trivially found. We will recall two different well-known ways for solving it. We start with the most classical one. We look for a solution of the form x = u + v. Replacing it in (26) we get u3 + v 3 + q + (3uv + p)(u + v) = 0. Now we impose that u and v simultaneously 16 A. GASULL AND H. GIACOMINI satisfy u3 + v 3 + q = 0 and 3uv + p = 0. By isolating v from the second equation and replacing it into the first one we get that z = u3 satisfies z 2 + qz − p3 /27 = 0. Solving this second degree equation and using that x = u − p/(3u) we arrive to the celebrated Cardano’s formula, s r 3 q q 2 p3 p x= − + + − r q . 2 4 27 3 q q2 p3 3 − 2 + 4 + 27 A different approach is due to François Viète (Vieta). His starting point is the trigonometric identity 4 cos3 (θ) − 3 cos(θ) − cos(3θ) = 0. (27) When p p < 0, we perform in (26) the change of variables x = u cos(θ), with u = 3 2 −p/3 and multiply the equation by 4/u . We arrive to r 3 3q −3 4 cos (θ) − 3 cos(θ) − = 0. 2p p q 3q Hence, by using (27), when 2p −3 p ≤ 1, the three solutions of the cubic equation can be obtained from r   r  −p 1 3q −3 x=2 cos arccos , 3 3 2p p taking the different values of the arccos function. When the inequality does not hold or p > 0, it is possible to consider the extension of the cos function to C or to use that the cosh function, cosh(x) = (exp(x) + exp(−x))/2, also satisfies 4 cosh3 (θ) − 3 cosh(θ) − cosh(3θ) = 0 and then use similar ideas to obtain the solutions of the cubic equation. 5.2. Quartic equations. The quartic equation was solved by Ludovico Ferrari, only some few years after the solution of the cubic one. Essentially its solution is based on some tricks for completing squares that strongly use the solution of the cubic equation. As we have already commented, we present a simple and practical version of that approach that is also suitable for our interests. By a translation, any quartic equation can we written as x4 + cx2 + dx + e = 0, d 6= 0, (28) where we discard the trivial case d = 0, because then the equation can be easily solved. Trying to get complete squares in both sides we write it as (c + u2 )2 (c + u2 )2 x4 + (c + u2 )x2 + = u2 x2 − dx − e + , 4 4 for some u to be determined. Therefore it is natural to impose that (c + u2 )2 d2 −e + = 2 ⇐⇒ Q(u) := u6 + 2cu4 + (c2 − 4e)u2 − d2 = 0. 4 4u SOLVING POLYNOMIALS WITH ODE 17 Since d 6= 0, any value u satisfying the above bi-cubic equation is non-zero. Hence for any such u, equation (28) writes as  2  2 2 c + u2 d x + = ux − . 2 2u Then the solutions of (28) coincide with the solutions of the two quadratic equations   2 c + u2 d x + = ± ux − . 2 2u By solving them we obtain that the four solutions of (28) are r ! r ! u 2d 2c u 2d 2c 1± − 3 − 2 −1 , − 1± − −1 , 2 u u 2 u3 u2 where u is any solution of Q(u) = 0. Taking w = 1/u, them can also be written as 1  √ 3 2  1  √ 3 2  1 ± −2dw − 2cw − 1 , − 1 ± 2dw − 2cw − 1 , 2w 2w where w is any solution of the bi-cubic equation −d2 w6 + (c2 − 4e)w4 + 2cw2 + 1 = 0. In particular, for the trinomial quartic equation x4 + px − q = 0, the solution x(q) that tends to 0 when q also goes to zero is 1 p  x(q) = 2pw3 − 1 − 1 , (29) 2w √ where w = w(q) satisfies −p2 w6 + 4qw4 + 1 = 0 and w(0) = 1/ 3 p. In fact, a simple a posteriori proof that the solution x4 + px − q = 0 is given in (29) can be done as follows: write (29) as S(x, w) := (2xw + 1)2 + 1 − 2pw3 = 0 and observe that 3 Resw (S(x, w), −p2 w6 + 4qw4 + 1) = −4096p2 x4 + px − q , where Resw denotes the resultant with respect to w, see [13]. Hence, when p 6= 0, if w satisfies simultaneously S(x, w) = 0 and −p2 w6 + 4qw4 + 1 = 0, the corresponding x is a zero of the quartic polynomial. Acknowledgements. The first author is partially supported by the Ministry of Science and Innovation–Research Agency of the Spanish Government through grant PID2019-104658GB-I00 and by AGAUR, Generalitat de Catalunya, through grant 2017-SGR-1617. References [1] G. Bellardinelli, Fonctions hypergéométriques de plusieurs variables et résolution analytique des équations algébriques générales, Mémorial des sciences mathématiques, fascicule 145, 1960. [2] E. Betti, Un teorema sulla risoluzione analitica delle equazioni algebriche. Annali de Scienze mathematiche e fisiche V (1854), 10–17. [3] G. Boole, Treatise on differential équations, Supplementary volume, Mac Millan, Cambridge and London, 1865. [4] J. Cockle, On transcendental and algebraic solution. Philosophical Magazine 21 (1861), 379– 383. 18 A. GASULL AND H. GIACOMINI [5] L. Comtet, Calcul pratique des coefficients de Taylor d’une fonction algébrique. Enseignement Math. 10 (1964), 267–270. [6] L. Comtet, Advanced Combinatorics: The Art of Finite and Infinite Expansions, Dordrecht, Reidel, 1974. [7] L. Dickson, Modern Algebraic Theories. Benj. H. Sanborn and Co., 1926. [8] W. Heymann, Theorie der trinomische Gleichungen. Math. Ann. 28 (1887), 61. [9] R. B. King, Beyond the quartic equation. Birkhäuser Boston, Inc., Boston, MA, 1996. [10] R. Harley, On the Transcendental Solution of Algebraic Equations. Quart. J. Pure Appl. Math. 5 (1862), 337–361. [11] H.J. Mellin, Zur Theorie der trinominchen Gleichungen. Ann. Ac. Sc. Fenn. 7 (1915). [12] V. Prasolov, Y. Solovyev, Elliptic functions and elliptic integrals. Translated from the Russian manuscript by D. Leites. Translations of Mathematical Monographs, 170. American Mathe- matical Society, Providence, RI, 1997. [13] B. Sturmfels, Solving systems of polynomial equations, vol. 97 of CBMS Regional Confe- rence Series in Mathematics. Published for the Conference Board of the Mathematical Scien- ces,Washington, DC; by the American Mathematical Society, Providence, RI (2002). [14] J. Tannery, Propriétés des intégrales des équations différentielles à coefficients variables. An- nales scientifiques de l’ENS (1875), 113–182. Departament de Matemàtiques, Edifici Cc, Universitat Autònoma de Barcelona, 08193 Cerdanyola del Vallès, Barcelona, Spain. Centre de Recerca Matemàtica, Edifici Cc, Campus de Bellaterra, 08193 Cer- danyola del Vallès, Barcelona, Spain. E-mail address: gasull@mat.uab.cat Institut Denis Poisson. Université de Tours, C.N.R.S. UMR 7013. 37200 Tours, France. E-mail address: Hector.Giacomini@lmpt.univ-tours.fr