{'fraction_non_alphanumeric': 0.037486102661995764, 'fraction_numerical': 0.013907826561221708, 'mean_word_length': 4.513763590099468, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 1, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Multiple scales and matched asymptotic expansions for the discrete logistic equation

In this paper, we combine the method of multiple scales and the method of matched asymptotic expansions to construct uniformly-valid asymptotic solutions to autonomous and non-autonomous difference equations in the neighbourhood of a period-doubling bifurcation. In each case, we begin by constructing multiple scales approximations in which the slow time scale is treated as a continuum variable, leading to difference-differential equations. The resultant approximations fail to be asymptotic at late time, due to behaviour on the slow time scale, it is necessary to eliminate the effects of the fast time scale in order to find the late time rescaling, but there are then no difficulties with applying the method of matched asymptotic expansions. The methods that we develop lead to a general strategy for obtaining asymptotic solutions to singularly-perturbed difference equations, and we discuss clear indicators of when multiple scales, matched asymptotic expansions, or a combined approach might be appropriate.


Multiple scales for difference equations
The method of multiple scales is extremely well established as an asymptotic method for analysing differential equations. As early as 1973, Nayfeh [24] was able to describe how the method of multiple scales had been applied to nonlinear oscillator theory, orbital mechanics, flight mechanics, buckling analysis, flutter, wave propagation (in both solids and fluids), dispersive waves, plasma physics, atmospheric science, and statistical mechanics (amongst other areas). The method of multiple scales has continued to be used extensively in the analysis of differential equations, and is covered in most standard texts and courses on perturbation methods (see, for example, [2,10,11,15,24]).
In contrast, the application of the method of multiple scales to difference equations is much less well-developed. While Hoppensteadt and Miranker [12] introduced the method of multiple scales for difference equations as early as 1977, there were relatively few developments in this area until the rediscovery of multiple scales (and the Poincaré-Lindstedt method) for difference equations by Luongo [17] and Maccari [18] in the 1990s, followed by the innovative recent work by van Horssen and ter Brake [13], and Rafei and van Horssen [25,26,27]. Very few texts on perturbation methods discuss difference equations in detail ( [2] and [11] being two notable exceptions), and Holmes [11] recently observed that there are still many open problems on the application of multiple scales to difference equations.
The essence of the method of multiple scales lies in replacing the original independent variable (or system of variables) with a new system that reflects the different scales over which important phenomena occur. In the analysis of the ordinary differential equation (ODE) for a weakly nonlinear oscillator, for example, the method of multiple scales involves transforming the ODE into a partial differential equation (PDE) with two independent time variables: one representing the fast time scale on which the oscillations take place, and the other representing the slow time scale on which the phase and amplitude of the oscillations evolve.
The method of multiple scales for an ordinary difference equation (O∆E) is essentially the same in that the original, discrete independent variable is replaced by multiple independent variables that reflect the different time scales inherent to the problem. However, there are two different approaches to slow time variables for difference equations in the present literature. One approach, introduced by Hoppensteadt and Miranker [12], involves treating the slow time variable as continuous and using Taylor expansions in the continuum variable to transform the original O∆E into a difference-differential equation (∆DE). The other approach, introduced by Subramanian and Krishnan [29] (but corrected by van Horssen and ter Brake [13]), involves treating the slow time variable as discrete, so that the O∆E is transformed into a partial difference equation (P∆E). Both approaches continue to be in current use: for applications involving a continuum slow time variable, see for example [14,17,18,19,21,22]; for applications involving a discrete slow time variable, see for example [25,26,27].
For a weakly nonlinear multiple scales problem, the leading-order problem in the slow time variable will often be nonlinear, even if the leading-order problem in the fast time variable is linear. Since a wider range of tools exist for solving nonlinear differential equations than nonlinear difference equations, it would seem that there are clear advantages to the Hoppensteadt-Miranker approach of treating the slow time variable as continuous. However, difference equationsespecially nonlinear difference equations -can behave very differently from their analogous differential equations (see [13] for examples), and important features of a difference equation might be lost if a continuum slow time variable is introduced. This motivates van Horssen and ter Brake [13] to avoid continuum variables altogether, instead introducing a discrete slow time scale so that the discrete character of the problem can be maintained throughout.
In this paper, we demonstrate by examples that a combination of the method of multiple scales with the method of matched asymptotic expansions can capture the subtleties of a nonlinear O∆E without the need for a discrete slow time variable and the challenges that this introduces. In [13], van Horssen and ter Brake are correct to observe that the O∆E obtained from discretising an ODE may behave very differently from the original ODE (e.g. the ODE may exhibit finitetime blow-up while the O∆E has a solution for all time). However, such discrepancies must also be associated with an asymptotic failure of the original multiple scales expansion, suggesting that they could be corrected using the method of matched asymptotic expansions. (For further discussion of this point, see Section 4.1.) We illustrate our method of combining the method of multiple scales with the method of matched asymptotic expansions by investigating the discrete logistic equation in the neighbourhood of a period doubling bifurcation, although the methods that we develop are more broadly applicable to singularly perturbed difference equations.

The discrete logistic equation
The discrete logistic equation takes the form where λ is a dimensionless parameter with 0 < λ ≤ 4. The discrete logistic equation is wellknown as a model of population dynamics with discrete generations, and it is commonly used as an archetypal example of a nonlinear difference equation that exhibits period-doubling to chaos as the bifurcation parameter, λ, is increased towards 4. For a detailed discussion of the bifurcation structure of the discrete logistic equation, see, for example, [20,23,28].
For all λ > 1, the discrete logistic equation has an equilibrium solutioñ When 1 < λ < 3, this equilibrium is stable. However, as λ increases through 3, this 1-periodic equilibrium becomes unstable in favour of a 2-periodic cycle that alternates between the values For 3 < λ < 1 + √ 6, this 2-periodic cycle is stable, and all trajectories with 0 < x(0) < 1 and x(0) =x(λ) converge to a cycle which alternates betweenx + andx − as n → ∞. At λ = 1 + √ 6, the 2-periodic cycle becomes unstable as a stable 4-periodic cycle appears, and the period doubling process continues as shown in Figure 1.
In general, it is difficult to analyse solution trajectories of the discrete logistic equation using asymptotic methods since (1) will be strongly nonlinear for most choices of λ and x(0). However, by picking x(0) to be close tox(λ) (or indeed, any periodic solution), (1) can be rescaled as a weakly nonlinear difference equation that is amenable to the method of multiple scales.
In Section 2, we take λ = 3 + ǫ, and select x(0) near the unstable equilibrium (2). We find that the 'plain' method of multiple scale only sees the escape from the unstable equilibrium atx, and that matched asymptotic expansions are required in order to describe the approach to the stable cycle atx ± . Then, in Section 3 we broaden our analysis to consider a non-autonomous nonlinear difference equation: the discrete logistic equation with a slowly varying bifurcation parameter.
In [1], Baesens uses the method of renormalisation to perform a comprehensive analysis of the discrete logistic equation with a slowly varying bifurcation parameter. Baesens considers a number of complications that are beyond the scope of the present work: [1] deals with backward sweep as well as forward sweep, gives results for the number of observable doublings through the entire period-doubling cascade, and contains a detailed analysis of the critical effects of noise. Although we will discuss the results in [1] and draw on some important ideas (such as the stable and unstable adiabatic manifolds), our approach stands independently, focusing on how the asymptotic methods of multiple scales and matched asymptotic expansions can be applied to non-autonomous difference equations.

Outline of paper
In this paper, we proceed by considering two examples of the discrete logistic equation where multiple scales and matched asymptotic expansions can be used. These illustrative examples will be of increasing complexity, and they show clearly how to deal with many of the challenges associated with applying multiple scales and matched asymptoic expansions to singularly perturbed difference equations.
Using the method of multiple scales with a continuum slow time variable, this leads to approximate solutions where x(n) grows exponentially. The solution breaks down for large n as the dominant balance in the rescaled difference equation changes and a new scaling for x is required. The late time solution based on this new scaling can then be connected with the early time solution using the method of matched asymptotic expansions.
Then, in Section 3, we demonstrate that our methods can be applied to non-autonomous difference equations by analysing the case where λ is taken to be a slowly varying function of n: λ(n) = 3 + ǫ 2 n. This introduces a number of subtleties, especially with regard to finding the appropriate asymptotic scalings for x and n in the early time and late time regimes. However, the methods developed in Section 2 can still be used, and we find that we can obtain a uniformly valid composite asymptotic solution.
Throughout Sections 2 and 3, we focus solely on the discrete logistic equation. Then, in Section 4, we describe how the methods developed in these sections can be applied to a much wider class of difference equations, and we discuss the different combinations of multiple scales and matched asymptotic expansions that could be used as a general strategy for the asymptotic analysis of difference equations.  (4) where ǫ = 0.02 and x(0) = 2 3 . As n increases, we see that x(n) moves away from the unstable equilibrium atx = 2+ǫ 3+ǫ ≈ 0.6689, before settling into the oscillatory pattern given by equation (6), with the period-two manifold illustrated by dashed curves.
A numerical solution of (4) where the initial condition is close tox is presented in Figure 2. We note that the solution gives the appearance of a smooth envelope around a system of oscillations away from the unstable steady state atx towards the 2-periodic equilibrium given by (6).
Consider the case where we wish to solve (4) subject to the initial condition x(0) = 2 3 . As given in (4), this difference equation is strongly nonlinear. However, by introducing the rescaling we obtain the weakly nonlinear problem, with X(0) = 0.

Early time solution
We begin by introducing t = ǫ n as a slow time variable alongside the fast time variable, n, and using the method of multiple scales where t is treated as a continuum variable. Our multiple scales ansatz takes the form X(n) ≡ X(n, t), where X(n, t) will be expanded as an asymptotic series in powers of ǫ.
Following Hoppensteadt and Miranker [12], X(n + 1) can be expanded as a Taylor series of the form Substituting into (8), we therefore find that the equation to solve is subject to the condition that X(0, 0) = 0. This is now a ∆DE expressed in terms of the discrete variable n and the continuous variable t.
We expand X(n, t) as an asymptotic series in the limit ǫ → 0 + : Applying this series to (10), we collect terms of the same order in ǫ to obtain a system of difference equations for the functions X(n, t). Collecting terms of O(1) gives with X 0 (0, 0) = 0; Solving (12), we find that where A(t) is some arbitrary smooth function of t. Collecting terms at O(ǫ) gives an equation for the next term in the series, In order to remove the secular (−1) n terms from the right hand side of (14), as is standard in the method of multiple scales, we impose A ′ (t) − A(t) = 0. Combined with the boundary condition in (13), this gives A(t) = e t , and hence X 0 (n, t) = 1 9 [1 − (−1) n e t ]. As described in Appendix A, this process can be repeated methodically, leading to the result that the solutions X r (n, t) may be written in the form where f r (t) is given in (74) and g r (t) is obtained by solving (76).
Using these expressions to calculate X 1 (n, t), we find that Figure 3 compares a numerical solution of (8) with asymptotic solutions based on the one term approximation and the two term approximation, obtained by truncating (16). We see that in both cases the approximation obtained from (16) accurately describes the solution trajectory in its early stages; eventually, however, both asymptotic series approximations become inaccurate. Furthermore, using (15) to generate subsequent terms in the series does not improve the accuracy beyond this point.  (16), in the case where ǫ = 0.02. In each figure, the exact solution is represented by black circles, while the asymptotic approximation is represented by white circles. The point n = 1 2ǫ log 1 ǫ is depicted as a thick line; this represents the approximate time at which the series ceases to be asymptotic, as discussed in Section 2.3. In both cases, the approximation fails when continued beyond this point.

Failure of the early time expansion
The method of multiple scales is useful for considering the slow accumulation of small deviations; however, for changes in the dominant balance of an equation, the method of matched asymptotics is necessary [16]. This is not straightforward in the present problem. Considering the asymptotic sizes of the various terms in (8) as X → ∞, we note that the X(n + 1) and X(n) terms will always dominate the 2 9 term, and that the −3 ǫ X(n) 2 term will dominate all of the other terms. Hence, a naïve inspection of (8) would suggest that a new dominant balance is attained when X = ord ǫ −1 , which is incorrect. In fact, subsequent analysis in this section will show that the failure of the asymptotic series occurs earlier, when X = ord ǫ − 1 2 . This error occurs because the failure of the early time asymptotic expansion is not associated with the discrete-scale behaviour of solutions to (8), but rather due to the exponential growth of the continuous slow time envelope. This growth causes the differential equations associated with the multiple scales formulation to undergo a change in dominant balance. To determine when this occurs, we can ignore discrete-scale variation, and reformulate (8) purely in terms of the slow time variable, t.
The most natural way is to remove the effects of the discrete scale by considering the doubled map, as it is clear from the early-time analysis that the behaviour on the discrete scale is 2-periodic. Applying (8) twice, we find that Thus, we could skip the method of multiple scales entirely by proposing the continuum ansatz (17) with t = ǫ n, leading to the infinite-order ODE This is now in a form where we can apply the usual methods for finding the new dominant balance; we can propose rescalings for χ and t and seek a new dominant balance in (18) that is consistent with long time behaviour of the leading order solution (13). Note that the exponential growth of the leading order solution X 0 (n, t) means that it will be necessary to propose an affine rescaling of t rather than a linear rescaling.
Specifically, we make the rescalings χ = δ ξ and t = K 0 + K 1 s, where ξ and s are O(1) variables, and where δ, K 0 , and K 1 depend only on ǫ with δ ≫ 1, K 0 ≫ 1 and K 0 ≫ K 1 as ǫ → 0 + . Substituting into the leading order solution from (16), we find that where ord is used to represent 'strict order' as in [10], so that Since (19) must hold whenever ξ and s are both ord(1), we find that it is appropriate to choose K 1 = 1 and K 0 = log δ. Substituting into the doubled map (18), we find that the terms labelled ① and ② always remain part of the dominant balance, and the first term to grow to be the same size as ① and ② is the one labelled ③. This occurs when ǫ δ 3 = ord(δ); hence, it is appropriate to take δ = ǫ − 1 2 and K 0 = 1 2 log 1 ǫ . This suggests that the asymptotic series breaks down due to a change in dominant balance when X = ord[ǫ − 1 2 ], which occurs at t = ǫ n = 1 2 log 1 ǫ + O(1).

Late time solution and matched aysmptotic expansions
Using the doubled map, we determined the scaling of X and t, and hence x and n, at which the early-time expansion loses asymptoticity. Hence, we apply the rescalings where γ is a constant chosen so that 0 ≤ γ < 2, and m − n ≡ 1 (mod 2). The latter condition is chosen for convenience in subsequent analysis. Applying these rescalings to (8) and using the method of multiple scales with discrete fast time variable m and continuum slow time variable s, we recover Since (23) involves powers of ǫ 1 2 , we introduce a series expansion for ξ(m, s) in half-powers of ǫ of the form Collecting terms of the same order in ǫ, we obtain and so on.
At leading order, we can solve (25) easily to find that ξ (0) (m, s) = (−1) m P (s), where P (s) is an arbitrary smoothly-varying function in s. At O(ǫ 1 2 ), we do not obtain a secularity condition. At the next order, however, we find the secularity condition for P (s) is given by P ′ (s) = P (s) − 9 P 3 (s). Solving this yields where κ p is an arbitrary constant, and we recall that ξ 0 = (−1) m P (s).
In order to determine the value of the constant κ p , we apply Van Dyke's matching criterion (see, for example, [10]) to match the behaviour of the solution in the late-time region with the known behaviour in the early-time region.
Van Dyke's matching criterion involves expanding the early time solution in late time variables and equating this with an appropriate expansion of the early time solution in late time variables.
To determine κ p , we express the one-term late time solution ξ 0 (m, s) in terms of early time variables n and t, and equate the leading-order behaviour of this expression with the leadingorder behaviour of the one-term early time solution X 0 (n, t) in terms of late time variables m and s. This gives the matching condition which, using (20)- (22) and exploiting the simplifying assumption that m − n ≡ 1 (mod 2), gives κ p = 9.
By continuing to match powers of ǫ, we obtain a form for ξ 1 (m, s), with an appropriate secularity condition. Van Dyke's matching condition can also be used at higher orders, and hence we are able to determine subsequent terms in the asymptotic series, with the two-term expansion given by Since the one-term early time approximation from (16), and the two-term late time approximation, (29), are both accurate up to O(ǫ) in x, we can combine them to obtain a composite asymptotic approximation that will also be uniformly valid to O(ǫ). This is obtained by converting both approximations into equivalent variables, adding them together, and subtracting the matching term associated with Van Dyke's criterion. In this case, we find that the matching term is identical to the one-term early time approximation, and hence we recover the result that (29) is also the uniformly-valid composite approximation.
In classical boundary layer problems, it is unusual for the uniformly-valid composite solution to be completely identical to one of the two solutions involved in the matching, as is the case here.
It is important to note that this does not imply that it would have been possible to obtain the uniformly-valid solution without considering the early time and late time cases separately.
Knowing that X(0) = 0, we see that the initial condition in this case should take the form ξ(0, 0) = 0. However, if we take the late time solution from (29) and consider what happens when n = 0, and hence s = − 1 2 log( 1 ǫ ) and (−1) m = −1, we find that (29) becomes This is neither a valid asymptotic expansion (since both terms are the same size), nor an obvious way of representing the true initial condition of ξ(0, 0) = 0. While the two-term late time asymptotic expansion is equivalent to the composite approximation that is uniformly valid up to O(ǫ), it is not a Poincaré expansion when s = − 1 2 log( 1 ǫ ) + O(1). As a result, there is no power series ansatz by which (29) could be obtained directly from the initial condition; we need to use the method of matched asymptotic expansions to obtain the late time solution based on matching with the early time solution, and then combine the two to obtain a composite approximation.
Converting back into the variables x and n of the original problem, the composite expansion based on (29) becomes This composite approximation is compared with the numerical solution to the full problem in Figure 4 for the case where ǫ = 0.02. While Figure 3 shows that the early time asymptotic approximations become invalid as n grows large, here we see that the composite approximation remains valid over the entire domain. Figure 5 illustrates the approximation error of the composite expansion given in (31) for a range of ǫ values, where the error is quantified as the infinity-norm of the difference between the exact solution x(n) and the composite expansion. From Figure 5, we see that the error is proportional to ǫ 3 2 as ǫ → 0, which is consistent with the form of the asymptotic expansion (31).

Consequences of introducing a slowly varying bifurcation parameter
In Section 2, we considered the behaviour of the discrete logistic equation when the bifurcation parameter was taken to be a constant, λ = 3 + ǫ. In this section, we consider the dynamic problem described in 1.2, where λ is taken to be a slowly varying function of n. Specifically, we will concentrate on a slow forward sweep through the bifurcation at λ = 3, defining our small parameter, ǫ, so that λ(n; ǫ 2 ) = λ 0 + ǫ 2 n, and hence the bifurcation parameter varies on the slow time scale associated with τ = ǫ 2 n. This definition of the time scale over which the bifurcation parameter evolves is for later convenience; as we will see, it will also be useful to define a slow time scale t = ǫ n associated with the solution trajectory.
With λ as given above, we find that the discrete logistic equation takes the form Before we apply our asymptotic methods to (32), it is useful to make a few observations about the behaviour of solutions to (32) based on the analysis given in [1].
When a parameter is changed dynamically through a bifurcation in which a steady state becomes unstable, it is usual for the bifurcation to appear delayed. This is because the solution trajectory has had an opportunity to become very close to the steady state before it becomes unstable, and it takes a reasonably long period of time to escape the unstable manifold. If the bifurcation parameter were then to be changed in the opposite direction, there would be a similar delay in the reverse bifurcation. This leads to the canard phenomenon, first described in [3], with the particular case of discrete canards discussed in [8,9]. Baesens [1] discussed the canard problem for the discrete logistic equation, using renormalisation methods to analyse both forward sweep and backward sweep. In this paper, we concentrate solely on the more challenging problem of forward sweep, but the methods described here could also be used to obtain trajectories associated with backward sweep.
If we were to pick λ 0 < 3 so that n = ord(ǫ −2 ) when λ = 3, we would find that x(n) is exponentially close to the 1-periodic adiabatic manifold when λ = 3. As discussed in [1] and noted in Section 2, this has the consequence that it would then take a τ = ord(1) amount of time for x(n) to escape the neighbourhood of the 1-periodic adiabatic manifold after it has become unstable.
However, this severe delay to the bifurcation is very delicate, and can only be observed in the absence of any noise or rounding error in the numerical calculation of the solution to (32). Even a very small amount of noise will mean that x is not exponentially close tox(λ) when λ ≥ 3, and the calculated solution will rapidly escape the unstable 1-periodic adiabatic manifold. A significant part of the analysis in [1] is devoted to understanding the effect of noise on the solution to the discrete logistic equation with a slowly varying bifurcation parameter.
In order to avoid the problems associated with the effects of noise (and thereby allow clear numerical validation for our asymptotic results), we will concentrate on the case where λ 0 = 3, and x(0) is algebraically close to the critically stable 1-periodic adiabatic manifold. Specifically, we concentrate on the case where x(0) = 2 3 , and hence x(0) −x(0) = ord(ǫ 2 ). Thus, the focus of this section will be on analysing the non-autonomous difference equation specified by with x(0) = 2 3 . A numerical solution to this problem with ǫ = 0.012 is illustrated in Figure  6. Note that all of the bifurcations are delayed, and there are rapid transitions between the adiabatic manifolds. Note also that the numerical solution cannot be treated as reliable once we reach the transition from the 2-periodic manifold to the 4-periodic manifold.

Adiabatic manifolds and early time scaling
In Section 2.1, we simply rescaled x around 2 3 in order to obtain a weakly nonlinear problem for the escape from the 1-periodic equilibrium with a static bifurcation parameter. In our analysis of the discrete logistic equation with a slowly varying bifurcation parameter, we wish to instead rescale about the 1-periodic adiabatic manifold,x(3 + ǫ 2 n). This means that we need to obtain an asymptotic expression for the 1-periodic adiabatic manifold before we seek asymptotic solutions to (33).
To find the 1-periodic adiabatic manifold, we start from (32), which we can rewrite in the form where τ = ǫ 2 n and dλ dτ = 1. Since the 1-periodic adiabatic manifold is dependent only on λ, and dλ dτ = 1, we can reparameterise (34) in terms of λ, so that it takes the form Using Taylor series to expand the left hand side around ǫ = 0 in powers of ǫ 2 , and solving the resulting system of algebraic equations leads tō Further terms can be obtained by matching at higher powers of ǫ.
Starting from the doubled map and repeating the procedure yields
However, while this would lead to a rescaled version of (33) that is appropriate when n = O(1), we wish to use the method of multiple scales to find X(n) for n ≫ 1, which means that we need to introduce a slow time scale, t, alongside n. By comparing the variation of the bifurcation parameter λ(n; ǫ) = 3 + ǫ 2 n with the form of the Taylor series expansion for X(n + 1), we find that the appropriate slow time scale is again given by t = ǫn.
Thus, our early time scaling for the method of multiple scales takes the form Using (36) and introducing the scaling from (39) to (33) yields which must be solved subject to More terms can easily be obtained by using higher orders in the asymptotic expansion ofx(λ) given in (36), noting throughout that we are using λ = 3 + ǫ t.

Early time solution
We now express X(n, t) as a power series in ǫ and expand X(n + 1, t + ǫ) using Taylor series as previously. Substituting into (40) and collecting like orders of ǫ, we obtain which must be solved subject to initial conditions based on (41).
Solving (42) yields X 0 (n, t) = (−1) n A(t). Continuing to the next order, we obtain the secularity condition A ′ (t)−t A(t) = 0; combined with the initial condition X 0 (0, 0) = A(0) = 1 18 , this yields This process can be continued to higher orders, and we obtain This approximation is illustrated in Figure 7 for ǫ = 0.02. We see again that, although this approximation is accurate for early times, it loses accuracy when t becomes sufficiently large, and hence does not capture the transition to the 2-periodic adiabatic manifold. As before, however, this can be captured using the method of matched asymptotic expansions.

Failure of the early time expansion
The first step in determining the late time asymptotic solution to (33) is to determine when the early time expansion fails, as in Section 2.3.
Taking the doubled map and assuming that x can be expressed as a function of t = ǫ n only, we now introduce the early time ansatz wherex(λ) is obtained from (36). We will substitute this ansatz into the doubled map and seek a new dominant balance that is consistent with the early time solution, χ(t) = ord[exp( t 2 2 )]. Noting that we are only concerned with the largest terms at each order of ǫ (i.e. the terms with the largest power of χ, since χ is exponentially growing in t), this yields where ν is finite, where the omitted terms are at most O[ǫ 6 χ(t) 4 t ν ], and will not contribute to the change in dominant balance.
As in Section 2.3, we propose rescalings χ = δ ξ and t = K 0 + K 1 s, where ξ and s are O(1) variables when the new dominant balance is attained, and δ ≫ 1, K 0 ≫ 1 and K 0 ≫ K 1 . We now seek a dominant balance in (47) that is consistent with the leading-order behaviour of χ(t) based on (44).
For consistency with (44), we require Since this must hold when ξ and s are O(1), it is appropriate to choose K 1 = K −1 0 and δ = exp[ K0 2 2 ]. Writing K 0 as K, we make the substitution t = K + K −1 s in (47), and note that d dt ≡ K d ds . As a result of this, we see that the terms labelled ① and ② will always be the same size, O(δ K), and will always participate in the dominant balance.
As t and χ increase, the first term to become the same size as ① and ② is the term labelled ③. Thus, the new dominant balance occurs when ǫ 3 δ 3 = ord[K δ], and we pick K to be a solution of the transcendental equation Noting that K must be large as ǫ → 0, this equation may be solved in terms of the −1 branch of the Lambert W function (see, for example, [4]). For our purposes, however, it is more useful to define an iterative procedure for the solution by noting that and hence K can be expressed as an asymptotic series as ǫ → 0, with the leading order behaviour of K being given by K ∼ √ 3 log( 1 ǫ ) 1 2 .
Since δ = exp[ K0 2 2 ], we note that (49) gives In the analysis of the late time solution that follows, we will treat K and ǫ as independent parameters, although they are linked by (49).

Late time solution and matched asymptotic expansions
Having found that K is logarithmically large as ǫ → 0 and having obtained an expression for δ in terms of ǫ and K, we can rescale our original equation, (33), by introducing late time variables ξ, m and s, so that where γ is chosen so that 0 ≤ γ < 2, and m ≡ n (mod 2) for later convenience.
Substituting (52), (53), and (54) into (33) and using (36), we find as the rescaled form of (33) for late times ξ(m + 1, s) + ξ(m, s) = −ǫ We now require a series expansion for ξ(m, s). Since K → ∞ as ǫ → 0, one way of proceeding would be to express each ξ(m, s) as a double asymptotic series in ǫ and K. Inspection of (55) indicates that an appropriate ansatz would be however, the fact that K is only logarithmically large means that it is more convenient to treat K as though it were an O(1) parameter, and write this expression as a single series in powers of ǫ.
Substituting into (55) and collecting O(1) terms, we find that ξ 0 (m, s) = (−1) m P (s) for some smooth function P (s) to be determined. Continuing to O(ǫ 1 2 ) gives information about ξ 1 (m, s), but does not determine ξ 0 (m, s). Then, at O(ǫ), we obtain the secularity condition which yields where κ p is an arbitrary constant, and F (x) is Dawson's integral, defined by In order to determine κ p using Van Dyke's rule, we express (58) in terms of the early time variables and take the leading order term, which yields the result that Since this must match with the early time solution (44) expressed in late time variables, we find that κ p = 324, and hence the leading order late time solution is given bȳ As previously, the matching term is identical to the early time solution, and so the uniformly valid composite approximation is identical to the late time solution. Rewriting (61) in terms of the original variables and using the first two terms from the series expansion ofx(λ) from (36), we find that the composite approximation is given by where erfi(x) is the imaginary error function, defined by We note that (62)   In Figure 8, we compare the composite approximation from (62) with the numerical solution to the full problem when ǫ = 0.01. This shows very good agreement on the position and width of the rapid transition between the early time behaviour and the late time behaviour, but we also see that (62) is much more accurate at early times than at late times.
Because the accuracy of our approximation varies considerably with n, we perform an error analysis by considering the difference between the numerical solution and the composite approximation at three illustrative points, marked (a), (b) and (c) on Figure 8. Keeping a fixed value of t in the case of (a) and a fixed value of s in the case of (b) and (c), we consider the size of the error as ǫ → 0. As shown in Figure 9, we see that the error appears to be O(ǫ 3 ) for fixed t and O(ǫ) for fixed s. This is consistent with our expectations, since the logarithmic term in the late time error will be very difficult to observe.

Discussion and conclusions 4.1 Strategies for the asymptotic analysis of difference equations
In this paper, we have demonstrated that a combination of the method of multiple scales and the method of matched asymptotic expansions can be used to obtain uniformly valid asymptotic solutions to the discrete logistic equation in the neighbourhood of a period doubling bifurcation. We have developed a method for obtaining the late time rescaling by eliminating the effects of the discrete fast time scale for both autonomous and non-autonomous difference equations. We have concentrated on examples that arise from particular individual difference equations, but the same approach could also be used for systems of difference equations.
In the present work, we have not made any attempt to define a class of singularly perturbed difference equations where it is possible to prove that the combination of multiple scales and matched asymptotic expansions will lead to a uniformly valid composite asymptotic solution. It seems highly unlikely that such a proof would be straight forward to obtain or particularly enlightening; as discussed in detail by Eckhaus [5,6] and noted elsewhere (see, for example, [7,16]), it is notoriously difficult to develop a rigorous and general theory to justify the method of matched asymptotic expansions (and especially Van Dyke's matching criterion), even for The approximation error is given by calculating the difference between the exact solution and the asymptotic approximation at particular values of n in each region. In (a), the error is calculated at n = ⌊ 1 ǫ ⌋, which corresponds to t = O(1). In (b), the error is calculated at n ≈ (K + K −1 ) ǫ −1 , which corresponds to s = O(1). Finally, in (c), the error is calculated at n ≈ (K + 15K −1 ) ǫ −1 , which corresponds to s increasing out of the transition region and into the late-time behaviour. In each of these cases, the n used for calculation is taken to be the nearest value of n that lies on the solution branch with the greater approximation error. These three points are illustrated on the composite approximation shown in Figure 8. The unusual behaviour in (b) as ǫ becomes less small is a consequence of the restricted choice of n due to the discrete nature of the fast scale.
comparatively simple problems arising from the study of differential equations.
Even in the absence of a formal proof, combining the method of multiple scales and the method of matched asymptotic expansions is clearly an effective approach for some singularly perturbed difference equations, and the work described in this paper expands the range of asymptotic techniques available for difference equations. In the remainder of this section, we outline some important considerations when approaching asymptotic problems in difference equations, and illustrate with further examples a general strategy for seeking asymptotic solutions for difference equations.
In the cases considered in this paper, we began by proposing a multiple scales expansion involving one or two continuum slow time parameters. However, it may not always be necessary to apply the method of multiple scales to a given difference equation, and it is not always obvious how many slow time parameters should be used. Sometimes a regular asymptotic expansion where x(n) is treated as a series in powers of ǫ will be sufficient for obtaining an asymptotic solution, as it is for In this case, quick inspection reveals that a regular asymptotic expansion will yield each order of x(n) as a sum of terms of the form a j 2 −jn for positive integers j, and that secular terms and changes of dominant balance can never arise.
If a regular perturbation expansion fails, it is then important to investigate why it fails.
In the examples considered in this paper, proposing a regular asymptotic expansion for x(n) at early times would have led to a loss of asymptoticity when n = ord(ǫ −1 ) because of the appearance of secular terms, indicating the need for the method of multiple scales. However, it is also possible to construct examples where a regular asymptotic expansion fails because of a change of dominant balance, indicating a need for matched asymptotic expansions but not the method of multiple scales. Examples of this include the boundary value problems considered in Section 2.8 of [11], or an initial value problem like where the rapid decay in the early time solution leads to a change in dominant balance when x = ord(ǫ 1 2 ) and hence n = 1 2 log 2 ( 1 ǫ ) + O(1). For (65), the fact that the change in dominant balance occurs when n is within O(1) of a logarithmically large critical value indicates that both the early time scaling and the late time scaling will only involve a discrete time parameter; the method of matched asymptotic expansions is needed, while the method of multiple scales is not. In the specific example of (65) it is straightforward to perform a full analysis using the method of matched asymptotic expansions because a closed form solution exists for the strongly nonlinear late time equation. In general, however, discrete scale boundary layers in nonlinear problems are likely to lead to strongly nonlinear difference equations for which no closed form solution is known, making a full analysis more difficult.
In cases where the regular perturbation expansion fails because of the appearance of secular terms rather than because of a change of dominant balance, we use the method of multiple scales. If secular terms appear when n = ord(ǫ −1 ), for example, we can introduce a second time scale, t = ǫ n, and construct an asymptotic solution that remains valid while t = ord(1). However, as n and t grow larger, the two-scale asymptotic expansion may itself fail. One possibility is that the two-scale asymptotic expansion fails because of new secular terms appearing on a longer time scale. This process can be continued indefinitely if each new multiple scales solution fails because of the appearance of secular terms on an even longer time scale.
A second possibility for the loss of asymptoticity of a two-scale asymptotic approximation (or indeed any multiple scale asymptotic approximation) is a change in dominant balance. This has been the focus of the work presented in this paper, where we shift from the dominant balance associated with the neighbourhood of a 1-periodic equilibrium (or adiabatic manifold) to the dominant balance associated with the neighbourhood of a 2-periodic equilibrium (or adiabatic manifold). In such cases, we find that the early time multiple scales solution needs to be matched with a late time multiple scales solution; both the method of multiple scales and the method of matched asymptotic expansions are necessary in order to construct a uniformly valid solution.
While we confined our analysis to the discrete logistic equation, it is reasonable to expect similar behaviour in the neighbourhood of any period doubling bifurcation. That is, perturbing a difference equation around a period doubling bifurcation should lead to problems that are amenable to a combined approach based on multiple scales and matched asymptotic expansions. More generally, we expect this behaviour to be characteristic of weakly nonlinear systems of difference equations where the largest eigenvalue of the unperturbed linear problem has unit modulus, but the long time solution involves growth or decay of x(n) leading to a change in dominant balance.
For example, consider the difference equation which is not associated with a period-doubling bifurcation. At early times, the most significant term on the right hand side of (66) is the −ǫ x(n) term, which would lead to secular terms if we used a regular perturbation expansion. Using the method of multiple scales to avoid secularity, this leads to exponential decay on the t = ǫ n time scale. However, the exponential decay in the solution of (66) cannot go all the way to x = 0, because the ǫ 2 x(n) term becomes more important as x gets smaller. Hence, there is a change of dominant balance when x = ord(ǫ 1 2 ), or equivalently when t = 1 2 log( 1 ǫ ) + O(1), and we can use the method of matched asymptotic expansions to account for the change in dominant balance, precisely as described in this paper.
Moreover, consider the following differential equation, equivalent to Example 3 from Section 1 of [13]: x(n + 1) = x(n) + ǫ x(n) 2 , In [13] this is used as an example to show the importance of discreteness, since the difference equation (67) has qualitatively different behaviour from the corresponding differential equation: (67) has a solution for all n, while the corresponding differential equation exhibits finite time blow-up.
However, this can also be interpreted as a problem where there is a change in dominant balance that necessitates the application of matched asymptotic expansions. Applying the method of multiple scales to (67) with a continuum slow time variable t = ǫ n yields Not only does this solution blow up as t → θ −1 , we also see that there is a loss of asymptoticity as t → θ −1 . There is a new dominant balance when x = ord(ǫ −1 ) and hence t = θ −1 − ord(ǫ), enabling us to define late time variables and apply the method of matched asymptotic expansions.
Unlike the the period doubling bifurcations analysed in detail in Sections 2 and 3 (and, indeed, unlike the example of (66) described above), the late time scaling for (67) leads to a strongly nonlinear difference equation that is not known to have a closed form solution. In practice, it is therefore difficult to make a great deal of progress with the analysis of (67). In principle, however, we see that (67) is amenable to the method of multiple scales with a continuum slow time parameter if combined with the method of matched asymptotic expansions in order to obtain a uniformly valid solution. The discrepancy between the finite time blow up of (68) and the fact that (67) has a solution for all n is not a reason to reject the use of a continuum slow time parameter. Instead, it signals the importance of applying the method of matched asymptotic expansions when there is a failure of asymptoticity associated with a change of dominant balance.

Conclusions
The methods of multiple scales and matched asymptotic expansions are two important asymptotic techniques with a long history of being applied to differential equations. In the present study, we have demonstrated that these two methods can be combined to obtain uniformly valid asymptotic approximations to singularly-perturbed difference equations. By combining these methods, we obtained novel asymptotic approximations to the solutions of autonomous and non-autonomous forms of the logistic map, given in (4) and (32) respectively, when the initial state is close to the unstable period-1 manifold. The resultant asymptotic approximations were presented in (31) for the static problem, and (62) for the dynamic problem.
Additionally, the analysis presented in this paper has a number of unusual features that indicate that difference equations may provide very fertile ground for further asymptotic analysis. In each case, for example, we found that the relationship between the early-time independent variables and the late-time independent variables was affine, not linear. That is, converting from (n, t) variables to (m, s) variables involved both shifting and stretching, whereas in most applications of the method of matched asymptotic expansions to differential equations, the equivalent relationship would purely involve stretching. This is because the problems that we considered were not 'boundary layer' problems in the classical sense: there was no equivalent to a small parameter multiplying the highest derivative, and the solution did not change rapidly to satisfy a boundary condition. Despite this, the problems analysed did involve a change in dominant balance, and we found that this could successfully be accounted for by finding the new distinguished limit and applying the method of matched asymptotic expansions.
A further significant feature of our analysis is the method used for obtaining the late time scaling in Sections 2.3 and 3.4, in which we considered the doubled map in order to exclude the effects of the fast time scale, which was irrelevant to the new distinguished limit. Without using this method, it would have been very easy to obtain the wrong scaling for the late time problem and thereby fail to recover a uniformly valid solution. We know of no other work where the details of a multiple scales approximation are required in order to find the appropriate distinguished scalings for applying the method of matched asymptotic expansions; seeking similar problems (and equivalent solution methods) in the asymptotic analysis of differential equations is left as an open problem.

Acknowledgements
which is again clearly positive.
More generally, induction can be used to show that f r (t) = where p kr (t) and q kr (t) are both polynomials in t.
As t → ∞, the exponentials will determine the dominant behaviour, and we therefore find that Recalling that x(n, t) = ǫ k X k (n, t), we note that all of the terms in the series expansion for x(n, t) are of the same asymptotic size when t = 1 2 log( 1 ǫ ) + O(1) and hence ǫ k X k = O ǫ − 1 2 . This indicates that the naïve series solution fails to be asymptotic when t = 1 2 log( 1 ǫ ) + O(1) and we will need to use an alternative approach.