On two and three periodic Lyness difference equations

We describe the sequences {x_n}_n given by the non-autonomous second order Lyness difference equations x_{n+2}=(a_n+x_{n+1})/x_n, where {a_n}_n is either a 2-periodic or a 3-periodic sequence of positive values and the initial conditions x_1,x_2 are as well positive. We also show an interesting phenomenon of the discrete dynamical systems associated to some of these difference equations: the existence of one oscillation of their associated rotation number functions. This behavior does not appear for the autonomous Lyness difference equations.


Introduction and main result
This paper fully describes the sequences given by the non-autonomous second order Lyness difference equations where {a n } n is a k-periodic sequence taking positive values, k = 2, 3, and the initial conditions x 1 , x 2 are as well positive. This question is proposed in [4,Sec. 5.43]. Recall * Acknowledgements. GSD-UAB and CoDALab Groups are supported by the Government of Catalonia through the SGR program. They are also supported by MCYT through grants MTM2008-03437 (first and second authors) and DPI2008-06699-C02-02 (third author).
that non-autonomous recurrences appear for instance as population models with a variable structure affected by some seasonality [10,11], where k is the number of seasons. Some dynamical issues of similar type of equations have been studied in several recent papers [1,8,9,12,14,16,17].
Recall that when k = 1, that is a n = a > 0, for all n ∈ N, then (1) is the famous Lyness recurrence which is well understood, see for instance [2,18]. The cases k = 2, 3 have been already studied and some partial results are established. For both cases it is known that the solutions are persistent near a given k-periodic solution, which is stable. This is proved by using some known invariants, see [14,16,17]. Recall that in our context it is said that a solution {x n } n is persistent if there exist two real positive constants c and C, which depend on the initial conditions, such that for all n ≥ 1, 0 < c < x n < C < ∞. We prove: Theorem 1. Let {x n } n be any sequence defined by (1) and k ∈ {2, 3}. Then it is persistent. Furthermore, either (a) the sequence {x n } n is periodic, with period a multiple of k; or (b) the sequence {x n } n densely fills one or two (resp. one, two or three) disjoint intervals of R + when {a n } n is 2-periodic (resp. 3-periodic). Moreover it is possible by algebraic tools to distinguish which is the situation.
Our approach to describe the sequences {x n } n is based on the study of the natural dynamical system associated to (1) and on the results of [6]. The main tool that allows to distinguish the number of intervals for the adherence of the sequences {x n } n is the computation of several resultants, see Section 4.
It is worth to comment that Theorem 1 is an extension of what happens in the classical case k = 1. There, the same result holds but in statement (b) only appears one interval. Our second main result will prove that there are other more significative differences between the case k = 1 and the cases k = 2, 3. These differences are related with the lack of monotonicity of certain rotation number functions associated to the dynamical systems given by the Lyness recurrences, see Theorem 3. The behaviors of these rotation number functions are important for the understanding of the recurrences, because they give the possible periods for them, see [2,3,18].
On the other hand in [9,17] it is proved that, at least for some values of {a n } n , the behaviour of {x n } n for the case k = 5 is totally different. In particular unbounded positive solutions appear. In the forthcoming paper [7] we explore in more detail the differences between the cases k = 1, 2, 3 and k ≥ 4.
This paper is organized as follows: Section 2 presents the difference equations that we are studying as discrete dynamical systems and we state our main results on them, see Theorems 2 and 3. Section 3 is devoted to the proof of Theorem 2. By using it, in Section 4, we prove Theorem 1 and we give some examples of how to apply it to determine the number of closed intervals of the adherence of {x n } n . In Section 5 we demonstrate Theorem 3 and we also present some examples where we study in more detail the rotation number function of the dynamical systems associated to (1).

Main results from the dynamical systems point of view
In this section we reduce the study of the sequence {x n } n to the study of some discrete dynamical systems and we state our main results on them.
First we introduce some notations. When k = 2, set a n = a for n = 2ℓ + 1, and when k = 3, set where ℓ ∈ N and a > 0, b > 0 and c > 0.
We also consider the maps F α (x, y), with α ∈ {a, b, c}, as defined on the open invariant set Q + := {(x, y) : Consider for instance k = 2. The sequence given by (1), can be seen as Hence the behavior of (4) can be obtained from the study of the dynamical system defined in Q + by the map: Similarly, for k = 3 we can consider the map: a + bx + y + cxy y (a + y) .
Notice that both maps have an only fixed point in Q + , which depends on a, b (and c), that for short we denote by p.
It is easy to interpret the invariants for (1) and k = 2, 3, given in [12,14], in terms of first integrals of the above maps, see also Lemma 6. We have that is a first integral for F b,a and V c,b,a (x, y) := cx 2 y + axy 2 + bx 2 + by 2 + (a + bc)x + (c + ab)y + ac xy , is a first integral for F c,b,a . The topology of the level sets of these integrals in Q + as well as the dynamics of the maps restricted to them is described by the following result, that will be proved in Section 3.
Once a result like the above one is established the study of the possible periods of the sequences {x n } n given by (1) is quite standard. It suffices, first to get the rotation interval, which is the open interval formed by all the rotation numbers given by the above theorem, varying the level sets of the first integrals. Afterwards, it suffices to find which are the denominators of all the irreducible rational numbers that belong to the corresponding interval, see [3,5,18].
The study of the rotation number of these kind of rational maps is not an easy task, see again [2,3,5,18]. In particular, in [2] was proved that the rotation number function parameterized by the energy levels of the Lyness map F a , a = 1, is always monotonous, solving a conjecture of Zeeman given in [18], see also [15]. As far as we know, in this paper we give the first simple example for which this rotation number function is neither constant nor monotonous. We prove: Theorem 3. There are positive values of a and b, such that the rotation number function ρ b,a (h) of F b,a associated to the closed ovals of {V b,a = h} ⊂ Q + has a local maximum.
Hence, apart from the known behaviors for the autonomous Lyness maps, that is global periodicity or monotonicity of the rotation number function, which trivially holds for F b,a , taking for instance a = b = 1 or a = b = 1, respectively, there appear more complicated behaviors for the rotation number function.
Our proof of this result relies on the study of lower and upper bounds for the rotation number of F b,a on a given oval of a level set of V b,a given for some (a, b) ∈ (Q + ) 2 and This can be done because the map on this oval is conjugated to a rotation and it is possible to use an algebraic manipulator to follow and to order a finite number iterates on it, which are also given by points with rational coordinates. So, only exact arithmetic is used. A similar study could be done for F c,b,a .

Proof of Theorem 2
Proof of (i) of Theorem 2. The orbits of F b,a and F c,b,a lie on the level sets V b,a = h and V c,b,a = h respectively. These level sets can be seen as the algebraic curves given by and C 3 := {c 3 (x, y) = cx 2 y + axy 2 + bx 2 − hxy + by 2 + (a + bc)x + (c + ab)y + ac = 0}, respectively.
Taking homogeneous coordinates on the projective plane P R 2 both curves C 2 and C 3 have the form In order to find the branches of them tending to infinity, we examine the directions of approach to infinity (z = 0) in the local charts determined by x = 1 and y = 1 respectively.
In the local chart given by x = 1, the curve C writes as and it meets the straight line at infinity z = 0 when y(S + T y) = 0. Since for both curves C 2 and C 3 the coefficients S and T are positive, the only intersection point that could give points in Q + is (y, z) = (0, 0). The algebraic curve C arrives to (y, z) = (0, 0) tangentially to the line Sy + U z = 0. Since for both curves, C 2 and C 3 , the coefficients S and U are also positive, we have that the branches of the level sets tending to infinity are not included in Q + .
An analogous study can be made in the chart given by y = 1, obtaining the same conclusions.
Moreover, it can be easily checked that in the affine plane both curves C 2 and C 3 do not intersect the part of the axes x = 0 and y = 0 which is in the boundary of Q + .
In summary, there are no branches of the curves C 2 and C 3 tending to infinity or crossing the axes x = 0 and y = 0 in Q + , and therefore the connected components of C i ∩ Q + for i = 2, 3 are bounded. Notice that this result in particular already implies the persistence of the sequences given by (1).
Consider k = 2. We claim the following facts: (a) In Q + , the set of fixed points of F b,a and the set of singular points of C 1 coincide and they only contain the point p = (x ,ȳ ).
, has a local minimum at p.
We remark that item (b) is already known. We present a new simple proof for the sake of completeness.
From the above claims and the fact that the connected components of the level sets of Let us prove the above claims. The fixed points of F b,a are given by and so x 2 = x(y 2 − b). Hence in Q + , we have that x = y 2 − b and the above system is It is not difficult to check that the last system of equations is precisely the one that gives the critical points of the curves V a,b = h. Moreover, from the first equation it is necessary uniqueness of the critical point holds.
Let us prove that this critical point corresponds with a local minimum of V b,a . We will check the usual sufficient conditions given by the Hessian of V b,a at p.
Secondly, the determinant of the Hessian matrix at the points (y 2 − b, y) is A tedious computation shows that f (y) = q(y)P (y) + r(y), with Observe that ifȳ is the positive root of P (y), then sign(h(ȳ)) = sign(r(ȳ)). Taking into and, on this interval, there is only one critical point of P (y), which is simple, we get that , as we wanted to prove.
The same kind of arguments work to end the proof for the case k = 3, but the computations are extremely more tedious. We only make some comments.
The fixed points of F c,b,a in Q + are given by: .
It can be proved again that they coincide with the singular points of V c,b,a in Q + . This fact follows from the computation of several suitable resultants between ∂V c,b,a /∂x, ∂V c,b,a /∂y The uniqueness of the fixed point p in Q + can be shown as follows: since Q(x) > 0 implies that x > 1, we only need to search solutions of Since P (0) < 0; lim z→+∞ P (z) = +∞; and the Descarte's rule, we know that there is only one positive solution, as we wanted to see.
Finally it can be proved that p is a non-degenerated local minimum of V c,b,a . These computations are complicated, and they have been performed in a very smart way in [14], so we skip them and we refer the reader to this last reference.

Proof of (ii) of Theorem 2
In [6] it is proved a result that characterizes the dynamics of integrable diffeomorphisms having a Lie Symmetry, that is a vector field X such that X(F (p)) = (DF (p)) X(p). Next theorem states it, particularized to the case we are interested. (b) There exists a smooth function µ : U → R + such that for any z ∈ U, Then the map Φ restricted to each Γ h is conjugated to a rotation with rotation number Next lemma is one of the key points for finding a Lie symmetry for families of periodic maps, like the 2 and 3-periodic Lyness maps.
Lemma 5. Let {G a } a∈A be a family of diffeomorphisms of U ⊂ R 2 . Suppose that there exists a smooth map µ : U → R such that for any a ∈ A and any z ∈ U, the equation µ(G a (z)) = det(DG a (z)) µ(z) is satisfied. Then, for every choice a 1 , . . . , a k ∈ A, we have Proof. It is only necessary to prove the result for k = 2 because the general case follows easily by induction. Consider a 1 , a 2 ∈ A then µ(G a 2 ,a 1 (z)) = µ(G a 2 • G a 1 (z)) = det(DG a 2 (G a 1 (z))) µ(G a 1 (z)) = = det(DG a 2 (G a 1 (z))) det(DG a 1 (z)) µ(z) = det(D(G a 2 • G a 1 (z))) µ(z) = = det(DG a 2 ,a 1 (z))µ(z), and the lemma follows.
Proof of (ii) of Theorem 2. From part (i) of the theorem we know that the level sets of V b,a and V c,b,a in Q + \ {p} are diffeomorphic to circles. Moreover these functions are first integrals of F b,a and F c,b,a , respectively. Notice also that for any a, the Lyness map F a (x, y) = (y, a+y x ) satisfies µ(F a (x, y)) = det(DF a (x, y))µ(x, y), with µ(x, y) = xy. Hence, by Lemma 5, a (x, y))µ(x, y) and µ(F c,b,a (x, y)) = det(DF c,b,a (x, y))µ(x, y).
Thus, from Theorem 4, the result follows.
It is worth to comment that once part (i) of the theorem is proved it is also possible to prove that the dynamics of F b,a (resp. F c,b,a ) restricted to the level sets of V b,a (resp. V c,b,a ) is conjugated to a rotation by using that they are given by cubic curves and that the map is birational, see [13]. We prefer our approach because it provides a dynamical interpretation of the rotation number together with its analytic characterization.

Proof of Theorem 1
In order to prove Theorem 1 we need a preliminary result. Consider the maps F b,a and Lemma 6. With the above notations: (F a (x, y))).
Proof of Theorem 1. We split the proof in two steps. For k = 2, 3 we first prove that there are only two types of behaviors for {x n } n , either this set of points is formed by kp points for some positive integer p, or it has infinitely many points whose adherence is given by at most k intervals. Secondly, in this later case, we provide an algebraic way for studying the actual number of intervals.
First step: We start with the case k = 2. With the notation introduced in (2), it holds that where (x 1 , x 2 ) ∈ Q + and n ≥ 1. So the odd terms of the sequence {x n } n are contained in the projection on the x-axis of the oval of {V b,a (x, y) = V b,a (x 1 , x 2 ) = h} and the even terms in the corresponding projection of {V a,b (x, y) = V a,b (F a (x 1 , x 2 )) = h}, where notice that we have used Lemma 6.
Recall that the ovals of V b,a are invariant by F b,a and the ovals of V a,b are invariant by Similarly when k = 3 the equalities where n ≥ 1, allow to conclude that each term x m , of the sequence {x n } n where we use the notation (3) Then, gives a two periodic recurrence {x n } n .
Then we have to compute the resultant of the above polynomials with respect to x. It always decomposes as the product of two quartic polynomials in h. Its expression is very large, so we only give it when a = 3 and b = 1/2. It writes as 625 65536 4h 4 − 1176h 3 + 308h 2 + 287380h + 1816975 p 4 (h).
It has four real roots, two for each polynomial. Some further work proves that the one that interests us is the smallest one of p 4 .
The values h * and h * * are roots of two polynomials of degree 8 with integer coefficients that can be explicitly given.

Some properties of the rotation number function
From Theorem 2 it is natural to introduce the rotation number function for F b,a : where h c := V b,a (p), as the map that associates to each invariant oval {V b,a (x, y) = h}, the rotation number ρ b,a (h) of the function F b,a restricted to it. The following properties hold: This can be proved from the tools introduced in [5, Sec. 4].
(ii) The value ρ b,a (h c ) is given by the argument over 2π of the eigenvalues (which have modulus one due to the integrability of F b,a ) of the differential of F b,a at p.
Since ψ preserves the orientation, the rotation number functions of F a,b and F b,a restricted to the corresponding ovals must coincide.
Similar results to the ones given above hold for F c,b,a and its corresponding rotation number function. Some obvious differences are:  We already know that the restriction of F 2,3 to the given oval is conjugated to a rotation, with rotation number ρ := ρ 2,3 (34) that we want to estimate. This can be done by counting In fact when we say that ρ 2,3 (34) ∈ (ρ low , ρ upp ), the value ρ low is the upper lower bound obtained by following all the considered points of the orbit, and ρ upp is the lowest upper bound. Notice that taking 1000 or 3000 points we have obtained the same lower bound for ρ 2,3 (34).
Let us prove Theorem 3 by using the above approach.
Proof of Theorem 3. Consider a = 1/2, b = 3/2 and the three points  Figure 3 we also plot the upper and lower bounds of    Consider the set of parameters Γ = {(a, b), ∈ [0, ∞) 2 }, where notice that we also consider the boundaries a = 0 or b = 0, where the map F b,a is well defined. We already know that the rotation number function behaves equal at (a, b) and (b, a). Moreover we know perfectly its behavior on the diagonal (a, a) (when a < 1 it is monotonous decreasing and when a > 1 it is monotonous increasing) and that ρ 1,1 (h) ≡ 4/5 and ρ 0,0 (h) ≡ 2/3. Hence a good strategy for an numerical exploration can be to produce sequences of experiments using our algorithm by fixing some a ≥ 0 and varying b. For instance we obtain: • Case a = 1/2. For all the values of b > 0 considered, the rotation number function seems to tend to 3/5 when h goes to infinity. Moreover it seems