On integration of the first order differential equations in a finite terms

There are several approaches to the description of the concept called briefly as integration of the first order differential equations in a finite terms or symbolical integration. In the report three of them are considered: 1.) finding of a rational integral (Beaune or Poincaré problem), 2.) integration by quadratures and 3.) integration when the general solution of given differential equation is an algebraical function of a constant (Painlevé problem). Their realizations in Sage are presented.


Introduction
Algorithms realizing in popular computer algebra systems, for example, Maple, can solve many differential equations. However if system can't solve the equation user doesn't obtain any of information about this equation. Here we consider three approaches when the negative answer is interesting too. In each of them we fix some algebraic properties of solution.
2. Beaune problem Problem 1. For an ordinary differential equation the problem, attributed below to Beaune, consists of finding a rational integral w in all cases when such integral exist.
Note. In modern terms Florimond de Beaune asked Descartes how to find the algebraical equation of integral curves for the differential equation y ′ = y and Descartes wanted to find the solution by selection of coefficients in the equation y m = a 0 + a 1 x + · · · + a n x n , but stopped on n, m ≃ 100 [1]. Authors of the 19th century associated this problem with Poincaré, written about this question several big articles [2].
Put for example Standard solver dsolve in Maple can solve the eq. (2) in quadratures but Maple can't calculate those quadratures. Furthermore symgen from DETools package [3] finds only one integrating divisor. If eq. (1) has a rational integral then integral curves constitute a irreducible linear pencil but we can't estimate pencil order. So in all known algorithms for solution of problem 1 the user must give a boundary for degree of required integral [4,5]. This boundary has simple geometric sense so we can state the following variant of Beaune problem.
Problem 2. For an ordinary differential equation (1) the problem consists of finding an integral curves pencil of given degree N or less in all cases when such pencil exist.
We present here solution for the problem 2 in Sage [6] founded on Lagutinski method [7,8,9,10,11,12], the scientific biography and bibliography of M.N. Lagutinski can be found in [13]. Required package Lagutinski can be downloaded from the author home page [14].
Let R be a polynomial ring with differentiation D and constants field Q. Countable set is called a basis of the ring R iff (i) any element ψ from the ring R can be described as a linear combination of elements from B under constants field, that is (ii) for any integers i, j there is an integer n > max(i, j) such that Maximum from numbers n 1 , . . . , n m in (3) will be called an order of ψ with respect to the basis B. Determinant of the matrix is called Lagutinski determinant of degree n and will be denoted bellow as ∆ n . Theorem 1 (M.N. Lagutinski, 1911). A rational integral of degree N exists iff ∆ N = 0. In this case some rational integral is constructed as ratio of two minors in ∆ N .
In presented package we can calculate Lagutinski determinants and minors mentioned in the theorem 1. For solving of problem 2 we put R = Q[x, y] and also choose standard glex-basis {1, y, x, y 2 , . . . } as a basis B. Then problem 2 has a solution iff Example. Are the integrated curve of equation Computation of Lagutinski determinant of a big order is a difficult task [4] but for the solution of the problem 2 it is enough to calculate determinant in one point with random integer coordinates. If at that point is not equal to zero then there isn't integral curves pencil of degree n or less, otherwise there is almost certainly integral curves pencil of degree n or less.
Example. Are the integral curve of equation (x − y 2 )y ′ − (2x + 1)y + y 2 = −x 2 curves of 9 degree or less? No, because ∆ 55 = 0 at random point. This idea allows to distinguish quickly in a text-book all equations with algebraic integral curves pencil. For example, all that equations in the standard Russian textbook on differential equations by A.F. Filippov [15] can be recognize by testing ∆ 55 . So Lagutinski method give a practical solution of the problem 1.
Note. First construction was introduced by Leibniz and second by Volterra and Schlesinger many years later [16]. P-integrals allow to state the further theory without any notion of elementary functions. here F is an algebraic function of a constant C, variables x, y and quadratures α 1 , . . . , α n ; this quantities are connected by equations of the form

MPMM2016 IOP
where f i , g i are algebraic functions of the arguments. In this case we say for brevity that differential equation (1) can be integrated by n quadratures.
Problem 3. For an ordinary differential equation (1) the problem consists of integrating by quadratures in all cases when such integral exist.
Theorem 2 (M. Singer, 1992). Differential equation (1) is integrated by several quadratures iff there is an integrating factor among P-quadratures, that is where udx + vdy is exact 1-form and u, v ∈ Q(x, y).
Note. This theorem was proved by M. Singer, but in [17] the concept of integration by quadratures is entered by different way; this theorem can be proved as a corollary of Liouville principle by classical methods [18]. Let the rational function v be a root of an equation Expression (5) is integrating factor for the form pdx + qdy iff F is Darboux polynomial for differentiation of ring Q[x, y, v]. This polynomial can be found again by Lagutinski method.
Theorem 3 (M.N. Lagutinski, 1911). A Darboux polynomial F of degree N exist iff ∆ N = 0 or F is factor of ∆ N . For finding v in (5) with given degree N with respect to standard glex-basis we can calculate linear under v factor of ∆ 2N with respect to appropriate basis of the ring R = Q[x, y, v]. This idea is realised in Lagutinski package [14] as the routine. Example. We can integrate equation at N = 5. In doing so, the equation has the integrating factor µ = exp − dx x + 2dy y = e − ln(xy 2 ) = 1 xy 2 and the general solution −y(x + y)dx + x 2 dy xy 2 = C.
We tested the routine on some tasks from the textbook by A.F. Filippov [15], for integration of vast majority we can take N = 4 ÷ 5. However this method don't give full solution of the problem 3 because user has to set the boundary N for degree of v. Note. Of course, these tasks are solved in elementary functions and Prelle-Singer algorithm [19,20] is more natural way of their solution.

Painlevé problem
In the Stockholm lectures [21] Painlevé gave on the example of the equations of the 1st and 2nd order property which is common for all equations, solvable in elementary, special and abelian functions: the general solutions of these equations depend on integration constants algebraically [22,23,24].
Problem 4. For a ordinary differential equation (1) the problem consists of finding an integral in all cases when its general solution depends on an integration constant algebraically.
Theorem 4. Let K be the field of analytical functions of the variable x. The general solution of (1) depends on integration constants algebraically iff there is a unique substitution z = u(x, y), r ∈ K(y) mapping the initial equation (1) in Riccati equation and preserving three points y = 0, 1, ∞.
For solving problem 4 with the help of this theorem we have again to put the boundary N for degree of u. For N = 2 we can state the problem of finding an substitution z = y(y + a 1 ) mapping given equation (1) in Riccati equation.
In generally we can write this condition as some system (S) of algebraical equations between a 1 , a 2 and its derivatives, but by theorem 4 there is an unique solution of (S) or no solutions. So by eliminating other variables we have a linear equation for a 1 iff such substitution exist. Example. Problem: to find a substitution (7) mapping the equation (x 4 − 2x 3 y + 2x 2 y 2 + 2xy 3 + y 4 − y 2 )dx + (x 2 + 2xy − y 2 )dy = 0 (8) in Riccati equation. In Sage we have an excellent set of instruments for elimination of variables in algebraic systems. So we have equation (x − a 1 )(a 1 + 1) = 0 for a 1 and a 2 (a 2 x − a 2 + x + 1) = 0 for a 2 . Direct check shows that substitution is the required one. Existence of parasitic roots is unexpected, but non fatale for the solution of the problem. It should be noted that Maple can't solve (8).

Conclusion
All the three discussed problems 1, 3, and 4 can be solved in computer algebra systems if we put some restrictions on degree required polynomials. With this reservation all three approach to symbolic integration can be successfully applied to solving ordinary differential equations in practice.