Calculation of Integrals in MathPartner

We present the possibilities provided by the MathPartner service of calculating definite and indefinite integrals. MathPartner contains software implementation of the Risch algorithm and provides users with the ability to compute antiderivatives for elementary functions. Certain integrals, including improper integrals, can be calculated using numerical algorithms. In this case, every user has the ability to indicate the required accuracy with which he needs to know the numerical value of the integral. We highlight special functions allowing us to calculate complete elliptic integrals. These include functions for calculating the arithmetic-geometric mean and the geometric-harmonic mean, which allow us to calculate the complete elliptic integrals of the first kind. The set also includes the modified arithmetic-geometric mean, proposed by Semjon Adlaj, which allows us to calculate the complete elliptic integrals of the second kind as well as the circumference of an ellipse. The Lagutinski algorithm is of particular interest. For given differentiation in the field of bivariate rational functions, one can decide whether there exists a rational integral. The algorithm is based on calculating the Lagutinski determinant. Mikhail Lagutinski (1871--1915) had worked at Kharkiv (Ukraine). This year we are celebrating his 150th anniversary.


Introduction
The development of computer algebra systems and cloud computing makes it possible to solve many computational problems. Vladimir Petrovich Gerdt was at the forefront of the development of computer algebra. As a professional physicist, he developed new algorithms for solving problems in mathematical physics and implemented them in many well-known systems of computer algebra. He has worked on systems such as REDUCE, Mathematica, Maple, and Singular. 306 DCM&ACS. 2021, 29 (4) [305][306][307][308][309][310][311][312][313][314] Today, many useful programs and cloud services are available. A new generation of computer algebra systems is actively developing. They are cloudbased systems freely available on the Internet. The MathPartner service is a nice example of this [1]- [4]. Free access to the MathPartner service is possible at http://mathpar.ukma.edu.ua/ as well as http://mathpar.com/.
In this review, we consider only a small area of MathPartner application, namely the calculation of definite and indefinite integrals. Symbolic computations and estimates of the computational complexity are of the greatest interest [5]- [9]. However, in some cases, symbolic computations need to be supplemented with numerical methods. In particular, this is true when calculating special functions [10], [11]. For example, elliptic integrals are used to calculate the period of the simple pendulum [12] as well as some properties of porous materials [13], [14].
The method was later improved by Manuel Bronstein [17]. In 2010-2019, an algorithm based on the Liouville-Risch-Davenport-Trager-Bronstein theory was developed at the Laboratory of Algebraic Computations of Derzhavin Tambov State University. A series of papers on symbolic integration algorithms was published by Svetlana Mikhailovna Tararova [18] and Vyacheslav Alekseevich Korabelnikov [19], [20]. The procedures were developed using object-oriented programming in Java. Their description is given in cited publications. Since the symbolic integration theory has not yet been completed, this algorithm can be considered as a good basis for further theoretical and practical development in this important area.
Historically, the first major symbolic integration project was the IBM Scratchpad project led by Richard Dimick Jenks. The development of this project as a commercial one was later stopped by the company. However, he played an important role in the development of the theory of symbolic integration and attracting interest in it.
Many general computer algebra systems today support symbolic integration of elementary functions. However, they all have a common drawback that is the incompleteness of solving the problem of symbolic integration. Another drawback is the lack of a detailed description of the procedural implementation and the technical possibility of further development of the package of procedures. The most famous example is the cloud-based SAGE system, which provides access to old open source packages that have long been discontinued. On the other hand, commercial systems do not give users access to their packages of procedures, and they do not have specialists who can complete the theory of calculating the antiderivative for the composition of simple elementary functions.
Experiments with integration problems from mathematical analysis textbooks show that many problems can be solved using any of the systems such as Mathematica, Maple, and MathPartner. Nevertheless, for each of them, one can find functions that have an antiderivative, but it is not calculated by this system. The MathPartner symbolic integration package is one of the newest packages in this area. It is developed in Java and is the most promising for further development.
In a series of important works, Mikhail Nikolaevich Lagutinski (1871-1915) developed a method for determining integrals of polynomial ordinary differen-tial equations in finite terms. He also developed the theory of integrability in finite terms of such systems of equations [21]- [23]. Lagutinski was an outstanding mathematician. He had worked at Kharkiv and died during the First World War. In this article, we also consider the Lagutinski method.
Note that he published his papers as Lagoutinsky using the French spelling [24], [25]. The authors are grateful to Mikhail Malykh for comments and historical notes about M. N. Lagutinski.

Indefinite integrals
To calculate the indefinite integral of an elementary function ( ) one can run the command int( ) , where is declared in the environment SPACE. Five number sets ℚ, ℝ, ℝ64, ℂ, and ℂ64 can be used. Over the field ℚ, pure symbolic computations are done. For example, let us calculate ∫ 2 sin ( 2 ) : The output is equal to (−1) cos( 2 ).

Definite integrals (the numerical algorithm)
A definite integral ∫ ( ) can be calculated by means of the command Nint( , , , , ), where means the approximation to decimals and denotes the number of points in the Gaussian formula (optional). These parameters can be omitted. The output is equal to 1.000000000000000000000000000000000000000000000, where all 45 decimal places are accurate.

The complete elliptic integrals
For some improper integrals, more efficient calculation methods are known. Let us consider complete elliptic integrals [10], [12]. For positive numbers > 0 and > 0, the complete elliptic integral of the first kind can be calculated by means of the arithmetic-geometric mean So, the circumference of an ellipse is equal to 2 MAGM( 2 , 2 ) AGM( , ) , where and denote the semi-major and semi-minor axes.

Other special functions
The gamma function is defined via a convergent improper integral where Re > 0. For any positive integer , Γ( ) = ( − 1)!. To calculate its value one can run the command Gamma( ).
The beta function, also called the Euler integral of the first kind, is also defined via another integral B( , ) = ∫ The output is = 1.0 − 3.0 .
Next, let us calculate the inverse transform: The output is = 3 .

The Lagutinski determinant
The Lagutinski method allows us to search for rational integrals of a given differential ring [21], [24], [25]. Therefore, it can be used to integrate ordinary differential equations in symbolic form [7], [23].
Let us consider the differential ring ℚ[ , ] of bivariate polynomials over the field ℚ, where the differentiation is given by = ( , ) + ( , ) .
Let us consider an infinite matrix whose entries are monomials. The first row consists of all bivariate monomials with graduated lexicographical ordering 1 , 2 , …. The second row consists of the first derivatives 1 , 2 , …. The third row consists of the second derivatives 2 1 , 2 2 , …, and so on. In particular, both monomials 2 and 3 are linear. For = 1 2 ( + 1)( + 2), the monomial is the last monomial of degree . The Lagutinski determinant of order with respect to the differentiation is a leading principal minor of order in this matrix. Of course, the first order Lagutinski determinant is equal to 1. To calculate the Lagutinski determinant of order with respect to the differentiation one can run the command det L( , [ , , , ]).
The significance of this determinant is explained by the following result that was previously obtained by Lagutinski [24], [25], but presented here in a modern formulation, cf. [7], [23]. A non-constant rational function ∈ ℚ( , ) is called an integral when vanishes identically.

Conclusion
The MathPartner service has become better and allows us to solve new problems in geometry and physics. MathPartner supports both symbolic and numerical integration of elementary functions. Moreover, some special functions can be calculated using fast algorithms.