From Heun Class Equations to Painlev\'e Equations

In the first part of our paper we discuss linear 2nd order differential equations in the complex domain, especially Heun class equations, that is, the Heun equation and its confluent cases. The second part of our paper is devoted to Painlev\'e I-VI equations. Our philosophy is to treat these families of equations in a unified way. This philosophy works especially well for Heun class equations. We discuss its classification into 5 supertypes, subdivided into 10 types (not counting trivial cases). We also introduce in a unified way deformed Heun class equations, which contain an additional nonlogarithmic singularity. We show that there is a direct relationship between deformed Heun class equations and all Painlev\'e equations. In particular, Painlev\'e equations can be also divided into 5 supertypes, and subdivided into 10 types. This relationship is not so easy to describe in a completely unified way, because the choice of the ''time variable'' may depend on the type. We describe unified treatments for several possible ''time variables''.


Introduction
There are many types of differential equations and special functions. Typically, within a given class there is one generic type and many confluent types. This is the case of Riemann (hypergeometric) class equations, Heun class equations, as well as Painlevé equations. For instance, the generic type of Riemann class equations can always be reduced to the Gauss hypergeometric equation, but there are also confluent types such as Kummer's confluent equation, the F 1 equation, and the Hermite equation, see, e.g., [2,3,17,24,25].
One can try to understand the process of confluence by considering equations depending holomorphically on parameters. Some properties of the whole class can be described in a uniform way, without splitting the class into types. For instance, one can identify various transformations ("symmetries") that leave the class invariant.
In order to study the equations in more detail, one needs to split the class into types. Within a given type one can simplify the equation by symmetries and convert it to a normal form, thereby reducing the number of parameters. This has to be done case by case.
In the case of hypergeometric class equations, this idea was successfully applied in the book by Nikiforov-Uvarov [18]. It works especially well for hypergeometric polynomials, that is Jacobi, Laguerre, Bessel and Hermite polynomials, which can be elegantly treated in a unified way.
In this paper, we try to apply this idea to the derivation of Painlevé equations from Heun class equations by the method of isomonodromic deformation. We will see that each type of Heun class equation corresponds to a (properly understood) type of Painlevé equation. The passage from Heun class to Painlevé can be accomplished in a fairly uniform way, although one has to consider several similar but distinct cases.
We start our paper by Section 2 containing basic theory of singularities of 2nd order scalar ordinary differential equations. This is a classic subject with several well-known textbooks, such as [9,23]. We follow to a large extent the treatment described in the monograph by Slavyanov-Lay [25] and the appendix to [24], written by Slavyanov. Sometimes we introduce new notation and terminology to make precise some concepts which in [25] are implicit.
The central concept of the theory of linear differential equations in the complex domain is the rank of a singularity. In our paper we introduce several kinds of the rank. In particular, we distinguish between the usual rank and the absolute rank (the infimum over the ranks of all possible transformed forms of a given equation). The rank can be an integer or a half-integer. We also introduce the rounded rank, which has always an integer value. Thus if the rank is m or m − 1 2 , where m is an integer, then we say that its rounded rank is m. In particular, the rounded rank is 1 if the singularity is Fuchsian (also called regular). We believe that all these concepts clarify the theory of ordinary differential equations. We also discuss formal power series solutions of these equations (the so-called Thomé solutions). We introduce the concept of indices of a singular point. This is of course well-known for Fuchsian singularities. For non-Fuchsian singularities this concept is not so well known, although it is implicit in [25].
In Section 3 we discuss equations with rational coefficients. Such equations have a finite number of singularities on the Riemann sphere. Following [25], the class of equations with n singularities in C and a singularity at infinity, and their confluent cases are called M n class equations. red It is easy to see that these equations can be written as σ(z)∂ 2 z + τ (z)∂ z + η(z) u(z) = 0, (1.1) where σ is a polynomial of degree ≤ n, τ of degree ≤ n − 1 and ση of degree ≤ 2n − 2.
We introduce also a closely related grounded M n class, for which one of indices of all finite singularities is zero -hence the name "grounded". (In [25] such equations are called canonical. In our opinion, the word canonical is overused, hence not appropriate for this meaning.) They can be written as (1.1) with the same conditions on σ, τ , and with η a polynomial of degree ≤ n − 2.
The best known classes of equations with rational coefficients are the M 2 class and the grounded M 2 class. We call M 2 the Riemann class, since its generic representative is the Riemann equation with one singularity at ∞. The grounded M 2 class is especially often encountered in the literature. It is the main subject of the textbook by Nikiforov-Uvarov [18], where its elements are called "hypergeometric type equations". Note that the difference between the full and grounded Riemann class is minor -the only type of equations contained in the full Riemann class but not represented in the grounded Riemann class is the Airy equation.
One of the central objects of our paper is the M 3 class, called also the Heun class, for which σ is a polynomial of degree ≤ 3, τ of degree ≤ 2 and ση of degree ≤ 4. The main type within the Heun class is the standard Heun type, that is the equation with 4 Fuchsian singularities in the Riemann sphere, one of which put at ∞. It was first analyzed by Heun [8], see also [16] for a recent study.
In the literature the name Heun class equations is employed in two meanings: the meaning that we have just described is used in [24,25]. It is also common to use it for what we call the grounded Heun class, see, e.g., [5]. The grounded Heun class (not counting types of the Riemann class) is divided into 5 types: standard, confluent, biconfluent, doubly confluent and triconfluent. The full Heun class, beside the above five types has five more types, which we call degenerate confluent, degenerate biconfluent, degenerate doubly confluent, doubly degenerate doubly confluent and degenerate triconfluent. ( [25] uses the word "reduced" instead of "degenerate".) Sometimes a singularity of an equation does not lead to a singularity of its solutions. We call such points non-logarithmic singularities. Non-logarithmic singularities play an important role in the following construction.
Let us start with an equation (1.1). We introduce the deformed form of (1.1) to be the equation Note that all finite singularities of (1.2) are the same as in (1.1), except that there is an additional non-logarithmic singularity with indices 0, 2. λ is the position of this singularity and µ = v v (λ). If (1.1) is a Heun class equation, then (1.2) is called a deformed Heun class equation [25].
Let us note that non-logarithmic singularities of an equation can be produced by a change of gauge, that is by replacing the unknown v(z) with c 0 (z)v(z) + c 1 (z)v (z), where c 0 , c 1 are some rational functions. This procedure applied to grounded Heun class equations produces the so-called derivative Heun class equations, see [5,10,26]. Kimura proved in [15] that in deformed Riemann class equations one can remove all non-logarithmic singularities by a change of gauge. We do not know if the same is possible for all kinds of deformed Heun class equations.
Painlevé equations is a famous class of nonlinear differential equations with the so called Painlevé property-the absence of moving essential and branch singularities in its solutions. They were discovered in the beginning of 20th century [7,21,22]. Traditionally, Painlevé equations are divided into 6 types, called Painlevé I, II, III, IV, V and VI [12]. As noted by Ohyama-Okumura [19], it is actually natural to subdivide some of them into smaller types, obtaining altogether 10 types. Each of them corresponds to one of types of the Heun class equations. We obtain the following correspondence between types of the Heun class and Painlevé: Note that the Painlevé deg-V is equivalent to Painlevé III and Painlevé 34 is equivalent to Painlevé II by a relatively complicated change of variables.
As noted by Ohyama-Okumura [19], there also exists another, coarser classification of Painlevé equations into five supertypes. It corresponds to a coarser classification of Heun class equations into supertypes, where we use rounded ranks instead of the usual ranks. We obtain the following table, which is discussed in detail in Section 5: The main topic of our paper, described in Section 4, is a derivation of Painlevé equations from Heun class equations. The first step of this derivation is a choice of a family of Heun class equations depending on a parameter denoted t and called the time. Then we consider then the corresponding deformed Heun class equation, (1.2), which depends on two additional variables: λ, µ. The conditions for a constant monodromy lead to a set of nonlinear differential equation for λ, µ in terms of t. These equations can be interpreted as Hamilton equations generated by H(t, λ, µ), which we will call Painlevé Hamiltonians.
The most difficult ingredient of the passage from Heun class to Painlevé is the choice of the time variable and of the so-called compatibility functions a, b, which control the isomonodromic deformations. The main idea of our paper is to present this passage in a unified way. Our first attempt in this direction is described in Theorem 4.1. The description of compatibility functions and the corresponding Hamiltonian contained in this theorem is unified, however it is not very transparent. Theorem 4.2, which can be viewed as the first part of the main result of this paper, is more satisfactory. The method of isomodronomic deformation is here divided into two slightly different ansatzes, called Cases A and B. The main condition on σ, τ , η, t for the applicability of Ansatz A is the existence of a zero of σ, so that we can write σ(z) = (z − s)ρ(z), where ρ is a polynomial of degree ≤ 2. Under these conditions there exists a function t → m(t) such that is a Painlevé Hamiltonian. Among the conditions on σ, τ , η, t needed for Ansatz B the most important is deg σ ≤ 2. Then we can show that there exists t → m(t) such that is a Painlevé Hamiltonian. It seems impossible to implement Theorem 4.2 in a fully unified way, and one has to subdivide Cases A and B into several subcases. Case A splits into Subcases A1, Ap, Aq and Case B splits into Subcases Bp and Bq. We describe these subcases in Theorem 4.3. The main difference between the subcases is the choice of the time variable t: In Subcase A1 the variable t is the position of one of Fuchsian singularities.
In Subcases Ap and Bp the variable t is contained in τ . In Subcases Aq and Bq the variable t is contained in η.
In the following list we informally describe when we can apply various subcases.
Note that Subcase A1 works in the standard Heun type (1111), leading to Painlevé VI. Hence it works in under generic conditions. However, it does not works for some confluent types. For instance, for most degenerate types one needs to use either Subcase Aq or Subcase Bq. Altogether, Theorem 4.3 works for certain normal forms of all types of Heun class equations. This allows us to derive all types of Painlevé equations.
The derivation of the Painlevé VI equation from the Heun equation can be traced back to a paper by Fuchs [6] from the early 20th century (written by the son of Fuchs from whose name the adjective "Fuchsian" comes). The approach was generalized to other Painlevé equations by Okamoto [20] and refined by Ohyama-Okumura [19]. A discussion of the relationship between the biconfluent Heun type and the Painlevé IV equation can be also found in [1]. Thus derivations described in Sections 4.5-4.15 are known. They are in particular described by Ohyama-Okumura [19], where they were checked case by case. Our approach allows us to automatize these derivations and view them as implementations of a unified algorithm. In fact, our paper can be to some extent viewed as an explanation of the principles that underly the results of [19].
Slavyanov and Lay devote in [25] a whole chapter to the Heun class -Painlevé correspondence. In particular, they stress that Painlevé Hamiltonians can be viewed as "dequantizations" of the corresponding Heun class equations. In fact, the symbol of Heun class operators, that is the expression obtained from (1.1) by replacing ∂ z with µ and z with λ, is very similar to (1.3) and (1.4). (The difference is a "lower order term", which can be interpreted as a result of an "ordering prescription".) Nevertheless, to our understanding, [25] contains only a sketch of a program. The details of this program are quite involved and [25] does not provide its full description.
Clearly, every 2nd order scalar equation can be rewritten as a system of two 1st order equations. For instance, we can rewrite (1.1) as (or in other ways). In particular, Heun class equations are essentially equivalent to certain systems of 1st order equations called sometimes Heun connections. This suggests a different approach to deriving Painlevé equations starting from Heun connections. This alternative approach was studied, e.g., by Jimbo and Miwa [13,14]. A recent exposition of this approach can be found in [11].
Note that in the above references each type of Painlevé equations were treated separately. Besides, degenerate cases were usually left out. It would be interesting to investigate to what extent a derivation of all types Painlevé equations from Heun connections can be treated in a uniform way, in the spirit of Theorems 4.2 and 4.3. Anyway, in this paper we do not consider this question and we stick to (scalar 2nd order) deformed Heun class equations.
2 Second order linear differential equations in the complex domain

Differential equation and operator
Let us recall basic concepts of ordinary 2nd order linear differential equations in the complex domain with holomorphic coefficients. They have the form (1.1), where σ, τ and η are holo-morphic functions. We will often describe the equation (1.1) by specifying the corresponding operator Clearly, by multiplying an equation from the left by an arbitrary nonzero holomorphic function we obtain an equivalent equation. However, we change the corresponding operator. Speaking of operators instead of equations, which we will often do, has two advantages. First it saves a little space, since we do not need to write the function u. Besides, an operator contains more information than the corresponding equation, therefore sometimes allows for making more precise statements.
Divide (1.1) and (2.1) by σ(z) and set This leads to the so-called principal form of the equation and the corresponding principal operator: The principal form is often used as the standard form. However, we will often prefer different forms.

Singularities of functions
Let p be a function holomorphic on an open subset of the Riemann sphere C ∪ {∞}. Let z 0 ∈ C ∪ {∞} be its singularity, so that We say that the singular point z 0 is regular or Fuchsian if It is standard to introduce two indices of a Fuchsian singular point: The rank of A at z 0 is defined as follows. If z 0 is a regular point, we set rk(A, z 0 ) = 0. The case of rank equal to 1 2 is somewhat special: If rk(A, z 0 ) = 0, 1 2 , then we set The rank and indices of a singularity are invariants of biholomorphic transformations. For instance, this is the case of homographies, that is w = az+b cz+d , or z = dw−b −cw+a , where ad − bc = 1. We obtain In order to obtain the principal form we need to divide (2.3) by (−cw + a) 4 . Note that the rank is always an integer or a half-integer. A singularity of rank m − 1 2 with m ∈ {1, 2, . . . } can be often treated as a degeneration of a singularity of rank m. This motivates us to introduce the rounded rank, denoted rk : Here · is the ceiling function, that is The singularity z 0 is Fuchsian if its rank is 1 2 or 1. Thus z 0 is a Fuchsian singularity iff its rounded rank is 1.
According to our definition, a Fuchsian singularity has rank 1 2 if its indices are 0, 1 2 . The splitting of the Fuchsian case into two subcases, the rank 1 2 and 1, is quite useful, even if its definition is not obvious. Nevertheless, in our paper we will not make much use of this splitting and both will be usually treated as one case, denoted 1.
Sandwiching with exponentials. Let k = 2, 3, . . . . We have (2.9) Hence this transformation preserves rk(z 0 ) if it is > k, and preserves or decreases rk(z 0 ) if it is = k. The transformation does not change the coefficients p z 0 ,−1 , q z 0 ,−1 , q z 0 ,−2 . Therefore, it also does not change the indices of z 0 . The same is true for ∞ under the transformation More generally, we have transformations of the form (2.7), where We define the absolute rank of A at z 0 as whereÃ are all possible transforms of A of the form (2.7) with r as in (2.11) or (2.12).

Half-integer rank
In this subsection we discuss singular points with a half-integer rank. They are in a sense exceptional and have special properties. Suppose that the equation (2.2) has a singular point at z 0 and rk(A, z 0 ) = m + 1 2 , where m = 0, 1, . . . . It is easy to see that this implies Without loss of generality we can assume that the singularity is at 0. This is equivalent to Let us make the substitution (2.14) Multiplying (2.14) by 4y 2 we obtain an equation in the principal form Thus the rank of (2.15) at zero is 2m. Thus we have shown that by a quadratic substitution we can reduce a singularity of a halfinteger rank to a singularity of integer rank. The resulting equation (2.15) is in addition invariant with respect to the substitution y → −y and the rank of the singularity is even.
Note that our definition of rank 1 2 has been chosen so that the above quadratic reduction works for all half-integer ranks.

Simplifying the equation
Suppose that the equation (2.2) has a singular point at z 0 . Obviously, we have 3 exclusive possibilities: (1) Rk(A, z 0 ) is an integer and ≥ 2; (2) Rk(A, z 0 ) is a half-integer and ≥ 3 2 . We would like to simplify the equation around this singularity by sandwiching with e r , where r is given by (2.11) or (2.12). The transformed operator will be, as usual, denotedÃ. We will see that the simplification will be quite different depending on Case (1) and (2). (Case (0) is simple enough, therefore we do not discuss it in the following proposition). (1) If Rk(A, z 0 ) is an integer and ≥ 2, then there exist exactly two transformations such that is a half-integer and ≥ 3 2 , then there exists a unique transformation such that Proof . Without loss of generality we can assume that the singularity is at 0. We will use the identitỹ We will apply one of the following three transformations, denoted I, II and III. Transformation I. Suppose that the rank of the initial equation is m − 1 2 , m = 2, 3, . . . . Then deg(q, 0) = 2m − 1 and We choose r(z) such that Then deg(p, 0) ≤ 0 and deg(q, 0) = deg(q, 0). The transformed equation satisfies (2.17).
For transformations II and III we suppose that the rank of the initial equation is m = 2, 3, . . . . Transformation II. Assume that Let w −m+1 be one of two solutions of Using we can solve the recurrence relations. The transformed equation satisfies (2.16).
Transformation III. If then we sandwich with e r , where r(z) = p −m z −m+1 2(−m+1) . The transformed operatorÃ has deg(p, 0) ≤ m − 1 and deg(q, 0) ≤ 2m − 1. Thus after the transformation rk 0,Ã ≤ m − 1 2 . If the resulting rank is half-integer, then we apply I and stop. If the resulting rank is an integer, we apply II and stop, or III and we iterate.
We have thus two possibilities: Case (1) First a finite number of III, and then II. At the end we obtain equation satisfying (2.16).
Steps III are uniquely determined and II has two possibilities.
Case (2) First a finite number of III, and then I obtaining (2.17). All steps are uniquely determined.
We will say that the operator A has a grounded form at z 0 if deg(p, z 0 ) ≥ deg(q, z 0 ). If z 0 is Fuchsian, then this is equivalent to one of the indices being 0.
It follows from Proposition 2.1 that if Rk(A, z 0 ) is an integer or 1 2 , then the equation can be brought to a grounded form at z 0 .

Solutions in terms of formal power series
We consider the equation (2.2) and try to solve it in terms of a nontrivial, not necessarily convergent power series ∞ k=0 v k z k .
If j ≥ l, there is an additional term coming from the 2nd order derivative, involving v k with k = −l + j + 2. But l ≥ 3 implies k ≤ j − 1. Again, this v k = 0 by one of previous recursion steps.
(2) follows immediately from the well-known theory of solutions around a Fuchsian singular point.
(1) is the well-known fact about the Cauchy problem in the regular case.

Thomé solutions
By the so-called Frobenius method, if z 0 is a Fuchsian singularity and ρ 1 , ρ 2 are its indices such that ρ 1 − ρ 2 ∈ Z, then solutions of the equation (2.2) are spanned by two convergent power series indexed by i = 1, 2 with v i,0 = 0: If ρ 1 − ρ 2 ∈ Z this is not always true. One can then assume that ρ 1 − ρ 2 ≥ 0. There exists one solution as above with i = 1 and the second has the form If the singular point is not Fuchsian, then we can also look for solutions in a similar form, however the resulting power series are usually no longer convergent. One obtains the so-called Thomé solutions. Note that in some way the situation is simpler, because we do not have the logarithmic case. On the other hand, half-integer ranks need to be treated separately and lead to power series in √ z.
The two formal solutions have the form Here denotes the sum where the index k within its range runs over both integers and half-integers. We have Proof . For simplicity, assume that z 0 = 0. Suppose that Rk(A, 0) is an integer ≥ 2. By Proposition 2.1(1) we can transform the equation to a grounded form in two distinct ways. By Proposition 2.2(3), the grounded form has a solution in terms of the power series.
If Rk(A, 0) = m + 1 2 is a half-integer ≥ 3 2 , first we reduce the equation to the form with a half-integer rank, see Proposition 2.1(2). Then we apply the quadratic transformation, as described in Section 2.5. We obtain an even equation in √ z of the rank 2m, withp −2m = 0 and q −4m = 0. We already know that it has a solution of the form described in 1: Clearly, (2.23) with √ z replaced by − √ z is also a solution. By (2.24) both solutions are not proportional to one another. This proves (2.3).
Note that Proposition 2.3 is also true in the Fuchsian case, except that for Rk(A, z 0 ) = 1, one has to make an obvious modification in the logarithmic case, and for Rk(A, z 0 ) = 1 2 (2.3) does not have to be true.
In the Fuchsian case w i,0 , i = 1, 2, coincide with the indices of z 0 . In what follows, the numbers w i,0 , i = 1, 2, will be called indices of z 0 in the general case as well. We also introduce the alternative notation Proposition 2.4. Let z 0 be a singularity of A.

1.
We have 3. If z 0 ∈ C is grounded, then Proof .
(1) Without loss of generality we can assume that z 0 = 0. When we apply sandwiching with e r , where r(z) has the form (2.11), then p −1 and ρ i are transformed into p −1 − 2w 0 and ρ i + w 0 . This does not affect the identity (2.26). Assume first that Rk(A, 0) is an integer. Then by a sandwiching transformation we can reduce the equation to a grounded form at 0. The first m recurrence relations of (2.18) read then Apart from the solution w k+1 = 0, k = −m, . . . , −1, this is solved by Assume next that Rk(A, 0) is a half integer equal m + 1 2 . After an appropriate sandwiching transformation we can assume that Rk(A, 0) = rk(A, 0). Then we can apply the quadratic transformation (2.13) obtaining an equatioñ A = ∂ 2 y +p(y)∂ y +q(y).
Letρ i , i = 1, 2 be the indices ofÃ at zero. Now rk Ã , 0 = 2m, which is an integer. Hence we can apply the formula (2.26) This ends the proof (2.26).

Nonlogarithmic singularities
Let z 0 be a singular point of the equation (2.2). We say that z 0 is nonlogarithmic or apparent iff all solutions of the equation are meromorphic around this singularity. If z 0 is a nonlogarithmic Fuchsian singular point, then both its indices are integers.
The following proposition shows how to deform a given equation so that one obtains an additional nonlogarithmic singularity with indices 0, 2. This deformation depends on two parameters λ, µ: the additional singularity is located at λ, and solutions of the deformed equation satisfy µv(λ) = v (λ). It will play the central role in the derivation of Painlevé equations from Heun class equations in Section 4.
Proposition 2.5. Let σ, τ , η be analytic at λ and σ(λ) = 0. Let µ ∈ C. Then all solution of the equation given by are analytic at λ. Thus the equation given by (2.28) has a nonlogarithmic singularity at z = λ.
We have σ(λ) = 0. Hence the first line implies v 1 = µv 0 . Then the second line is identically zero, and v 2 is left unspecified. The next terms yield recurrence relations for v n , n = 3, . . . .
where p(z), q(z) are rational functions. If z 1 , . . . , z k ∈ C ∪ {∞} are its singularities and their ranks are m 1 , . . . , m k , then we will say that the equation (3.1) is of type (m 1 m 2 · · · m k ) Often we will need a more precise description of (3.1), which gives information what is the rank of the singularity at ∞. We will then put it at the end of the sequence, so that z k = ∞, and precede it with a semicolon. We will write that (3.1) is of type (m 1 m 2 · · · m k−1 ; m ∞ ).
By writing m i instead of m i we will mean the rounded rank. We will use it especially often for 1. Thus 1 means a Fuchsian singularity 1 or 1 2 . Every equation having no more than n + 1 singular points in the Riemann sphere, all of them Fuchsian and at most n finite, is given by an operator of the form where z 1 , . . . , z n are distinct points in C. The family of equations (3.2) will be called the M n type. The corresponding symbol is 1 · · · 1 n−1 times ; 1 .
Each finite singularity has at least one index equal 0 if and only if c 1 = · · · = c n−1 = 0. Thus such equations are given by operators 3) The family of equations given by (3.3) will be called the grounded M n type. We say that a differential equation belongs to the M n class if it is given by where σ, τ , ξ are polynomials satisfying We will often use the shorthand where η does not have to be a polynomial. We say that a differential equation belongs to the grounded M n class if it is given by where σ, τ , η are polynomials satisfying The name "the M n class" is borrowed from Lay-Slavyanov [25]. 1. The M n type is contained in the M n class. An equation of the M n class is of the M n type iff σ possesses n distinct roots.

2.
The grounded M n type is contained in the grounded M n class. An equation of the grounded M n class is of the grounded M n type iff σ possesses n distinct roots.
We will often represent M n class equations by operators obtained by multiplying (3.4) or (3.6) from the right by σ(z): Obviously, M n class equations and operators are defined by coefficients of the polynomials σ, τ , ξ. Therefore, they form a complex manifold parameterized by (3.10) The condition saying that σ has n distinct roots defines an open dense subset in (3.10). Thus the M n type is an open dense subset of the M n class. Hence the M n class consists of the M n type and its limiting points in the topology of (3.10). These limiting points are traditionally called confluent cases.
Similarly, grounded M n class equations and operators are defined by σ, τ , η. Therefore, they form a complex manifold parameterized by Clearly, the grounded M n type is an open dense subset of the grounded M n class. One can say that the grounded M n class consists of the grounded M n type and its confluent cases.

Generalized Fuchs relation
Recall that for any singular point z 0 of an equation A we defined its two indices ρ z 0 ,1 and ρ z 0 ,2 . For Fuchsian singularities they were defined in (2.4), (2.5) and for non-Fuchsian singularities in (2.25). If all singularities are regular then the well-known Fuchs relation says that the sum of all indices equals the number of singularities minus 2. In the following proposition we describe its generalization which is valid if some of the singularities are non-Fuchsian. (3.11) Proof . Without loss of generality we can assume that z k = ∞. We have where (3.12) and (3.13) follows from Proposition 2.4. Summing up the above three relations we obtain (3.11).

Riemann class equations
The simplest nontrivial M n class is the M 2 class. We call it the Riemann class since it consists of the Riemann equation with one singularity at ∞ and its confluent cases. Thus Riemann class operators have the form (3.4), where The grounded Riemann class operators has the form (3.6), where Note that grounded Riemann class equations appear in the literature very often. They are often called hypergeometric type equations, see [2,4,18].
It is well known that by a division by a constant, transformations z → az + b, sandwiching with powers and exponentials all Riemann class operators can be transformed into one of the following types:

Heun class equations
M 3 type equations were studied by Heun in [8]. Therefore, it is natural to call the M 3 type the Heun type. Consequently, the M 3 class will be called the Heun class. The grounded M 3 class will be called the grounded Heun class.
Our terminology is consistent with [24,25]. However, in some publications the name Heun class is used to denote what we call the grounded Heun class, see, e.g., [5].
We will represent Heun class equations by Heun class operators. More precisely, we will say that is a Heun class operator if η(z) = ξ(z) σ(z) and σ, τ , ξ are polynomials such that (3.14) is a grounded Heun class operator if σ, τ , η are polynomials such that If in addition σ has 3 distinct roots, then (3.14) is a (grounded) Heun type operator. Clearly, the Heun class and the grounded Heun class are preserved by transformations z → az + b.
Heun class operators are invariant with respect to swapping a finite singularity with the infinity. More precisely, Heun class operators of the form (3.14) after the transformations w = (z − z 0 ) −1 , where z 0 is one of finite singular points remain in the Heun class. Indeed, without loss of generality, we can suppose that z 0 = 0. Thus σ(0) = 0, so that σ(z) = zρ(z), where ρ is a polynomial with deg ρ ≤ 2. Substitute w = z −1 , which transforms (3.14) into It is easy to see that Note that we do not need to put any prefactor in (3.16). Remarkably, the analogous property does not hold for the M n classes with n = 3: for them after swapping a finite singularity with ∞ an additional prefactor is needed.
Swapping a finite singularity with ∞ is possible also if we want to stay within the grounded Heun class, except that the transformation w = (z − z 0 ) −1 needs to be followed by sandwiching with a power, that is a transformation (2.8). Indeed, assume (3.9) is a grounded Heun class operator and z 0 = 0 is a singularity. Let α satisfy the generalized indicial equation at z = ∞: Clearly, (3.18) is a grounded Heun class operator.

Deformed Heun class equations
Consider σ, τ , η satisfying the conditions (3.15), so that (3.14) is a Heun class operator. Let λ, µ ∈ C. The corresponding deformed Heun class operator is defined as By Proposition 2.5, the equation defined by (3.19) has a nonlogarithmic singularity at z = λ with indices 0, 2. All the remaining finite singularities have the same type (the rank, the indices), as for the original Heun class operator (3.14). Thus to every Heun class operator (3.14) there corresponds a family of deformed Heun class operators (3.19) depending on two new parameters: λ and µ. Note that one of the parameters of η in the original operator (2.28) is lost -(3.19) does not depend on the free (zeroth order) term of η.
The family of deformed Heun class operators is preserved by the same transformations as the family of Heun class operators. Clearly, it is preserved by z → az + b, division by a constant and sandwiching with powers and exponentials, as described in (2.8), (2.9) and (2.10).

Classification of Heun class equations
In this subsection we discuss two classifications of Heun class equations and operators.
The first is based on the rank of singularities. We classify half-integer and integer ranks separately, except for the rank 1, where we use, as usual, the rounded rank. Not counting the types reducible to the Riemann class, which are treated as "trivial", it partitions the Heun class into ten types.
There exists also a coarser classification, which uses rounded singularity ranks. It groups the ten nontrivial types of the Heun class into five supertypes.
In the following list we give both classifications of the Heun class: • (standard) Heun or (1111).
In the above list we use names similar to those proposed by [25]. Some of the types in this list have two distinct varieties, which are equivalent by swapping a finite singularity with infinity. The variety where the higher rank singularity is put at ∞ is sometimes called the natural. For instance, (112) has the natural variety (11; 2) and the alternative variety (21; 1).
For some varieties we give more than one normal form -they are labelled a) and b).
In the following theorem we describe normal forms of various types of Heun class operators. Note that there is some arbitrariness in the choice of a normal form. We allow the following transformations: z → az + b, division by a constant, sandwiching with powers and exponentials. Theorem 3.6. Each Heun class operator can be transformed into a Riemann class operator or one of the following normal forms: In the above table c denotes an arbitrary nonzero constant.
Proof . If σ has 3 distinct roots, it can be transformed to z(z−1)(z−t), t = 0, 1. By sandwiching with powers at each finite singularity we can make one of indices 0. Then η becomes a polynomial and deg η ≤ 1. We obtain the normal form of (111; 1). Let σ have degree 2 and 2 distinct roots. It can be transformed to z(z − 1). At each finite singularity we can make one of indices 0. Then η becomes a polynomial and deg η ≤ 2. By the transformation e −κz · e κz with κ solving κ 2 + a 2 κ + b 2 = 0 we can make b 2 = 0. If a 2 = 0 we obtain the normal form of (11; 2).
Assume that a 2 = 0. If b 1 = 0, we get the 2 F 1 operator, which belongs to the Riemann class. Otherwise we obtain the normal form of 11; 3 2 . Let σ have degree 2 and one root. It can be transformed to z 2 . We have By e −κz · e κz with κ solving κ 2 + a 2 κ + b 2 = 0 we can kill b 2 . By e κz −1 · e −κz −1 with κ solving Let a 0 = 0. By scaling we can make a 0 = 1. Then by z −λ · z λ with λ = −b −1 we can kill b −1 , keeping a 0 = 1. If a 2 = 0, we obtain the normal form of (2; 2). If a 2 = 0 and b 1 = 0, we obtain 2 F 0 or Euler II type, both of the Riemann class. If a 2 = 0 and b 1 = 0, we obtain the normal form of 2; 3 2 . Let a 0 = 0. If a 2 = 0, by scaling we can make a 2 = 1 Then by z −λ · z λ with λ = −b 1 we can kill b 1 keeping a 2 = 1. We obtain the normal form of 3 2 ; 2 . Let a 0 = a 2 = 0. If b 1 = b −1 = 0, the operator is of the Riemann class. If b −1 = 0, b 1 = 0, then with z −λ ·z λ we kill b 0 and we obtain z z∂ 2 z +a 1 ∂ z +b 1 . The operator in brackets can be reduced to the F 1 operator. If b 1 = 0, b −1 = 0, we similarly kill b 0 obtaining 1 z z 3 ∂ 2 z + a 1 z 2 ∂ z + b −1 . The operator in brackets, after the transformation z → 1 z can be transformed to a F 1 operator. If b −1 , b 1 = 0 we apply z −λ · z λ with λ = − a 1 2 to kill a 1 . We obtain the normal form of 3 2 ; 3 2 . Let σ have degree 1. It can be transformed to z. One of indices at 0 can be made 0. Then η becomes a polynomial of degree ≤ 3. By applying e −κz 2 · e κz 2 with κ = we can kill b 3 . If a 2 = 0, applying e −κz · e κz with κ = − b 2 a 2 we kill b 2 . By scaling we can make a 2 = 1 and we obtain the normal form of (1; 3). If a 2 = 0 and b 2 = 0, by applying e −κz · e κz with κ = −a 1 we kill a 1 . If b 2 = 0, by scaling we can make b 2 = 1 and we obtain the normal form of 1; 5 2 . If b 2 = 0, by applying e −κz · e κz with κ solving we obtain an operator which can degenerate to the 1 F 1 , 0 F 1 or Euler I type, all of the Riemann class.
If σ has degree 3 and only 1 root, it can be transformed to z 3 . Then z → z −1 yields σ(z) = z.
Remark 3.7. The operators listed in the table of Theorem 3.6 as 1; 3 2 and 3 2 ; 1 are strictly speaking not of the Riemann class: they are z times an operators of the Riemann class. Hence they yield equations of the Riemann class. So they can be considered as "trivial" and were ignored in the table at the beginning of the subsection.

Method of isomonodromic deformations
Let us review the theory of isomonodromic deformations of linear second order differential equations following [12,19,20]. We shall use a notation similar to [19].
Let p, q be rational functions of z, depending on some parameters. Among these parameters we single out a parameter t. We will write v for ∂ ∂z v andv for ∂ ∂t v. Consider a family of linear second order differential equations of the form v (z) + p(z)v (z) + q(z)v(z) = 0. (4.1) We assume that when we deform the equation (4.1), we can also deform its certain solution v so that the following condition is satisfied: This essentially means that when we deform the equation, its solutions "live" on the same Riemann surface. In particular, if there are singularities, then one should expect that the monodromy of solutions stays the same. The compatibility of (4.1) and (4.2) imposes a strong condition on the deformation. Indeed, Differentiating (4.1) once in t and (4.2) twice in z we geṫ Equating (4.4) and (4.3) we obtaiṅ When applying this method to a concrete family of equations one needs to divide its parameters into two categories. The first category should contain all parameters responsible for the monodromy around singular points. For example, the coefficients p −1 and q −2 of the Laurent series of p, resp. q around singular points. In the second category we have parameters that do not influence the monodromy, typically denoted µ, λ, t. The variable t is called the "time variable".

Isomonodromic deformations in presence of a non-logarithmic singularity
Let σ, τ , η be rational functions. (At the moment we do not assume the conditions (3.15) for the Heun class). Consider the differential equation given by We assume that σ, τ , η depend on a parameter t. Let λ, µ be additional parameters. Following the prescription of (2.28), we introduce the deformed equation corresponding to (4.7): The following theorem is devoted to monodromic deformations of (4.8). It unifies a large family of cases in a single formulation. Unfortunately, this unification has one drawback: relatively complicated conditions (4.9), (4.10) and (4.11) constraining the choice of the time variable t and the auxiliary polynomial c. Probably this drawback is impossible to avoid. The main results of our paper, described in the next subsection, will be corollaries of Theorem 4.1.  c(t, λ, z) is a t, λ-dependent polynomial of degree ≤ 2. Suppose that the following conditions are satisfied: .
Define the compatibility functions Then the following equations for λ, μ are equivalent to the compatibility conditions (4.6) and (4.5).
The proof of Theorem 4.1 is deferred to Appendixes A.1, A.2 and A.3.

Isomonodromic deformations of Heun class equations
This subsection contains the main results of our paper. We will suppose that σ is a polynomial of degree ≤ 3, τ is a polynomial of degree ≤ 2 and ησ is a polynomial of degree ≤ 4. In other words, we will assume that (4.7) is a Heun class equation. We will show that Theorem 4.1 can be applied to a large family of Heun class equations, including normal forms of all its types. As a result we obtain all types of Painlevé equation.
Our main results will be formulated in two theorems. In Theorem 4.2 we still try to give a unified treatment. More precisely, we consider two closely related ansatzes, which we call A and B. Ansatz A is applicable if σ has a zero. Ansatz B can be used if the degree of σ is ≤ 2. The time variable is not specified, it is only constrained by certain conditions. In Theorem 4.3 the time variable is always explicit. Unfortunately, it seems impossible to do it in a unified way -we are compelled to consider 5 distinct cases. (Note that 5 is still less than the number of types of Heun class equations. Besides, some of these cases are applicable to more than one type).
Theorem 4.2. Case A. Assume that s ∈ C and σ(s) = 0, so that we can write σ(z) = (z−s)ρ(z) for a polynomial ρ of degree ≤ 2. We assume that σ, τ , η depend on t. Let m be a function of t satisfying the following conditions Define the compatibility functions and the Hamiltonian Then λ, µ satisfy the Hamilton equations with respect to H, that is if and only if (4.6) and (4.5) hold.

and the Hamiltonian
Note that it is possible to unify the formulas (4.18) and (4.21) for the Hamiltonian in a single formula using the polynomial c from (4.22) and (4.23): Ansatzes A and B of Theorem 4.2 will still be subdivided into several subcases that differ by the choice of the time variable. All these subcases are described in Theorem 4.3 below, which together with Theorem 4.2 describes the main result of our paper.
The main subcase of Ansatz A is A1, where the time variable is the position of a nondegenerate zero of σ. This is of course generically true, however there are situations when σ does not have nondegenerate zeros. Subcases Ap and Aq can be applied when σ has a degenerate (that is, at least double) zero.
In Subcases Ap and Bp time is contained in the function p 0 (the coefficient of the first order term) of (4.7) and in Aq and Bq it is contained in q 0 . Subcases Ap and Bp are typically used when the rank at ∞ is an integer. Subcases Aq and Bq are more appropriate for degenerate types, when the rank at ∞ is half-integer.
In the following theorem, first we describe σ, τ and η that belong to a given subcase, specifying explicitly the dependence on t. Next we write the corresponding (undeformed) Heun class operator in the principal form. Then we give the corresponding compatibility functions a, b and the Hamiltonian H.
Note also that the union of subcases of Theorem 4.3 does not cover the whole Heun class. However, it covers all appropriately interpreted normal forms listed in Theorem 3.6. This will be further discussed in the following subsection.
Remark 4.4. In our applications we will sometimes use rescaled versions of the above constructions. In fact, if = 0, we replace t with t and multiply a, b, H with , then the above theorem remains true.

Correspondence between Heun class and Painlevé equations
Traditionally, Painlevé equations are divided into 6 types: Painlevé I-VI. However, one can argue that some of their degenerate cases should be treated as separate types. Thus Painlevé V (5.1) splits into the nondegenerate Painlevé V with δ = 0 and the degenerate Painlevé V with δ = 0. We denote the former simply by ndeg-V and the latter by deg-V. One can show that deg-V Painlevé is equivalent to Painlevé III , however it is natural to treat it as a separate type. All that is explained in Section 5.2.
With Painlevé III (5.5) the situation is more complicated. First of all, following various authors, we prefer to use the Painlevé III equation, which is equivalent to Painlevé III by a simple transformation. Beside the nondegenerate case we have the degenerate case and the doubly degenerate case. We denote them respectively, ndeg-III , deg-III and ddeg-III . Ohyama-Okumura denote them D . One can also consider an alternative degenerate case γ = 0, δ = 0, which is however equivalent to deg-III . Ohyama In the first column we give the name of the Heun class type. For typographical reasons we abbreviate "nondegenerate" to ndeg, "degenerate" to deg, "doubly degenerate" to ddeg and "doubly" to db.
In the second column we give the symbol of the type in terms of the ranks of singularities. We also indicate which singularity is at ∞. In several cases there are two possibilities -we give both of them.
In the third column we indicate subcases of Theorem 4.3 which can be applied to certain normal forms of a given type. Normal forms are taken from the table in Theorem 3.6. If in that table more than one normal form is given, a) or b) indicates which normal form is considered. (In some cases, the normal forms from Theorem 3.6 need to be slightly modified: When we apply A1 to the form b) of (111; 1) we change the roles of the roots; for (11; 2) and (1; 3) we shift one root from 0 to t; finally for (21; 1) and 11; 3 2 we shift a root from 1 to t.) In the fourth column we give the name of the Painlevé type that can be obtained by the isomonodromic deformation.
In the fifth column we list the symbol in terms of ranks of singularities without the indication of the position of ∞. We will often use it in the sequel as the name of the given type of the Painlevé equation. Thus, e.g., the Painlevé 3 2 2 equation is an alternative name for the degenerate Painlevé III equation. We will actually prefer these names to the traditional ones, similarly as Slavyanov-Lay in [25].
Occasionally, we will also use the names for Painlevé equation involving the position of ∞. For instance, the Painlevé 3 2 ; 2 equation will mean the form of the degenerate Painlevé III equation obtained from the Heun 3 2 ; 2 equation. The Painlevé 2; 3 2 equation will denote the equation obtained from the Heun 2; 3 2 equation. Both forms of Painlevé equation are equivalent. We will discuss further the classification of Painlevé equations in Section 5, where we will see how to group the 10 types into 5 supertypes, parallel to the grouping of 10 types of Heun class equations into 5 supertypes.
In the following subsections we describe how to obtain all types of Painlevé equations from deformed Heun class equations. First we give the functions σ, τ , η describing one of possible normal forms of a given type of the Heun class equation. We indicate explicitly the dependence of σ, τ , η on the time variable t. Then we present this equation in its principal form. Next we give the corresponding deformed equation. Next we give the compatibility functions a, b and the Painlevé Hamiltonian. Finally, we describe the resulting Painlevé equation.
Note that the whole procedure is determined by σ, τ , η, by the choice of the time variable t and the functions a, b. The latter are restricted by Theorem 4.3. We always indicate which case of Theorem 4.3 we use.
In our derivations we follow the paper of Ohyama-Okumura [19]. We have slightly changed their notation for some of the parameters. We parametrize the equations by the differences of indices at singular points of the deformed equation. In particular, if the rounded rank at z 0 is 1, the parameter is called κ z 0 , if the rank is 2, it is called χ z 0 and if the rank is 3 it is called θ z 0 .
One of the parameters of the initial Heun class equation -the free term in η -does not enter in the deformed equation, and therefore is not used by [19]. We denote it simply by c.
Note that there is some arbitrariness in the choice of Hamiltonians, where a term depending on t, but not on λ, µ, can always be added. We always choose Hamiltonians coinciding with those of [19].
If in a given type σ has a root of multiplicity Heun ; 7 2 equation: Deformed Heun ; 7 2 equation: .
5 Five supertypes of Painlevé equation

Overview of five supertypes
Recall that the ten types of the Heun class equation can be grouped into five supertypes, as described in Section 3.6. The ten types of Painlevé equation can be also grouped into five supertypes. There is an exact correspondence between the supertypes of Heun class and Painlevé equations: • Painlevé VI or (1111).
In what follows we discuss this classification. We describe the minimal set of parameters that can be used in a given type and various equivalences. In our discussion we try to include the Hamiltonian aspect, whenever it is possible.
The above classification of Painlevé equation was pointed out by Ohyama-Okumura, see the beginning of Section 2 of [19]. (In that reference the authors use the word "type" both for what we call "supertype" and "type".) The discussion in [19], however, concentrated on the second order equations. Less space was devoted to the Hamiltonian form of the five supertypes.
The first supertype is Painlevé VI or (1111), which contains only one type. All the four remaining supertypes contain at least two types. We discuss them in the following subsections.
In each of the following subsections we start with a general form of the given supertype of the Painlevé equation. It will be indicated by . It always has the form The corresponding differential (nonlinear) operator will be denoted We also introduce the corresponding Hamiltonian H(t, λ, µ). Both P (t, λ) and H(t, λ, µ) depend on several parameters, put as subscripts. Next we give the scaling properties of the equation and the Hamiltonian. Then we list various nontrivial types that belong to a given supertype, marking them with * . Finally, we discuss the relationship between various types. In particular, show how to reduce the number of parameters using scaling.
Each supertype contains one generic type, which we call non-degenerate. Besides, it may contain one or more degenerate types. The Hamiltonian that covers the non-degenerate type, does not always allow us to describe all types that belong to a given supertype. This can be viewed as a drawback of the Hamiltonian approach.

Painlevé V or (112)
As noted in [19], the usual form of the Painlevé V equation, depending on 4 parameters, should be treated not as a single type, but as a supertype. It is invariant with respect to a scaling transformation. It includes two nontrivial types: nondegenerate V depending on 3 parameters and degenerate V depending on 2 parameters. There exists also a trivial type, solvable in quadrature.
Let us discuss special cases: • Let δ = 0. In the Hamiltonian form it corresponds to η = 0. By scaling we can set δ = − 1 2 , and in the Hamiltonian form η = 1. We obtain the Painlevé (112) equation and Hamiltonian.
Note that the corresponding 2nd order equation does not depend on the parameter χ 1 . On the Hamiltonian level it can be seen by using the canonical transformationμ = µ − χ 1 −1 2(λ−1) , which transforms (5.4) into where the dependence on χ 1 remains only in the free term.
Remark 5.1. It is well known that the Painlevé deg-V or 11 3 2 and ndeg-III or (22) equations are equivalent [19]. Below we will show this by describing a canonical transformation that connects the corresponding Hamiltonians.
Let us insert the canonical transformatioñ into the (22) Hamiltonian (5.6). We obtain which after appropriate identification of parameters coincides with the 11 3 2 Hamiltonian (5.3) up to a free term.

Painlevé III or (22)
As noted in [19], the usual Painlevé III equation, depending on 4 parameters, should be treated as a supertype. It is invariant with respect to two distinct scaling transformations. It includes 3 nontrivial types: nondegenerate III depending on 2 parameters, degenerate III (in two forms) depending on 1 parameter, doubly degenerate III with no parameters. There are also trivial forms solvable in quadratures.
It is solvable by quadratures by Section B.3.
It is solvable by quadratures by Section B.3.