Symmetry, Integrability and Geometry: Methods and Applications A Quasi-Lie Schemes Approach to Second-Order Gambier Equations ⋆

A quasi-Lie scheme is a geometric structure that provides t-dependent changes of variables transforming members of an associated family of systems of first-order differential equations into members of the same family. In this note we introduce two quasi-Lie schemes for studying second-order Gambier equations in a geometric way. This allows us to study the transformation of these equations into simpler canonical forms, which solves a gap in the previous literature, and other relevant differential equations, which leads to derive new constants of motion for families of second-order Gambier equations. Additionally, we describe general solutions of certain second-order Gambier equations in terms of particular solutions of Riccati equations, linear systems, and t-dependent frequency harmonic oscillators.


Introduction
Apart from their inherent mathematical interest, differential equations are important due to their use in all branches of science [41,50]. This strongly motivates their analysis as a means to study the problems they model. A remarkable approach to differential equations is given by geometric methods [47], which have resulted in powerful techniques such as Lax pairs, Lie symmetries, and others [48,49].
A particular class of systems of ordinary differential equations that have been drawing some attention in recent years are the so-called Lie systems [1,9,33,46,54,56]. Lie systems form a class of systems of first-order differential equations possessing a superposition rule, i.e. a function that enables us to write the general solution of a first-order system of differential equations in terms of a generic collection of particular solutions and some constants to be related to initial conditions [7,18].
The theory of Lie systems furnishes many geometric methods for studying these systems [6,17,19,21,22,26,27,56]. For instance, superposition rules can be employed to simplify the use This paper is a contribution to the Special Issue "Symmetries of Differential Equations: Frames, Invariants and Applications". The full collection is available at http://www.emis.de/journals/SIGMA/SDE2012.html of numerical techniques for solving differential equations [56], and the theory of reduction of Lie systems reduces the integration of Lie systems on Lie groups to solving Lie systems on simple Lie groups [6,19].
The classification of systems admitting a superposition rule is due to Lie. His result, the nowadays called Lie-Scheffers theorem, states that a system admits a superposition rule if and only if it describes the integral curves of a t-dependent vector field taking values in a finitedimensional Lie algebra of vector fields. The existence of such Lie algebras on R and R 2 was analysed by Lie in his famous work [45]. More recently, the topic was revisited by Olver and coworkers [28], who clarified a number of details that were not properly described in the previous literature.
Despite their interesting properties, Lie systems have a relevant drawback: there exist just a few Lie systems of broad interest [36]. Indeed, the Lie-Scheffers theorem and, more specifically, the classification of finite-dimensional Lie algebras of vector fields on low dimensional manifolds [28,45] clearly show that that being a Lie system is the exception rather than the rule. This has led to generalise the theory of Lie systems so as to tackle a larger family of remarkable systems [2,3,9,36]. In particular, we henceforth focus on the so-called quasi-Lie schemes. These recently devised structures [15,20] have been found quite successful in investigating transformation and integrability properties of differential equations, e.g. Abel equations, dissipative Milne-Pinney equations, second-order Riccati equations, and others [9]. In addition, the obtained results are useful so as to research on the physical and mathematical problems described through these equations.
In this work, we study the second-order Gambier equations by means of the theory of quasi-Lie schemes. We provide two new quasi-Lie schemes. Their associated groups [15] give rise to groups of t-dependent changes of variables, which are used to transform second-order Gambier equations into another ones. Such groups allow us to explain in a geometric way the existence of certain transformations reducing a quite general subclass of second-order Gambier equations into simpler ones. Our approach provides a better understanding of a result pointed out in [30]. As a byproduct, we show that the procedure given in the latter work does not apply to every second-order Gambier equation, which solves a gap performed in there.
We provide conditions for second-order Gambier equations, written as first-order systems, to be mapped into Lie systems via t-dependent changes of variables induced by our quasi-Lie schemes. This is employed to determine families of Gambier equations which can be transformed into second-order Riccati equations [31], Kummer-Schwarz equations [4,5] and Milne-Pinney equations [25]. These results are employed to derive, as far as we know, new constants of motion for certain second-order Gambier equations. Moreover, the description of their general solutions in terms of particular solutions of t-dependent frequency harmonic oscillators, linear systems, or Riccati equations is provided [9,29].
The structure of our paper goes as follows. Section 2 addresses the description of the fundamental notions to be employed throughout our work. Section 3 describes a new quasi-Lie scheme for studying second-order Gambier equations. In Section 4 this quasi-Lie scheme is used to analyse the reduction of second-order Gambier equations to a simpler canonical form [30]. By using the theory of quasi-Lie systems, we determine in Section 5 a family of second-order Gambier equations that can be mapped into second-order Kummer-Schwarz equations. The investigation of constants of motion for some members of the previous family is performed in Section 6. In Section 7 we describe the general solutions of a family of second-order Gambier equations in terms of particular solutions of other differential equations. We present a second quasi-Lie scheme for investigating second-order Gambier equations in Section 8, and conditions are given to be able to transform these equations into second-order Riccati equations. Those second-order Gambier equations that can be transformed into second-order Riccati equations are integrated in Section 9. Finally, Section 10 is devoted to summarising our main results.

Fundamentals
Let us survey the fundamental results to be used throughout the work (see [15,16,17,18] for details). In general, we hereafter assume all objects to be smooth, real, and globally defined on linear spaces. This simplifies our exposition and allows us to avoid tackling minor details.
Given the projection π : (t, x) ∈ R × R n → x ∈ R n and the tangent bundle projection τ : TR n → R n , a t-dependent vector field on R n is a mapping X : R × R n → TR n such that τ • X = π. This condition entails that every t-dependent vector field X gives rise to a family {X t } t∈R of vector fields X t : x ∈ R n → X(t, x) ∈ TR n and vice versa. We call minimal Lie algebra of X the smallest real Lie algebra V X containing the vector fields {X t } t∈R . Given a finitedimensional R-linear space V of vector fields on R n , we write V (C ∞ (R)) for the C ∞ (R)-module of t-dependent vector fields taking values in V .
An integral curve of X is a standard integral curve γ : R → R × R n of its suspension, i.e. the vector field X = ∂/∂t + X(t, x) on R × R n . Note that the integral curves of X of the form γ : t ∈ R → (t, x(t)) ∈ R × R n are the solutions of the system the referred to as associated system of X. Conversely, given such a system, we can define a t-dependent vector field on R n [16] whose integral curves of the form (t, x(t)) are the solutions to (2.1). This justifies to write X for both a t-dependent vector field and its associated system. We call generalised flow a map g : (t, x) ∈ R × R n → g t (x) ∈ R n such that g 0 = Id R n . Every t-dependent vector field X can be associated with a generalised flow g satisfying that the general solution of X can be written in the form x(t) = g t (x 0 ) with x 0 ∈ R n . Conversely, every generalised flow defines a vector field by means of the expression [15] Generalised flows act on t-dependent vector fields [18]. More precisely, given a generalised flow g and a t-dependent vector field X, we can define a unique t-dependent vector field, g X, whose associated system has general solutionx(t) = g t (x(t)), where x(t) is the general solution of X. In other words, every g induces a t-dependent change of variablesx(t) = g t (x(t)) transforming the system X into g X. Indeed, g can be viewed as a diffeomorphismḡ : (t, x) ∈ R × R n → (t, g t (x)) ∈ R × R n , and it can easily be proved that g X is the only t-dependent vector field such that g X =ḡ * X, whereḡ * is the standard action of the diffeomorphismḡ on vector fields (see [18]).
Among all t-dependent vector fields, we henceforth focus on those whose associated systems are Lie systems. The characteristic property of Lie systems is to possess a superposition rule [7,18,46]. A superposition rule for a system X on R n is a map Φ : (u (1) , . . . , u (m) ; k 1 , . . . , k n ) ∈ (R n ) m × R n → Φ(u (1) , . . . , u (m) ; k 1 , . . . , k n ) ∈ R n allowing us to write its general solution x(t) as for a generic family of particular solutions x (1) (t), . . . , x (m) (t) and a set of constants k 1 , . . . , k n to be related to initial conditions. The celebrated Lie-Scheffers theorem [46,Theorem 44] states that a system X possesses a superposition rule if and only if it is a t-dependent vector field taking values in a finitedimensional real Lie algebra of vector fields, termed Vessiot-Guldberg Lie algebra [34,53]. In other words, X is a Lie system if and only if V X is finite-dimensional [9]. This is indeed the main reason to define V X [14].
To illustrate the above notions, let us consider the Riccati equation [35] dx are arbitrary functions of time. Its general solution, x(t), can be obtained from an expression [38,56] x where k is a real number to be related to the initial conditions of every particular solution, are three different particular solutions of (2.2) and Φ : That is, the Riccati equations admit a superposition rule. Therefore, from the Lie-Scheffers Theorem, we infer that the t-dependent vector field X associated to a Riccati equation is such that V X is finite-dimensional. Indeed, Taking into account that X 1 = ∂/∂x, X 2 = x∂/∂x, X 3 = x 2 ∂/∂x span a finite-dimensional real Lie algebra V of vector fields and X t = b 1 (t)X 1 +b 2 (t)X 2 +b 3 (t)X 3 , we obtain that {X t } t∈R ⊂ V and V X becomes a (finite-dimensional) Lie subalgebra of V .
The Lie-Scheffers theorem shows that just some few first-order systems are Lie systems [9,36]. For instance, this theorem implies that all Lie systems on the real line are, up to a change of variables, a particular case of a linear or Riccati equation [55]. Therefore, many other important differential equations cannot be studied through Lie systems (see [9] for examples of this). In order to treat non-Lie systems, new techniques generalising Lie systems need to be developed. We here focus on the theory of quasi-Lie schemes [15,20].
Definition 2.1. Let W , V be finite-dimensional real vector spaces of vector fields on R n . We say that they form a quasi-Lie scheme S(W, V ) if: • W is a vector subspace of V .
• W is a Lie algebra of vector fields, i.e. [W, W ] ⊂ W .
Associated to each quasi-Lie scheme, we have the C ∞ (R)-modules W (C ∞ (R)) and V (C ∞ (R)) of t-dependent vector fields taking values in W and V , respectively. Now, from the Lie algebra W , we define the group G(W ) of generalised flows of t-dependent vector fields taking values in W , the so-called group of the scheme. The relevance of this group is due to the following theorem [15]. In other words, the elements of the group of a scheme provide t-dependent changes of variables that transform systems of V (C ∞ (R)) into systems of this family. Roughly speaking, we can understand this group as a generalisation of the t-independent symmetry group of a system: apart from transforming the initial system into itself, the transformations of the group of a scheme also may transform the initial system into one of the "same type". For instance, given a Lie system X associated with a Vessiot-Guldberg Lie algebra V , then S(V, V ) becomes a quasi-Lie scheme. The group G(V ) allows us to transform X into a Lie system with a Vessiot-Guldberg Lie algebra V . This can be employed, for example, to transform Riccati equations into Riccati equations that can be easily integrated, giving rise to methods to integrate Riccati equations.
In order to illustrate previous notions, we now turn to proving that quasi-Lie schemes allow us to cope with Abel equations of first-order and first kind [11], i.e.
with b 1 (t), . . . , b 4 (t) being arbitrary t-dependent functions. Indeed, if we fix W = ∂/∂x, x∂/∂x , it can be proved that S(W, V ) and V = ∂/∂x, x∂/∂x, x 2 ∂/∂x, x 3 ∂/∂x is a quasi-Lie scheme and X ∈ V (C ∞ (R)) for every X related to an Abel equation (2.3). The elements of G(W ) transform Abel equations into Abel equations and geometrically recover the usual t-dependent changes of variables used to study these equations. This was employed in [11] to describe integrability properties of Abel equations. Given a quasi-Lie scheme S(W, V ), certain systems in V (C ∞ (R)) can be mapped into Lie systems admitting a Vessiot-Guldberg Lie algebra contained in V . This enables us to study the transformed system through techniques from the theory of Lie systems and, undoing the performed transformation, to obtain properties of the initial system under study [15].
Definition 2.2. Let S(W, V ) be a quasi-Lie scheme and X a t-dependent vector field in V (C ∞ (R)), we say that X is a quasi-Lie system with respect to S(W, V ) if there exists a generalised flow g ∈ G(W ) and a Lie algebra of vector fields V 0 ⊂ V such that g X ∈ V 0 (C ∞ (R)).

A new quasi-Lie scheme for investigating second-order Gambier equations
The Gambier equation [30,32] can be described as the coupling of two Riccati equations in cascade, which can be given in the following form where n is an integer, σ is a constant, which can be scaled to 1 unless it happens to be 0, and a 0 , a 1 , a 2 are certain functions depending on time. The precise form of the coefficients of the Gambier equation is determined by singularity analysis, which leads to some constraints on a 0 , a 1 and a 2 [30]. For simplicity, we hereafter assume a 0 (0) = 0. Nevertheless, all our results can easily be generalised for the case a 0 (0) = 0. If n = 0, we can eliminate y between the two equations above, which gives rise to the referred to as second-order Gambier equation [32,39,40,44], i.e.
The importance of second-order Gambier equations is due to their relations to remarkable differential equations such as second-order Riccati equations [31,35], second-order Kummer-Schwarz equations [5,16] and Milne-Pinney equations [32]. Additionally, by making appropriate limits in their coefficients, Gambier equations describe all the linearisable equations of the Painlevé-Gambier list [32]. Several particular cases of these equations have also been studied in order to analyse discrete systems [40].
Particular instances of (3.1) have already been investigated through the theory of Lie systems and quasi-Lie schemes. For instance, by fixing n = −2, σ = a 1 = 0, and a 0 to be a constant, the second-order Gambier equation (3.1) becomes a second-order Kummer-Schwarz equation (KS2 equation) [5,16] where we have written c 0 = −a 2 0 /4, with c 0 a non-positive constant, and ω(t) = −a 2 (t) so as to keep, for simplicity in following procedures, the same notion as used in the literature, e.g. in [16]. The interest of KS2 equations is due to their relations to other differential equations of physical and mathematical interest [16,24,32]. For instance, for x > 0 the change of variables y = 1/ √ x transforms KS2 equations into Milne-Pinney equations, which frequently occur in cosmology [32]. Meanwhile, the non-local transformation dy/dt = x maps KS2 equations into a particular type of third-order Kummer-Schwarz equations, which are closely related to Schwarzian derivatives [4,16,43]. Additionally, KS2 equations can be related, through the addition of the new variable dx/dt = v, to a Lie system associated to a Vessiot-Guldberg Lie algebra isomorphic to sl(2, R), which gave rise to various methods to study its properties and related problems [16].
If we now assume n = 1 and σ = 0 in (3.1), it results which is a particular case of second-order Riccati equations [23,31] that has been treated through the theory of quasi-Lie schemes and Lie systems in several works [10,13,29]. Furthermore, equations of this type have been broadly investigated because of its appearance in the study of the Bäcklund transformations for PDEs, their relation to physical problems, and the interest of the algebraic structure of their Lie symmetries [8,23,31,37,42]. In view of the previous results, it is natural to wonder which kind of second-order Gambier equations can be studied through the theory of quasi-Lie schemes. To this end, let us build up a quasi-Lie scheme for analysing these equations.
As usual, the introduction of the new variable v ≡ dx/dt enables us to relate the second-order Gambier equation (3.1) to the first-order system which is associated to the t-dependent vector field on TR 0 , with R 0 ≡ R \ {0}, given by termed henceforth the Gambier vector field. To obtain a quasi-Lie scheme for studying the above equations, we need to find a finite-dimensional R-linear space V G such that X ∈ V G (C ∞ (R)) for all a 0 , a 1 , a 2 , σ and n. Observe that X can be cast in the form with b 1 , . . . , b 10 being certain t-dependent functions whose form depends on the functions a 0 , da 0 /dt, a 1 , a 2 and the constants σ and n. More specifically, these functions read For convenience, we further define the vector field which, although does not appear in the decomposition (3.3), will shortly become useful so as to describe the properties of Gambier vector fields. In view of (3.3), it easily follows that we can choose V G to be the space spanned by Y 1 , . . . , Y 11 . It is interesting to note that the linear space V G is not a Lie algebra as [Y 3 , Y 6 ] does not belong to V G . Moreover, as there is no finite-dimensional real Lie algebra V ⊃ V G such that X ∈ V (C ∞ (R)). Hence, X is not in general a Lie system, which suggests us to use quasi-Lie schemes to investigate it.
To determine a quasi-Lie scheme involving V G , we must find a real finite-dimensional Lie Table 1, we can do so by setting In other words, we have proved the following proposition providing a new quasi-Lie scheme to study Gambier vector fields and, as shown posteriorly, second-order Gambier equations.
for every Gambier vector field X.
Recall that Y 11 is not necessary so that every Gambier vector field takes values in V G . Hence, why it is convenient to add it to V G ? One reason can be found in Table 1 In turn this gives rise to a larger group G(W G ), which will be of great use in following sections.

Transformation properties of second-order Gambier equations
Remind that Theorem 2.1 states that the t-dependent changes of variables associated to the elements of the group G(W ) of a quasi-Lie scheme S(W, V ) establish bijections among the tdependent vector fields taking values in V . This may be of great use so as to transform their associated systems into simplified forms, e.g. in the case of Abel equations [11]. We next show how this can be done for studying the transformation of second-order Gambier equations into simpler ones whose corresponding coefficients a 1 vanish [30]. This retrives known results from a geometrical viewpoint and shows that certain second-order Gambier equations cannot be transformed into simpler ones, solving a small gap performed in [30].
As the vector fields in W G span a finite-dimensional real Lie algebra of vector fields on TR 0 , there exists a local Lie group action ϕ : G × TR 0 → TR 0 whose fundamental vector fields are the elements of W G . By integrating the vector fields of W G (see [12] for details), the action can easily be written as The theory of Lie systems [9,17] states that the solutions of a system associated to a t-dependent vector field taking values in the real Lie algebra W G are of the form (x(t), v(t)) = ϕ(h(t), (x 0 , v 0 )), with h(t) being a curve in T d with h(0) = e. Therefore, every g ∈ G(W G ) can be written as g t (·) = ϕ(h(t), ·) for a certain curve h(t) in G with h(0) = e. Conversely, given a curve h(t) in T d with h(0) = e, the curve (x(t), v(t)) = ϕ(h(t), (x 0 , v 0 )) is the general solution of a system of W G (C ∞ (R)), which leads to a generalised flow g t (·) = ϕ(h(t), ·) of G(W G ) [9,17]. Hence, the elements of G(W G ) are generalised flows of the form for h(t) any curve in T d with h(0) = e. Observe that every h(t) is a matrix of the form where α(t), δ(t) and γ(t) are t-dependent functions such that α(0) = δ(0) = 1 and γ(0) = 0, because h(0) = e, and α(t) > 0, δ(t) > 0 as h(t) ∈ T d for every t ∈ R. Hence, every element of G(W G ) is of the form Theorem 2.1 implies that for every g ∈ G(W G ) and Gambier vector field X ∈ V G (C ∞ (R)), we have g X ∈ V G (C ∞ (R)). More specifically, a long but straightforward calculation shows that where the functionsb α =b α (t), with α = 1, . . . , 11, arē Let us use this so as to transform the initial Gambier vector field into another one that is related, up to a t-reparametrisation τ = τ (t), to a second-order Gambier equation with τ -dependent coefficientsā 0 ,ā 1 ,ā 2 , a constantσ and an integer numbern. Additionally, we imposeā 1 = 0 in order to reduce our initial first-order Gambier equation into a simpler one. In this way, we have for a certain non-vanishing function ξ(t) = dτ /dt. Therefore,b 4 =b 9 =b 11 = 0, i.e.
As we want our method to work for all values of σ, e.g. σ = 0, equation (4.6) implies As δ > 0, the above equation involves that a 1 = 0 for n = 2. In other words, we cannot transform a Gambier vector field with a 1 = 0 into a new one withā 1 = 0 through our methods if n = 2 and σ = 0. In view of this, let us assume that n = 2. From (4.5) and (4.8), and using again that δ > 0, we infer that dδ/dt = 0. As δ(0) = 1, then δ = 1. Plugging the value of δ into (4.7) and (4.8), we obtain which fixes the form of g mapping a system X into (4.4). Bearing previous results in mind, we see that the non-vanishing t-dependent coefficients (4.3) becomē Comparing this and (4.4), we see that to transform the initial first-order Gambier equation into a new one through a t-dependent change of variables (4.1) and a t-reparametrisation dτ = αdt requires ξ = α. The resulting system reads Therefore, redefiningn = n,ā 0 = a 0 /α 2 andσ = σ, we obtain that the above system is associated to a second-order Gambier equation withā 1 = 0. Meanwhile, as g induces a tdependent change of variables given bȳ we see that this t-dependent change of variables can be viewed as a t-dependent change of variablesx = αx along with a t-reparametrisation t → τ such thatv = dx/dτ . Indeed, Furthermore, these transformations map the initial second-order Gambier equation with n = 2 into a new one withā 1 = 0, i.e. depending only on two functionsā 0 andā 2 and the constants σ and n. We can therefore formulate the following result. into a second-order Gambier equation whose a 1 vanishes and n, σ remain the same.
In the above proposition, we excluded second-order Gambier equations with n = 2 as we noticed that in this case the proof of this proposition does not hold: we cannot transform an initial Gambier vector field with σ = 0 and a 1 = 0 into a new one withā 1 = 0. Moreover, it is easy to see that the transformation provided in Proposition 4.1 does not exist for n = 2 and a 1 = 0. This was not noticed in [30], where this transformation is wrongly claimed to transform any Gambier equation into a simpler one with a 1 = 0. In view of this, we cannot neither ensure, as claimed in [30], that second-order Gambier equations are not given in their simplest form.

Quasi-Lie systems and Gambier equations
The theory of quasi-Lie schemes mainly provides information about quasi-Lie systems, which can be mapped to Lie systems through one of the transformations of the group of a quasi-Lie scheme. This allows us to employ the techniques of the theory of Lie systems so as to study the obtained Lie systems, and, undoing the performed t-dependent change of variables, to describe properties of the initial system [15].
Motivated by the above, we determine and study the Gambier vector fields X ∈ V (C ∞ (R)) which are quasi-Lie systems relative to S(W G , V G ). This task relies in finding triples (g, X, V 0 ), with g ∈ G(W G ) and V 0 being a real Lie algebra included in V G in such a way that g X ∈ V 0 (C ∞ (R)).
One of the key points to determine quasi-Lie systems is to find a Lie algebra V 0 . In the case of Gambier vector fields, this can readily be obtained by recalling that certain instances of second-order Gambier equations, e.g. (3.2), are particular cases of KS2 equations. By adding a new variable v ≡ dx/dt to (3.2), the resulting first-order system becomes a Lie system (see [16]) related to a three-dimensional Vessiot-Guldberg Lie algebra V 0 ⊂ V G of vector fields on TR 0 spanned by i.e.
Consequently, it makes sense to look for Gambier vector fields X ∈ V (C ∞ (R)) that can be transformed, via an element g ∈ G(W G ), into a Lie system g X ∈ V 0 (C ∞ (R)), i.e.
for certain t-dependent functions f , g and h. Comparing the expression of g X given by (4.3) and the above, we find that g X ∈ V 0 (C ∞ (R)) if and only if Using the first condition above, the relation (5.4), and taking into account that α(0) = δ(0) = 1 and δ, α > 0, we see that Using the second equality in (5.5), we obtain which fixes c 0 in terms of a coefficient of the initial second-order Gambier equation.
Proposition 5.1. A Gambier vector field X is a quasi-Lie system relative to S(W G , V G ) that can be transformed into a Lie system taking values in a Lie algebra of the form V 0 if and only if a 0 a 1 = da 0 /dt, n = −2 and σ = 0. Under these conditions, the constant c 0 appearing in X 3 becomes c 0 = −a 0 (0) 2 /4. Additionally, a transformation g(α(t), γ(t), δ(t)) ∈ G(W G ) maps X into g X ∈ V 0 (C ∞ (R)) if and only if α 2 /δ = a 0 /a 0 (0). More specifically, g X reads The above proposition allows us to determine the transformations g ∈ G(W G ) ensuring that a Gambier vector field and its related second-order Gambier equation can be mapped, maybe up to a t-reparametrisation, into a new Gambier vector field related to a KS2 equation. Indeed, from (3.2), we see that to do so, we need to impose for a certain function ω(t) and a function ξ(t) such that ξ(t) = 0 for all t ∈ R. Comparing (5.6) with the above expression, we see that which, in view of the fact that g α(t),γ(t),δ(t) satisfies , (5.8) enables us to determine the searched transformations. In fact, fixed a non-vanishing t-dependent function α with α(0) = 1, the above conditions determine the values of δ and γ of g. Now, a t-dependent reparametrisation transforms the system associated to g X into a new system related to X 3 + ω(t(τ ))X 1 , where ω is given by Proposition 5.2. Every Gambier vector field X satisfying a 0 a 1 = da 0 /dt, n = −2 and σ = 0 is a quasi-Lie system relative to S(W G , V G ) that can be transformed into a Lie system associated to X 3 + ω(t)X 1 , with c 0 = −a 0 (0) 2 /4 and ω(t) given by (5.10), through a transformation g α(t),γ(t),δ(t) ∈ G(W G ), whose coefficients are given by any solution of (5.7) and (5.8), and the t-dependent reparametrisation (5.9).
x = αx,v = γx + δv, and, in view of the first condition in (5.7), we see that From this and Proposition 5.2, we obtain the following proposition about second-order Gambier equations.
Corollary 5.1. Every second-order Gambier equation of the form can be mapped into a KS2 equation where α(t) is any positive function with α(0) = 1, and a t-reparametrisation τ (t) with dτ = α/δdt, with δ and γ being determined from α by the relations

Constants of motion for second-order Gambier equations
In this section, we obtain constants of motion for second-order Gambier equations. We do so by analysing the existence of t-independent constants of motion for systems g X ∈ V 0 (C ∞ (R)), with X being a Gambier vector field. By undoing the t-dependent change of variables g, this leads to determining constants of motion for a Gambier vector field X and its corresponding second-order Gambier equation. Let F : TR 0 → R be a t-independent constant of motion for g X, we have (g X) t F = 0 for all t ∈ R. This involves that F is a t-independent constant of motion for all successive Lie brackets of elements of {(g X) t } t∈R as well as their linear combinations. In other words, F is a common first-integral for the vector fields V g X ⊂ V 0 .
When ω(t) is not a constant, it can be verified that V g X = V 0 . Thus, if F is a first-integral for all these vector fields, it is so for all vector fields contained in the generalised distribution D p = (X 1 ) p , (X 2 ) p , (X 3 ) p , with p ∈ TR 0 . Hence, dF p ∈ D • p , i.e. dF p is incident to all vectors of D p . In this case, D p = T p TR 0 for a generic p ∈ TR 0 , which implies that dF p = 0 at almost every point. Since F is assumed to be differentiable, we have that F is constant on each connected component of TR 0 and g X has no non-trivial t-independent constant of motion.
If ω(t) = λ for a real constant λ, then dim D p = 1 at a generic point and it makes sense to look for non-trivial t-dependent constants of motion for g X. In view of (5.10), this condition implies The function F can therefore be obtained by integrating In employing the characteristics method [10], we find that F must be constant along the integral curves of the so-called characteristic system, namely Let us focus on the region with v = 0, i.e. O ≡ {(x, v) ∈ TR 0 | v = 0}. We obtain from the previous equations that Let us focus on the case x > 0; the other case can be obtained in a similar way and leads to the same result. Multiplying on right and left by v/x and defining w ≡ v 2 and z ≡ x 2 , we obtain As this equation is linear, its general solution can be easily derived to obtain for an arbitrary real constant ξ. From here, it results Consequently, F is any function of the form F = F (ξ), for instance, In principle, F was defined only on O. Nevertheless, as this region is an open and dense subset of TR 0 , and in view of the expression for F , we can extend it differentiably to TR 0 in a unique way. Since F is a constant of motion on O, it trivially becomes so on the whole TR 0 . Summarising, we have proved the following.
Theorem 6.1. A second-order Gambier equation admits a constant of motion of the form where λ is a real constant,x = αx andv = δdx/dt + γx, with α being a particular positive solution with α(0) = 1 of and γ, δ are determined from α by means of the conditions (5.13).
The above proposition can be employed to derive a constant of motion for certain families of second-order Gambier equations. For instance, if we start by a Gambier equation (6.1) with a 2 = −λa 2 0 /a 0 (0) 2 , for a certain real constant λ, then α = 1 is a solution of (6.3). In view of (5.13), γ = 0 and δ = a 0 (0)/a 0 . Therefore, Theorem 6.1 establishes that the second-order Gambier equation (6.1) admits a constant of motion Consider now a general second-order Gambier equation (6.1) and let us search for a constant of motion (6.2) with λ = 0. In this case, (6.3) can be brought into a Riccati equation where w ≡ d log α/dt, whose solutions can be investigated through many methods [19,22]. The derivation of a particular solution provides a constant of motion for the second-order Gambier equation (6.1) that can be obtained through the previous theorem. Additionally, this particular solution can be used to obtain the general solution of the Riccati equation [9,19], which in turns could be used to derive new constants of motion for the second-order Gambier equation (6.1). Note that all the above procedure depends deeply on the fact that λ is a constant. Recall that if λ is not a constant, then g X does not admit any t-independent constant of motion. Nevertheless, other methods can potentially be applied in this case. For instance, using that S(V 0 , V 0 ) is a quasi-Lie scheme, we can derive the group G(V 0 ) of this scheme and to use an element h ∈ G(V 0 ) to transform g X into other Lie system h g X of the same type, e.g. another of the form h g X = ξ 2 (t)(c 1 X 1 + c 2 X 2 + c 3 X 3 ), with c 1 , c 2 , c 3 ∈ R, the vector fields X 1 , X 2 , X 3 are those of (5.1), and ξ 2 (t) is any t-dependent nonvanishing function. As this system is, up to a t-parametrization, a t-independent vector field, it admits a local t-independent constant of motion. By inverting the t-dependent changes of variables h and g, it gives rise to a t-dependent constant of motion of X and the corresponding second-order Gambier equation.

Second-order Gambier and Milne-Pinney equations
Consider the KS2 equation (5.12) with x > 0 (we can proceed analogously for the case x < 0). The change of variables x = 1/y 2 , with y > 0, transforms it into a Milne-Pinney equation [52] These equations admit a description in terms of a Lie system related to a Vessiot-Guldberg Lie algebra isomorphic to sl(2, R) [12,56]. This was employed in several works to describe their general solutions in terms of particular solutions of the same or others differential equations, e.g. Riccati equations and t-dependent harmonic oscillators [9]. Previous results allow us to describe the general solution of (5.11) in terms of particular solutions of Riccati equations or t-dependent frequency harmonic oscillators. Indeed, in view of Corollary 5.1, these equations can be transformed into a KS2 equation through a t-dependent change of variablesx(t) = α(t)x(t) and a t-reparametrisation dτ = (α/δ) dt. In turn, y = 1/ √x transforms (5.12) into (7.1), whose general solution y(t) can be written as [12] y(τ ) = k 1 z 2 1 (τ ) + k 2 z 2 2 (τ ) + 2C(k 1 , k 2 , W )z 1 (τ )z 2 (τ ), where C 2 (k 1 , k 2 , W ) = k 1 k 2 + a 0 (0) 2 /(4W 2 ), the functions z 1 (τ ), z 2 (τ ) are two linearly independent solutions of the system d 2 z dτ 2 = −ω(t(τ ))z, and W is the Wronskian related to such solutions. Inverting previous changes of variables, the general solution for any second-order Gambier equation (6.1) reads Therefore, we have proved the following proposition: Proposition 7.1. The general solution of a second-order Gambier equation can be brought into the form where z 1 (τ ) and z 2 (τ ) are particular solutions of the τ -dependent harmonic oscillator and W = z 1 dz 2 /dτ − z 2 dz 1 /dτ , with dτ = α/δ dt and α, δ and γ certain t-dependent functions satisfying (5.13).
Many other similar results can be obtained in an analogous manner. For instance, the theory of Lie systems was also used in [12] to prove that the general solution of a Milne-Pinney equation (7.1) can be written as where x 1 (τ ), x 2 (τ ) and x 3 (τ ) are three different particular solutions of the Riccati equation Proceeding as before, we can describe the general solution of a second-order Gambier equation (7.2) in terms of solutions of these Riccati equations. In addition, by applying the theory of Lie systems [19] to Milne-Pinney equations (7.1), we can obtain many other results about subfamilies of second-order Gambier equations. In addition, the relation between second-order Gambier equations and Milne-Pinney equations enables us to obtain several other results in a simple way.
can be transformed into the integrable Milne-Pinney equation under the transformation x = 1/y 2 and a t-reparametrisation dτ = a 0 dt. Note 7.1. For second-order Gambier equations (5.11) with a 0 = 0, the transformations given in the above proposition map these equations into harmonic oscillators.
Proposition 7.3. A constant of motion of (7.4) is given by Using y = x −1/2 transformation, we obtain a constant of motion for the special second-order Gambier equation (7.3) of the form Thus, we say the special equation (7.3), which yields a constant of motion, is an integrable deformation of the Milne-Pinney equation.
Note 7.2. Recall that Theorem 6.1 can be applied to those equations (5.11) where a 2 = −λa 2 0 /a 2 0 (0) giving rise to the constant of motion (6.4). Observe that (7.3) is of this type with λ = −a 0 (0) 2 /2. Then, the constant of motion (6.4) is, up to a multiplicative constant, the same as (7.5). Despite this, the above illustrates how certain results can readily be obtained through Milne-Pinney equations.
Therefore, it is natural to analyse which Gambier vector fields X can be transformed through a quasi-Lie scheme into one of these Lie systems.
Despite the interest of the previous idea, the quasi-Lie scheme provided in the previous section cannot be employed to determine all quasi-Lie systems of this type. The reason is that V 0 is not included in V G and, therefore, there exists no g ∈ G(W G ) such that g X ∈ V 0 (C ∞ (R)) ⊂ V G (C ∞ (R)). To solve this drawback, we now determine a new quasi-Lie scheme S(W G , V G ) such that the space V G contains V G + V 0 . This can be done by defining V G as the R-linear space generated by the elements of V G and the vector fields Indeed, using Tables 1 and 2, we readily obtain that [W G , V G ] ⊂ V G . Moreover, as we already know that W G is a Lie algebra, S(W G , V G ) becomes a quasi-Lie scheme.
Since we impose that g X, which is given by (4.2), must be of the form (8.1) up to a treparametrisation, we obtain for a certain t-dependent non-vanishing function ξ(t). Taking into account that the vector fields Y 1 , . . . , Y 11 are linearly independent over R, we see that Bearing in mind the form of the coefficientsb α given by (4.3) and recalling that α > 0, we see thatb 2 = 0 entails n = 1. Meanwhile, conditionsb 5 = 0 andb 11 = 0 entail σ = 0 and respectively. In turn, σ = 0 also entails thatb 9 =b 10 = 0. Moreover, from (8.2) we also see that From these conditions and n = 1, σ = 0, we obtain Since δ, α > 0, it can readily be seen that the second equation is an immediate consequence of the first one, which in turn implies a 0 = −α 2 /δ. Using that δ(0) = α(0) = 1, we obtain a 0 (0) = −1. Previous results along with (8.3) ensure that the last condition in (8.4) holds. 5) and the remaining coefficientsb α are either zero or can be obtained from them.
Proposition 8.1. Every Gambier vector field X is a quasi-Lie system relative to the quasi-Lie scheme S(W G , V G ) and the Lie algebra V 0 if and only if n = 1, a 0 (0) = −1 and σ = 0. In such a case, every t-dependent transformation g ∈ G(W G ) given bȳ where dτ = −a 0 dt/α andb 1 ,b 4 andb 8 are given by (8.5).

Exact solutions for several second-order Gambier equations
As a result of Proposition 8.1, we can apply to (8.7) the techniques of the theory of Lie systems so as to devise, by inverting the change of variables (8.6), new properties of the Gambier equations related to second-order Riccati equations. For instance, we obtain new exact solutions of some of these families of second-order Gambier equations.
In the study of every Lie system, special relevance takes the algebraic structure of its Vessiot-Guldberg Lie algebras. When a Lie system possesses a solvable Vessiot-Guldberg Lie algebra, we can apply several methods to explicitly integrate it (cf. [9,13,19]). Otherwise, the general solution of the Lie system usually needs to be obtained through approximative methods [51] or expressed in terms of solutions of other Lie systems [12].
System (8.7) is a special case of a Lie system related to a Vessiot-Guldberg Lie algebra V 0 isomorphic to sl(3, R), which is simple and therefore difficult to integrate explicitly. Nevertheless, we can prove that (8.7) is in general related to a Vessiot-Guldberg Lie algebra that is a proper Lie subalgebra of V 0 . Moreover, we next prove that X is related to a solvable Vessiot-Guldberg Lie algebra in some particular cases that can be explicitly integrated.
The above Lie system is related to a Vessiot-Guldberg Lie algebra spanned by which close the same commutation relations as Z 1 , Z 3 , Z 1 + Z 5 and Z 6 . Hence, this system is related to a solvable Vessiot-Guldberg Lie algebra and it can easily be integrated: Since we can assume λ 1 y 1 (τ ) + λ 2 y 2 (τ ) + λ 3 y 3 (τ ) = τ τ we obtain the solution of (8.7) forb 4 = 0, i.e.
Note 9.1. Since equation (9.1) can be easily integrated, the above proposition shows that we can integrate exactly every second-order Gambier equation with n = 1, a 0 (0) = −1 and σ = 0.

Conclusions
Two quasi-Lie schemes have been introduced to analyse the second-order Gambier equations. Our first quasi-Lie scheme has been used to recover previous results concerning the reduction of such equations to reduced canonical forms from a geometric clarifying approach, which allowed us to fill a gap in the previous literature. This quasi-Lie scheme also led to determine some quasi-Lie systems related to certain second-order Gambier equations, which enabled us to transform them into second-order Kummer-Schwarz equations. We have expressed the general solutions of such second-order Gambier equations in terms of particular solutions of t-dependent frequency harmonic oscillators and Riccati equations. Additionally, new constants of motion were derived for some of them. The introduction of a second quasi-Lie scheme resulted in the description of an integrable family of second-order Gambier equations related to second-order Riccati equations.