Entry and leaving arcs of turnpikes: their exact computation in the calculus of variations

Abstract We settle the question of how to compute the entry and leaving arcs for turnpikes in autonomous variational problems, in the one-dimensional case using the phase space of the vector field associated with the Euler equation, and the initial/final and/or the transversality condition. The results hinge on the realization that extremals are the contours of a well-known function and that the transversality condition is (generically) a curve. An approximation algorithm is presented, and an example is included for completeness.


Introduction
The idea of turnpike in the Calculus of Variations or in Optimal Control describes the (usual) phenomenon which takes place when, in problems with finite but arbitrarily large time, the optimal solutions spend most of their time near a specific point.Even more, these solutions tend to be composed of three parts: an entry arc, the turnpike arc, and the leaving arc.The first and last ones are transitory arcs which take little time of the solution, whereas the middle arc (the turnpike) is a long arc which is essentially stationary, and tends to be exponentially near an equilibrium (see [1]).Roughly speaking, in the long term, approximate solutions to problems having a turnpike are determined essentially by the integrand function of the objective functional, and are -again, essentially-independent of their endpoints and time interval.
Although the first works on the topic investigated specific problems arising in the context of economics and econometrics [2], [3], today the turnpike property has become of interest in other areas [4,5].Recent studies have proposed its use in applications varying from membrane-filtration systems [6] to control of chemical reactors with uncertain models [7] or shape optimization in aircraft design [8].
The property has also been noticed in Optimal Control Problems of almost any type: with/without terminal constraints [1], [9]; with/without discounted cost functionals [10], [11]; discrete-time problems with constraints [5], [12]; and in a continuous-time problems without constraints [1]... Of course, no work on the turnpike property can omit referencing Zaslavski's exhaustive studies, whose results and complete references are collected in [13,14].
From a practical point of view, the interest of the turnpike phenomenon arises from the fact that under this condition, the computation of (approximate) optimal trajectories in all areas of optimal control and variational problems becomes trivial for long enough time spans.In this sense, one of the first applications is [15], where a time-invariant linear quadratic optimal control problem is studied.They prove that the optimal trajectory is approximately composed of two solutions of two infinite-horizon optimal control problems.With x(0) fixed, the solution for the interval (0, +∞) defines the part of the trajectory for the original problem from x = 0 to the turnpike.With x(T ) fixed, the solution for the interval (−∞, T ) defines the part of the trajectory of the original problem from the turnpike to t = T .
The two parts are then pieced together and exhibit a similar transient behavior.Their approach is elementary and points out very clearly that the hyperbolicity phenomenon is the heart of the turnpike property.
Recently, in [1], the authors investigate the relation between the turnpike propierty and numerical methods (direct and indirect) for a general nonlinear optimal control problem, without any specific assumption, and for very general terminal conditions.In the context of turnpike theorem, they provide a new method to ensure the successful initialization of numerical methods.Assuming that the Pontryagin maximum principle has been applied, the usual shooting method can be used.However, this is in general very hard to initialize.As a solution, they propose a variant: as the extremal is approximately known along the interval [ε, T − ε], for some ε > 0 (i.e. the turnpike), but it not at the endpoints t = 0 and t = T, the idea is choose some arbitrary point of [ε, T − ε] (for instance t = T /2), and then integrate backwards over [0, T /2] to get an approximation to x(0), and forward over [T /2, T ] to get the approximation to x(T ).The unknown value of x(T /2) must be adjusted, for instance, through a Newton method, so that transversality conditions are satisfied.
Even more recently, in the same spirit, in [16] the authors use the turnpike property in the numerical computation of optimal trajectories, splitting the optimization horizon at the turnpike.They proceed as follows: given the turnpike equilibrium x e , the optimization horizon T > 0, an initial condition x(0) and, a terminal condition x(T ), they compute an optimal trajectory x 1 (•) with finite horizon T 1 < T and initial and terminal conditions x 1 (0) = x(0), x 1 (T 1 ) = x e ; and an optimal trajectory x 2 (•) with horizon T 2 < T − T 1 and initial and terminal conditions x 2 (0) = x e , x 2 (T 2 ) = x(T ).Finally, an approximation of the optimal trajectory is then obtained by concatenating the three arcs: The resulting error can be estimated if the speed of convergence towards the turnpike is known (as in the case of exponential turnpike).They also use a second approach via Model Predictive Control (MPC) which may have has some advantages.
To illustrate the turnpike and their methods, they consider a well known harvest example [17], with both bilinear and quadratic objective.Remarkably enough, the authors do not seem to notice that in the free-endpoint case, the leaving arc ends always at the same value of x(T ), regardless of x(0) and T .Something similar happens in [18]: the author, who studies two examples of optimal investment problems, states literally: "Without any terminal constraints all predictions end in x = 2", but does not delve into this happening.We shall see that this is a general property of turnpikes with free-endpoint solutions.
As a matter of fact, one of us had already noticed this in the previous paper [19].There, a model of renewable resource exploitation in an open-access fishery [20], more detailed and general than [17], is studied.It was noticed that, without constraints on the terminal state (which force the trajectory to leave the turnpike), the solution spontaneously leaves the turnpike in order to reduce the cost of the overall trajectory, and the leaving arc always ends at the same value of x(T ), for all T .
In this note, we intend to settle the question of the entry and leaving arcs of the turnpike in the generic hyperbolic situation for variational problems.The key point was suggested in [19] but not led to its natural consequence there.In short, and loosely speaking, our statement can be summarized as follows (for autonomous problems in R): assume P = (x P , ẋP ) is a turnpike for a problem with initial condition x 0 and free terminal condition, and let T (x, ẋ) = 0 denote the equation giving the transversality condition.Then: Statement: There is a function C(x, ẋ) such that: • The entry arc of the turnpike starts at • The leaving arc of the turnpike ends at The function C(x, ẋ) is well-known to any practitioner: it is the function whose level sets are the extremals [21].Certainly, the statement needs to be properly formalized, but its spirit should be clear to anyone familiar with the turnpike property.It is also more general (the problem may have both endpoints fixed, or none).
The main tool in our argument is to study the phase space of the plane vector field equivalent to the Euler equation associated to the variational problem.This vector field has very nice properties (among other things, its trajectories are both the extremals of the problem and the level sets of C(x, ẋ)) and a direct application of the classical results on ordinary differential equations is enough to prove the statement.
The consequences of that result are straightforward: in order to determine the entry and leaving arcs, one only needs to know the intersection points between C(x, ẋ), the transversality condition and/or the initial and final conditions (if any).Once these points are known, the entry arc can be computed by forward integration, and the leaving arc by backwards integration, as the question has become an initial value problem at this point.
We hope this work provides a useful support for the study of long-term autonomous variational (and possibly control) problems near a steady state.
Our results are all straightforward consequences of the standard results on continuous dependence on parameters of solutions of ordinary differential equations, as well as the local structure of hyperbolic singularities.Despite this fact, we dedicate Section 3 to a thorough description of the geometric setting of the problem, with the aim of helping the reader understand the situation.We hope this is clearer, briefer and simpler than a technical proof which would provide no insight and would be no more informative than what we provide.
After the formal statements in Section 4 and a suggestion for an approximate algorithm, we dedicate Section 5 to a hopefully illustrative example, Section 6 to numerical computations in it.A final section provides some remarks on the ndimensional case.

Statement of the problem
Consider the autonomous variational problem in one dimension: (1) where F is a C 2 (R 2 ) function, and T is large enough.It is well known since Samuelson [2] that many of these problems have a turnpike: a value x P such that "most" solutions of (1) pass near it during a long period (i.s.x(t) x P and ẋ(t) 0 for a "large" inner subinterval of [0, T ]), for T → ∞.Moreover, as Zaslavsky has proved [22], there are also initial and final curves (the entry and leaving arcs) γ e and γ l such that, as T → ∞, any solution of that problem is very near γ e at the beginning, then near x P , and finally, it is near γ l in the end.Of course, all the terms between quotation marks can be properly defined [10].
However, despite all the results around turnpikes, and as we have remarked in the Introduction, there is still no programmatic way to find their entry and exit arcs.The aim of this work is to explicitly show which curves these arcs are and how to compute them in the generic case.

Extremal curves, level sets and hyperbolic saddles
Given problem (1), Euler's equation ( 2) is best rewritten, after simplifying a common factor u, for our purposes, as a vector field, using x and u as subindices to indicate partial differentiation with respect to the first and second variables: F uu This vector field might have singularities where F uu = 0 (this implies, for instance, that if the problem is strictly convex in u, then there are no such singularities).The extremal curves (solutions to Euler's equation) then coincide with the trajectories of E.Moreover, as the problem is autonomous, it is well known (see, for instance [21]) that the following function is constant in the extremals.Thus, extremals, as 1-dimensional manifolds, are the level sets of C(x, u) in R 2 , for the problem P.
Let us work away from the points where F uu = 0, that is, we limit ourselves to an open set W where F uu (x, u) = 0. Consider an equilibrium point P of E, that is: a point with u = 0, F x − uF xu = 0.The linear part of E is always of the form where the stars are unknown values.Except in degenerate cases, P is then either a center-focus (when both eigenvalues of L are complex), a node (both eigenvalues of L are real and have the same sign) or a hyperbolic saddle (real eigenvalues with different sign).Obviously, the nature of either center-foci or nodes prevents such a point from being a turnpike with entry and leaving arcs: if P is a center, trajectories turn around it, if it is a focus, then they either converge to it (so that P is not strictly speaking a turnpike) or move away from it (again, not a turnpike).For the same reasons as for foci, nodes cannot be turnpikes.Hence, turnpikes with entry and leaving arcs correspond, in the non-degenerate case, to hyperbolic saddles, as is well known.Assume then that P = (x P , u P ) is a hyperbolic saddle of E, which by definition will have u P = 0 (this is exactly what makes P a turnpike: near P , the velocity of E tends to 0 and extremals spend "a long time" near P ).On the other hand, we have F x (x P , u P ) − u P F xu (x p , u P ) = 0, which becomes at P just F x (x P , 0) = 0.As P is a hyperbolic saddle, there are two invariant manifolds adherent to P : the stable X s and unstable X u ones, meeting transversely at P (see Figure 1: the stable manifold "falls" towards P and the unstable one "goes away" from it).As these manifolds are unions of extremal curves (they are trajectories of E), they correspond also to level curves of C(x, u) and, as P belongs to both, if we denote by M = X s ∪ X u their union, must necessarily have: That is, the invariant set near P is given by C(x, u) = C(x P , 0).Near P , the set M can be divided into 4 different trajectories of E: γ 1 s , γ 2 s , which are the two components of X s \ {P } and γ 1 u , γ 2 u for X u \ {P }.Any connected open set V containing P with sufficiently smooth border is divided by these four curves into four open subsets: U 11 , U 12 , U 21 , U 22 , each U ij corresponding to the "angle" defined by γ i s and γ j u , in that order (See Figure 1).The solutions of the variational problem P are extremals (so, they correspond to trajectories of E) which verify the initial condition x(0) = x 0 and also satisfy the transversality condition F u (x(T ), u(T )) = 0.The equation given by the trasnversality condition F u (x, u) = 0 defines (usually) a curve in the (x, u)-plane.Figure 2 shows the "general" situation in which we find ourselves.The trajectory γ e , part of the stable manifold, and γ l , part of the unstable one, are the entry and leaving arcs, respectively.
The intersection points between the transversality condition F u (x, u) = 0 and M are, key in our statements.These points are the solutions of the system of equations: which, after simplifying, becomes (see [19], where this system of equations appeared for the first time): In the problem P, the initial value x(0) = x 0 is set.Assume Q e = (x 0 , u e ) belongs to x = x 0 ∩ {C(x, u) = C(x P , 0)} and to the stable manifold of P , and let Q = (x l , u l ) be the solution of (5) in the unstable manifold (as in Figure 2) which is nearest to P .Under these assumptions, the Turnpike property happens relative to P (as in Figure 2) and extremals with x(0) = x 0 start near Q e = (x 0 , u e ), so that u(0) → u e , and finish near Q l , so that and x(T ) → x l as T → ∞.
If there existed a solution R = (x e , u e ) of ( 5), belonging to the stable manifold and satisfying the transversality condition (this case is not plotted in Figure 2), a dual argument using f (x, − ẋ) shows that there are extremals of the variational Hyperbolic saddle P (turnpike), extremal (γ), and entry (γ e ) and leaving (γ l ) arcs.In yellow, the "slow" zone.As long as there are no singularities of E in the cyan zone, the turnpike property holds inside it, and as T → ∞, the corresponding extremal of P approaches γ e at the beginning and γ l at the end.The entry arc starts at Q e and the leaving arc ends at Q l .
problem with no initial or terminal condition: (6) P ≡ min with starting points x(0) → x e (and endpoints ending at Q l as above).This theoretical description which is just a qualitative expression of the wellknown results on the continuous dependence of solutions of ODEs on the parameters, and of the local structure of hyperbolic singularities (see [24], for example) is enough to prove our results, so that instead of proofs, we just refer to this section.
Our statements have two versions: one in which a solution γ of P is already known, and one in which all depends just on the solutions of (5).

Statements of the results
As explained in the introduction, F (x, u) is of class C 2 in R 2 , and all our statements are in an open set W ⊂ R 2 where F uu (x, u) = 0. We shall make frequent reference to the vector field E defined in (3).
Our first result assumes the existence of an extremal "sufficiently" near a hyperbolic turnpike: Theorem 1.Let P = (x P , u P ) be a hyperbolic saddle of E and γ an extremal of P included in an open set U ⊂ W containing P which admits a subdivision U ij for i, j ∈ {1, 2} as above.We assume the following conditions: (1) The curve F u (x, u) = 0 meets γ 1 u and γ transversely at the points Q = (x l , u l ) and (x(T ), u(T )).
(2) That curve F u (x, u) = 0 admits an injective parametrization near Q, η : ) such that η is transverse to any extremal meeting it.(3) The extremals γ 1 s and γ meet the manifold x = x 0 transversely at (x 0 , u e ), (x 0 , u 0 ) respectively.(4) The open set V (delimited by γ 1 s and γ 1 u , η and the line x = x 0 contains no more singularities of E. Then: (1) For any T > T , the problem has an extremal γ which is totally included in V .
(2) For any > 0 there is T > T , T ,e > 0 and T ,∞ < T , such that, for T > T , the corresponding extremal γ T satisfies: • The metric distance between γ T : [0, T e ] → R 2 and γ e is less than .
• The metric distance between γ T : [T e , T l ] → R 2 and P is less than .
• The metric distance between γ T : [T l , T ] → R 2 and γ l is less than .Moreover, one can also choose T e and T l such that T l − T e → ∞ as → 0 and T l , T e < K for some K < ∞.
Proof.The first conclusion follows from the continuous dependence of solutions of an ordinary differential equation on the parameters (and from all the qualitative descriptions in Section 3).The second one follows also from the local structure of hyperbolic saddle singularities, see for instance [24].
Definition 1.The curve γ e from x = x 0 ∩ γ e to P is called the entry arc to the turnpike P .The curve γ l from P to Q is called the leaving arc of the turnpike P .
The previous statement seems to require a lot from the equation.As it happens, most of the hypotheses are just technical and will hold in generic situations.On the other hand, we can also say a lot (locally) if we just know that the transversality condition meets γ l transversely.The following result is again a straightforward consequence of the local structure of hyperbolic saddles and the continuous dependence on the parameters of solutions of ODEs.All the statements are inside W ⊂ F uu (x, u) = 0. Theorem 2. Let P be a hyperbolic saddle and γ l ⊂ γ 1 u ∪γ 2 u one of the components of the unstable manifold.Assume that the transversality condition T r ≡ F u (x, u) = 0 meets γ l transversely at Q l = (x l , u l ) and that there are no more intersection points between Q l and P belonging to γ l .Then there is > 0 and a parametrization τ : [− , ] → T c with τ (0) = Q l such that the two extremals containing τ (− ) and τ ( ) satisfy all the properties of Theorem 1.As a consequence, P is a turnpike for P.Moreover, assume γ 1 s is to the right of P and γ 2 s is to its left.Assume, for simplicity, that Q l is to the left of P (i.e.x l < x P ).Then: (1) The point P is a turnpike for P for x 0 ∈ (x P , x P + ), for some > 0, γ l (from P to Q) is the leaving arc and γ 1 s (from x = x 0 to P ) is the entry arc.
(2) At the same time, P is a turnpike for P for x 0 ∈ (x P − , x P ) for some > 0, γ l (from P to Q) is the leaving arc and γ 2 s (from x = x 0 to P ) is the entry arc.
Notice how there is a switch of entry arcs when the initial condition x 0 changes from being "greater than x P " to "less than x P ".This is easy to see in Figure 2: if x 0 is less than x P , the extremals ending near Q must approach, at their beginning, the top-left separatrix for T → ∞, instead of γ e .Obviously, for the dual problem (final condition set but initial condition free), it is the leaving arc that changes.
Consider the problem (6) with no initial or final condition.Near a hyperbolic singularity P of E we may have a turnpike result if the system of equations ( 5) has two solutions near P .Again, everything is restricted to some open set W ⊂ F uu (x, u) = 0. Theorem 3.With the notations above, assume P is a hyperbolic singularity of E.
s and Q l ∈ γ 1 u are two solutions of (5) and there are no more solutions of (5) between Q e and P and P and Q l , then P is a turnpike for the problem (6).That is, for T → ∞, there are extremals γ = (x(t), u(t)) of (6) satisfying: (1) The origin tends to Q e : (x(0), u(0)) → Q e , (2) The end tends to Q l : (x(T ), u(T )) → Q l , (3) The curve γ approaches the part of γ 1 s between Q e and P at the beginning (the entry arc), (4) The curve γ approaches the part of γ 1 u between P and Q l at the end (the leaving arc).
Proof.As previously, the proof is a straightforward application of the description in 3, the structure of hyperbolic singularities and the continuous dependence on parameters of solutions of ODEs.
Finally, consider the problem with fixed endpoints: In this case the statements holds regardless of the transversality condition.
Theorem 4. Assume P is a hyperbolic singularity of E. Assume x = x 0 meets γ s 1 at Q e and x = x T meets γ u 1 at Q l .Then P is a turnpike for the problem (7), and there is an open neighborhood V of P such that, for T → ∞ any extremal γ of (7) included in V satisfies statements (1)-( 4) of Theorem 3.
Notice that Q e and Q l in previous results can be easily computed using the fact that γ s i and γ u i are level sets of C(x, u).Thus, if they exist, then However, those solution sets might have more than one point, and one needs to verify which (if any) can be a candidate.

4.1.
Suggestion for an approximate algorithm.From the discussions above, the following method is suggested to use the turnpike and the entry and leaving arcs as approximate extremals for T 0. Specifically, for Problem (1) with x(0) fixed and x(T ) free: i) State a tolerance > 0. ii) Find the possible turnpike P = (x P , 0).This requires studying the phase space of (3), its singularities and the separatrices γ i s and γ i u , for i = 1, 2. For this one can just use the level set C(x, u) = C(x P , 0). iii) Find the adequate Q e and Q l .As explained above, Q e belongs to x = x 0 and C(x, u) = C(x P , 0), whereas Q l is found using system (5).iv) From Q e compute the trajectory γ e (t) of E with γ e (0) = Q e and ending at |γ e (T e ) − x P | < .This is an IVP integrated until some condition is met.v) From Q l compute the trajectory γ l (t) of E with γ l (T l ) = Q l and |γ l (0)−x P | < .This is a backwards IVP integrated until some condition is met.
After those computations, if T > T e + T l , then any extremal γ T of (1) can be approximated by the turnpike as: 5. An example: shallow lakes In this section we showcase the well-known shallow lakes model without discount (see for instance [23] for the details), with a modified cost function to prevent, in our example, the issues with the logarithm.The problem to be solved is, initially, the Optimal Control problem with control variable v: with c, b, r positive constants.This is, in fact, a variational problem, as v can be expressed as a function of x, ẋ and there are no restrictions.Thus, we shall in fact study the variational problem (10) P ≡ and we shall set the value of the constants to r = 1, c = 0.1, and b = 0.7.The Euler equation for this problem is, once divided by ẋ: (2ẍ + 0.78x 7 + 2.34x 5 + 6.34x 3 + 0.78x = 0 And the vector field associated to this second order equation is, in the (x, u) plane corresponding to (x, ẋ): ( 12) The denominator in u is never 0, so that E is well-defined in all R 2 .The vector field E has three singular points: two hyperbolic saddles P 1 = (0, 0) and P 2 (1.5062, 0) and a center/focus, O = (0.2747, 0). Figure 3 shows the structure of E near its singularities (in red).The function whose level sets are the extremals (the trajectories of E) is so that we need to focus our attention on the level sets Finally, the transversality condition in this case is given by In Figure 4 we have plotted the sets L 1 (cyan), L 2 (yellow) and T r (black).Notice how T r ∩ L 1 is just the hyperbolic point P 1 whereas T r ∩ L 2 has two points, one above u = 0 and the other one below (both in green).Surprisingly enough, the transversality condition (in black in Figure 4) only meets the curve M 1 ≡ C(x, u) = C(P 1 ) (in cyan) at (0, 0) so that our results only apply to P 1 in the fixed-endpoints versions (because T r never meets M 1 transversely).
Consider the hyperbolic saddle P 2 .We are going to showcase the four turnpike possibilities for it under problem (10).
The transversality condition meets the (yellow) curve M 2 = C(x, u) = C(P 2 ) at the (green) points Q 1 (−0.9852,1.1822) and Q 2 (0.9852, −1.971).Clearly, the top left and bottom right parts of M are the stable manifolds, call them γ 1 s and γ 2 s , respectively, whereas γ 1 u is the bottom-left part.
5.1.Initial condition fixed.Change of entry arc and of turnpike.Recall that we have called: γ 1 s the top-left branch of M 2 (in yellow in Figure 4) and γ 2 s the bottom-right branch (these are the stable trajectories and will give rise to the entry arcs).Also, γ 1 u is the bottom-left branch, and γ 2 u the top-right one, which will give rise to the leaving arcs.
In this subsection we are going to study the problem (9) (i.e. with initial condition but no end condition).
If x 0 > 1.5062, the extremals meet the transversality condition near Q 2 (0.9852, −1.971) for T → ∞, whatever the value of x 0 .The entry arc to the . Hyperbolic structure of the example.The leftmost singularity is hyperbolic but its level set (blue) meets the transversality condition only at the singularity.The level set of the rightmost singularity (yellow) meets the transversality condition twice (at the green dots).
turnpike P 2 in this case is γ s 2 from x = x 0 to P 2 : this happens for any x 0 > 1.5062 because the transversality condition does not meet M 2 for x > 1.5026.
However, the moment x 0 is to the left of P 2 , that is x 0 < 1.5062, the entry arc to turnpike P changes from γ 2 s to γ 1 s (which is above u = 0).As x 0 → −0.9852 (the x-coordinate of Q 1 ), the extremals approach γ 1 s .The problem with x 0 = −0.9852has no solution because Q 1 is the only intersection point between an extremal which meets the transversality condition (this is easily seen in the Figure 4).
Finally, for x 0 < −0.9852, the candidate extremals for problem P f for T → ∞ approach P 1 = (0, 0), the intersection point of T r and M 1 (the black and cyan lines in Figure 4).Thus, there is an entry arc, from x = x 0 ∩ T r to P 1 but the turnpike is never left, in this case.5.2.Initial and final conditions fixed.When x(0) = x 0 and x(T ) = x T are both fixed, the transversality condition plays no role and one needs only study the relation between these conditions and the hyperbolic singularities P 1 and P 2 .For the sake of simplicity, we are only going to show some cases.Let x P1 = 0 denote the x-coordinate of P 1 and x P2 1.5062 the one of P 2 .Of course, in order to have a turnpike behavior, there must be at least one singularity between x 0 and x T .
• When x 0 > x P2 > x T , then P 2 is a turnpike and the entry arc is γ 2 s ∩ {x = x 0 }, and the leaving arc is γ 1 u ∩ {x = x T }. • On the other hand, if x 0 < x P2 < x T then the situation reverses at P 2 (we are "above u = 0" and the arcs are now: γ 1 s the entry one from x = x 0 to P 2 and γ 2 u from P 2 to x = x T .• If x 0 , x T ∈ (x P1 , x P2 ) (that is, both endpoints are between P 1 and P 2 ) it is easy to realize that P 1 is still a turnpike and the entry and leaving paths correspond to γ 1 s and γ 2 u , respectively (starting at x = x 0 and ending at x = x T , also).
• When, say x 0 < x P1 and x T < x P2 , there are two candidate extremal curves for T → ∞: one having a turnpike at P 1 , and the other one at P 2 ; it is necessary here to discern the optimality by other methods (which we shall not do, as this is out of our aim).Obviously, each turnpike has his respective entry and leaving arcs (in this case, P 1 arcs are the cyan unbounded curves to its left).

5.3.
The free endpoint problem.Finally, the free endpoint problem requires the extremals to meet the transversality condition at x(0) and x(T ).In our case, only M 2 meets T r twice away from a singularity, whereas M 1 ∩ T r = {P 1 }.As far as extremals go, the "constant curve" (x(t), u(t)) = P 1 for all t ∈ [0, T ] is always a candidate trajectory (as it is an extremal which satisfies the transversality conditions).These have obviously constant cost F (P 1 ) × T .There is, however, a second possibility giving rise to a true turnpike: the solutions starting near Q 1 below γ 1 s , approaching P 2 and ending near Q 2 above γ 1 u .In this case, the entry arc is γ 1 s from Q 1 to P and the leaving arc is γ 1 u from P 1 to Q 2 .

Simulations
In this section we plot the simulations corresponding to some of the cases in Section 5. We have used a budget computer (Intel Core i5 with 16Gb RAM) and Mathematica, with no excessive time used (the simulations can be run in several hours, the longest time taken by the very precise computation of the entry and leaving arcs and, unfortunately, the plotting commands, as the numerical solutions are interpolating functions and their evaluation is quite slow).We restrict ourselves, for the sake of brevity, to the initial problem (1) with x(0) = x 0 = 0.5 and T 0. The above requires computing the turnpike entry arc starting at the point P e = (0.5, u e ), which is the solution of the first equation in (5) with x = 0.5, that is, u e is the solution of: (13) F (0.5, u) = C(P 2 ) = C(1.5062,0), giving u e 0.30751221580.However, one needs to compute u e with a huge precision in order to really obtain a fine approximation to the turnpike.In our computations, we used 30 values of precision when computing the solution of (13) (so that P 2 was also computed with that precision).We also need to compute the leaving arc of that turnpike, which requires knowing the point P l = Q 2 , solution of ( 5): (14) F (x l , u l ) = C(P 2 ) T r(x l , u l ) = 0 which gives, as indicated above, P l (0.9852, −1.971) (with the same caveat regarding the precision).
Figure 5 contains the plot of the extremal x(t) (in blue) and its derivative u(t) = ẋ(t) (orange), corresponding to (1) with x 0 = 0.5 and T = 63.Overlain (in dashed liens) we have plotted the entry arc from t = 0 to t = 24, and the leaving arc, from t = 41 to t = 63.There is no noticeable difference.
Figure 6 shows, on the left, the difference between x(t) and the entry arc for the same T = 63, and on the right, the difference between u(t) = ẋ(t) and the corresponding value on the turnpike, for t = T − 22 to T (where 22 is taken as a value where the x − value of the leaving arc is less than 10 −5 from the true turnpike P 2 ).Notice that the time is inverted in the latter plot because we have computed the leaving arc "backwards".The errors are, as can be seen, irrelevant to all purposes.Finally, Figure 7 contains the plots of the different solutions x(t) for times T between 51 and 56 and for time T = 63.The structure of the entry arc is essentially the same for all and all are, obviously, indistinguishable, whereas the leaving arc is also essentially equal but starts at different times.Figure 8 shows the difference between the corresponding entry and leaving arcs and the ones of the turnpike (where the cutting point is set as above).

Final remarks
Our aim in this paper is just to show, in the case of dimension 1, which is the most graphical one, how to compute the entry and leaving arcs of the turnpike of an autonomous variational problem in order to settle this question.Of course, the generalization to variational problems in which the functional F (x 1 , ẋ1 , . . ., x k , ẋk ) has "separated variables", that is problems with whenever u, v correspond to variables with different indices (i.e.u ∈ {x i , ẋi } and v ∈ {x j , ẋj } with i = j) is straightforward, as the associated vector fields are defined by independent equations.The most general autonomous case is, for the time being, inaccessible to us but we hope the technique presented in this work may be useful to elucidate their solution.

Figure 1 .
Figure 1.Hyperbolic saddle P and the open sets U ij .

Figure 5 .
Figure 5. Turnpike entry and leaving arcs compared to solution for T = 63.

Figure 7 .
Figure 7. Solutions for times between 51 and 56, and for T = 63.

Figure 8 .
Figure 8. Absolute difference between the solutions in Figure7and the entry (left) and leaving (right) arcs (time is reversed on the right).