{'fraction_non_alphanumeric': 0.05066442778147708, 'fraction_numerical': 0.008627428273645812, 'mean_word_length': 3.925424212177385, 'pattern_counts': {'":': 0, '<': 1, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 5, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Some geometric aspects of variational calculus in constrained mechanics

We give a geometric description of variational principles in mechanics, with special attention to constrained systems. For the general case of nonholonomic constraints, a unified variational approach is given, and the equations of motion of both vakonomic and nonholonomic frameworks are obtained. We study specifically the existence of infinitesimal variations in both cases. When the constraints are integrable, both formalisms are compared and it is proved that they coincide. As examples, we give geometric formulations of the equations of motion for the case of optimal control and for vakonomic and nonholonomic mechanics with constraints linear in the velocities.


Introduction
To describe the motion of mechanical systems there is a variety of mathematical models which are based on different principles. Most of the physical models are obtained using an appropriate variational principle in a certain evolution space. But variational principles are not only important in physics, but also in many branches of engineering [14] or economics [8], where one is interested in optimizing a given functional, possibly subject to some restrictions. In fact, constraints are ubiquitous in many mechanical systems and much more different situations.
In this paper we are going to study Lagrangian systems, i.e., dynamical systems in which the equations of motion are obtained by finding the critical paths of a functional where L is a function defined on the tangent bundle TQ of a given differentiable manifold Q, the configuration space. We will not consider arbitrary variations, but only variations satisfying certain conditions. These conditions arise from some given constraints on the dynamics of the system. We will analize the case when the constraints are defined by a certain submanifold C of the tangent bundle TQ. Such constraints are usually called nonholonomic.
There are two different approaches when dealing with constraints. The first one is based on the idea of understanding the constraints as constraint forces. This point of view, that seems very natural in a physical context, gives rise to the classical d'Alembert-Lagrange principle. Mechanics of Lagrangian systems with nonholonomic constraints based on this principle is called nonholonomic mechanics [2][7] [13]. But there is another different point of view, that seems more natural when one is interested in optimizing a given functional defined as above when there are constraints. For example, if we wish to change the state of a given system minimizing a cost functional (a typical problem in engineering or economics), it is not natural to understand the constraints as forces acting on the system. In this case one is interested in minimizing the functional considering only the variations allowed by the constraints. Mechanics of Lagrangian systems with nonholonomic constraints based on this idea is often called vakonomic mechanics (mechanics of variational axiomatic kind [2]). For example, optimal control theory is a typical example of vakonomic mechanics. It is interesting to notice that both mechanics do not coincide in general, but they agree when the constraints are integrable. Several references on these topics are [2], [3], [6] and [10]. See also [9,12].
The paper is organized as follows. In section 2 we give a generalized notion of a variational problem. Section 3 is devoted to study vakonomic mechanics from a geometric point of view, with special attention to the existence of admissible variations in order to obtain the equation of motion. In section 4 we do the same for nonholonomic mechanics. Both mechanics are understood as generalized variational problems. In section 5 it is proved that, when the constraints are integrable, vakonomic and nonholonomic mechanics coincide. In section 6, as an example of vakonomic mechanics, a geometric formulation of optimal control theory is studied. Finally, in section 7, we give a geometric formulation of vakonomic mechanics when the constraints are defined by a distribution (linear constraints in the velocities).
Basic knowledge of differential geometric structures is assumed. The presentation is almost self-contained but the interested reader may consult the bibliography for more specific topics as the vertical lift, the fibre derivative and the canonical involution [1], or the Euler-Lagrange operator [5].
2 Variational problems 2.1 Elements of a variational problem First, we are going to define what we mean by a variational problem. A variational problem consists of the data (Q, L, C, C, W) where: • Q is a n-dimensional differentiable manifold, the configuration space.
• L is the lagrangian function defined on the tangent bundle, L: TQ −→ R.
• C is the constraint submanifold, and it is a submanifold of TQ.
• C is the family of admissible paths. Given two points q 1 , q 2 ∈ Q and a compact interval I = [t 1 , t 2 ], we will say that a path γ: I → Q of class C 2 is admissible if: • W are the admissible variation fields (or infinitesimal variations). For a given admissible path γ, W γ consists on a certain set of C 1 vector fields along γ.
Notice that we do not consider variations of a path γ, but variation fields along γ. Now we are ready to define the variational problem associated to (Q, L, C, C, W).
The action of L along a path γ is the functional S: C −→ R given by the integral (2.1) A variational problem consists in finding the critical admissible paths of the functional S, in a sense that will be precised later.
Given a function Γ(ε, t) of two real variables, we will denote its derivatives with respect to ε and t as Γ ′ andΓ, respectively. It is clear that Γ ′ andΓ are vector fields along Γ. Now, we are in conditions to define a variation field of Γ.
Definition 1 Given a variation Γ(ε, t) of an admissible path γ, the variation field of Γ is the vector field w along γ defined by Notice that since the Γ ε have fixed end-points. Therefore, given a family of variations of γ, we can associate to them a family of variation vector fields along γ. We will say that a variation Γ of γ is admissible if its associated variation vector field along γ, w(t) = Γ ′ (0, t), is an admissible variation field of γ, i.e., w ∈ W γ .
We finish this description about variations and variation fields with a useful lemma, whose proof is straighforward in local coordinates.
Lemma 1 For any w vector field along γ and any function λ: I → R, ✷ Notice that, if w is a vector field along γ, thenẇ is a vector field along w and s •ẇ is a vector field alongγ. The function λ: I → R denotes a function of time, and it is clear that λw is another vector field along γ. D is the usual derivative with respect to the time. The map vl denotes the vertical lift vl: TQ × Q TQ → T(TQ). Its local expression is vl(q, v, u) = (q, v; 0, u). Finally, s: T(TQ) → T(TQ) denotes the canonical involution, which is an isomorphism between the two vector bundle structures of T(TQ). Its local expression is s(q, v; u, a) = (q, u; v, a).

Critical admissible paths
Definition 2 An admissible path γ is said to be critical if, for each admissible variation Γ ε , the first variation of S[Γ ε ] is zero; i.e., The main purpose of this paper consists in discussing the criticity conditions for different variational problems and describing the solutions. First of all, we are going to describe the criticity condition for a general problem.

(2.2)
(Remember thatẇ is a vector field along w, and s •ẇ is a vector field alongγ, so the contraction makes sense.) Now, we can characterize the criticity condition in a more manageable way. Observe that this condition does not depend on the full variation Γ(ε, t), but only on its variation field (see also [4]). Therefore, in our study of variational calculus, we will shift our attention to infinitesimal variations rather to finite variations.

The Euler-Lagrange operator
To obtain a more manageable condition of criticity, it is convenient to perform an integration by parts. First, let us define the Euler-Lagrange operator of L.

Definition 3
The Euler-Lagrange operator associated with a function L: TQ −→ R is a mapping E L : T 2 Q → T * Q defined by the relation for any path γ: I → Q and vector field w along γ.
Here, the map DL: TQ → T * Q is the fibre derivative of L. Recall that, given a vector bundle E → B, if f : E → R is a function, then the derivatives of the restrictions of f to the fibres define the fibre derivative of f , which is a map Df : E → E * . Its local expression is Df (b; a) = (b; ∂f /∂a).
It is easy to check (in coordinates) that the Euler-Lagrange operator is welldefined by this relation.
Therefore, the Euler-Lagrange operator is a one-form along the projection T 2 Q → Q, and also an affine bundle map along TQ → Q. The expression in local coordinates of E L is the usual one, where d/dt is the total time-derivative operator. The Euler-Lagrange operator can be extended in the same way to a time dependent Lagrangian.
Using the definition of the Euler-Lagrange operator, we can characterize the criticity condition in the usual form.
The result follows observing that, since w is a variation field, the last term vanishes (w(t 1 ) = 0, w(t 2 ) = 0). ✷ For the case when there are no constraints, C = TQ and W γ is the set of all the vector fields along γ, we obtain the well-known Euler-Lagrange equation.
Corollary 1 Given a unconstrained variational problem, a path γ ∈ C is critical if and only if E L •γ = 0 .
In this paper we will be interested in variational problems when C ⊆ TQ, C = TQ. Hence, given a set of admissible paths, it is necessary to select a set of admissible variation fields (or infinitesimal variations) along the admissible paths. We will consider two different approaches to this problem. The first one is vakononomic mechanics, which can be considered as a strictly variational approach. The second one is nonholonomic mechanics, which is variational in our generalized sense, but not in the classical one. Nonholonomic mechanics is the usual way to describe the dynamics of a mechanical system with constraints. In the next two sections we will describe the dynamical equations obtained in each case. It is interesting to remark that both approaches are equivalent when the constraints are integrable (holonomic constraints).
We finish this section with a useful property of the Euler-Lagrange operator that will be used in many calculations in the following. The proof is straighforward in local coordinates.
Lemma 2 For any f : TQ → R and µ: I → R (a function of time),

Vakonomic mechanics
Roughly speaking, vakonomic mechanics is the result of variational calculus when the variations are restricted by some constraints on the positions and also the velocities. Our initial setting is therefore a submanifold C ⊂ TQ of codimension m < n; let us denote by j the inclusion of C in TQ. A constraint is any function φ vanishing on C. Locally C is defined by the vanishing of some constraints φ i : TQ → R (i = 1, . . . , m) whose differentials dφ i are linearly independent at each point of C.
We will assume that the projection of C to Q, τ Q • j: C −→ Q, is a submersion. It can be easily proved that this statement is equivalent to say that the constraints φ i can be chosen such that their fibre derivatives Dφ i are linearly independent at every point of C. In local coordinates, this means that ∂φ i /∂v k has maximal rank. That is, the constraints restrict the velocities, not the positions.
With the assumptions above, the image (τ Q • j)(C) ⊂ Q is open, so we may assume that the projection C → Q is a surjective submersion. Then there exists the vertical subbundle V(C) ⊂ T(C), which has rank n − m (the dimension of the fibres of the submersion). Indeed, at each v q ∈ C we have V vq (C) = T vq (C) ∩ V vq (TQ).
To obtain the equations of motion of vakonomic mechanics, we need first to describe which are the admissible variations.

The variations of vakonomic mechanics
We remember that an admissible path is a mapping γ: I → Q such thatγ takes its values in the submanifold C ⊂ TQ. Due to our assumptions on C, there exist vector fields locally defined on Q taking values in C. Their integral curves have their derivatives in C, so there are many admissible paths.
Definition 4 Let Γ be a variation of an admissible path γ. The variation Γ is called a strongly admissible variation of γ if every path Γ ε is admissible.
If Γ is a strongly admissible variation, then φ(Γ(ε, t)) = 0, for any constraint φ. Taking the derivative with respect to ε at ε = 0 and using (2.2) we have dφ •γ, s •ẇ = 0 for every constraint φ. This can also be expressed as for each t ∈ I.
Definition 5 A variation field w of an admissible path γ is called an admissible variation field for a given vakonomic problem if From the definition of the Euler-Lagrage operator (definition 3), we obtain that w is a variation field if and only if It is important to remark that an admissible path may not have any nontrivial strongly admissible variation, and so an admissible variation field may not arise from a strongly admissible variation. One may say that the variations having admissible variation fields are the variations that preserve the constraints up to first order in ε. These variations may be called weakly admissible variations.
Next, we are going to give a more detailed description of admissible variation fields. Among all the vector fields w along γ, we consider a particular submodule. Take the subbundle L C γ ⊂ γ * T(Q) = I × γ T(Q) whose sections are the vector fields w along γ of class C 1 whose vertical lifts vl(γ, w) are tangent to C. Using this subbundle we can express the admissible variation fields in a more manageable way. First, notice that, since I is an interval, both L C γ and γ * T(Q) are trivializable. Therefore there exists a global frame for γ * T(Q), (w k ) (k = 1, . . . , n). Since L C γ is a subbundle of rank n − m, we can assume that the last n − m of the w k span this subbundle.
Any vector field along γ can be thus uniquely written w = n k=1 λ k w k , where λ k are functions of time. Then w is a variation field if and only if the coefficients λ k vanish at the end-points of I. Moreover, according to definition 5, w is an admissible variation field if it is a variation field and dφ i •γ, s•ẇ = 0, for i = 1, . . . , m. Taking into account lemma 1, this condition can be written Notice that, since the fibre derivatives Dφ i are linearly independent at each point, the matrix with entries Dφ i •γ, w k has maximal rank, m. By the special choice of the w k , the last n − m of them vanish under the Dφ i , and hence the square matrix we can isolate the Dλ j (j = 1, . . . , m) linearly in terms of all the λ k (k = 1, . . . , n). This determines uniquely λ j , j = 1, . . . , m as functions of λ l , l = m + 1, . . . , n, due to the initial condition λ j (t 1 ) = 0. However, not any λ l , l = m + 1, . . . , n vanishing on t 1 , t 2 are admissible. Notice that the solutions λ j , j = 1, . . . , m must vanish also in t 2 . In fact, the existence of solutions of (3.2) satisfying λ k (t 1 ) = λ k (t 2 ) = 0, k = 1, . . . n, is not guaranteed in principle. If we write (3.2) as where ν(t) is the fundamental matrix of the homogeneous system Aλ (1) = −B λ (1) satisfying the initial condition ν j i (t 2 ) = δ j i . If λ (1) (t 2 ) = 0, then necessarily If the system is homogeneous (C = 0) we obtain the trivial solution λ j (t) = 0, j = 1, . . . , m, remaining λ l , l = m + 1, . . . , n as arbitrary functions satisfying the boundary conditions λ l (t 1 ) = λ l (t 2 ) = 0. As for the general case, in the following section we will show that admissible variations always exist in vakonomic mechanics. Condition (3.1) is very useful to study variation fields in vakonomic mechanics, as we show in the following example.
Example Let Q = R 2 be the configuration space, with coordinates (x, y), and consider a Lagrangian function and a constraint both depending only on the velocities, i.e., L = L(ẋ,ẏ) and φ = φ(ẋ,ẏ).
From our assumptions on the constraints we can write locally φ =ẏ − f (ẋ) ≡ 0. In this case, using theorem 2, it is a simple calculus to show that the equations of motion of the vakonomic problem areẍ = 0, that is x(t) = at+b and y(t) = f (a)t+c. The parameters a, b and c are obtained from the boundary conditions x(t 1 ), y(t 1 ), x(t 2 ) and y(t 2 ). If γ(t) = (x(t), y(t)) is a straight line satisfying the boundary conditions, using (3.1), the reader can check that there exist admissible variation fields, and they are vector fields along γ(t) of the form λ(t)w, where λ(t 1 ) = λ(t 2 ) = 0 and w(x, y) = (x, y; 1, f ′ (a)).

The equations of motion of vakonomic mechanics
As we have shown, a critical path of the action with constraints is an admissible path γ such that I E L (γ(t)), w(t) dt vanishes for each admissible variation field w (theorem 1). To obtain the corresponding Euler-Lagrange equation, we first establish the following proposition. Proof: In principle, since the variations may not be strongly admissible, it is not clear that the variations of both actions yield the same result. However, using theorem 1 and definition 3, the difference of the first-order variations of the actions is and both terms vanish whenever w is an admissible variation field. Therefore, the variations of the two actions coincide when w is an admissible variation field. ✷ This is the equation of motion of vakonomic mechanics.
Proof: If equation (3.4) holds then, for each admissible variation field w, I E L+ m i=1 µ i φ i • γ, w dt = 0, which, according to Proposition (2), is equivalent to I E L •γ, w dt = 0. This shows that γ is a critical path. So it remains to prove the converse: that equation (3.4) is a necessary condition for the criticity of an admissible path γ. First, notice that the µ i can be chosen such that for j = 1, . . . , m. Indeed, by lemma 2 this equation can be written as for each j = 1, . . . , m. From definition 3 and the choice of w j we have where A and B are the matrices we have used previously (3.2). So again we have a linear differential equation that determines the functions µ i (up to initial conditions). From now on we assume that A is the identity matrix; this can be easily done through a linear change of the basis (w i ).
If we apply the variational principle for the modified Lagrangian for each set of functions λ k yielding an admissible variation field. If we choose the functions µ i satisfying (3.5), then the sum is only from m + 1 to n: This must hold for any choice of the functions λ m+1 , . . . , λ n giving an admissible variation field. However, as we have shown in the preceding section, the functions λ m+1 , . . . , λ n are not arbitrary in general, due to the final conditions λ 1 (t 2 ) = · · · = λ m (t 2 ) = 0. Let (μ i ) 1≤i≤m be the particular solution of (3.6) satisfyingμ i (t 2 ) = 0, and let (ν j i ) be the transpose of the fundamental matrix of the homogeneous system of (3.6) satisfying the initial conditionν j i (t 2 ) = δ j i . Notice thatν = (ν) −1 . (In general, if ν is a fundamental matrix ofẋ = A · x, then (ν t ) −1 is a fundamental matrix ofẋ = −A t · x). Then the general solution of (3.6) is µ i =μ i + m j=1 ρ jν j i , where ρ j are arbitrary constants. Suppose for a while that there exist admissible variation fields w = n k=1 λ k w k with where w (2) denotes the last n − m vector fields. Now, from lemma 2 and definition 3, we have (3.10) Using that C i l = dφ i •γ, s•ẇ l and combining (3.9) and (3.10), we obtain the linear system for the ρ j m h=1 ρ h The solutions of this system are any constants ρ h such that m h=1 ρ h · e h is the orthogonal projection of v onto V . This is well defined, since V is finite-dimensional. (Notice that the ρ h may not be unique, since the e h are not necessarily independent). This completes the proof.
✷ Remark: Notice that, using lemma 2, the equation of motion may also be written as (3.12) Remark: In the proofs of the equation of motion of vakonomic mechanics that one can find in the literature, it is usually assumed that the functions λ l , l = m+1, . . . , n, giving the admissible variations are free. Then, the equation of motion is obtained as a straight consequence of (3.7). However, in general, these functions are not absolutely free.

The variations and equations of motion of nonholonomic mechanics
In this section we are going to show that nonholonomic mechanics may be understood as a variational problem. Our initial setting is also the submanifold C ⊂ TQ, which may be locally defined by the vanishing of the constraints φ i . An admissible path is still a path γ: I → Q such thatγ takes its values in C. Let us define which are the admissible variation fields in nonholonomic mechanics.
Definition 6 A variation field w of an admissible path γ is called an admissible variation field (in nonholonomic mechanics) if it is a section of the subbundle L C γ ⊂ γ * TQ. That is, vl(γ(t), w(t)) ∈ T˙γ (t) (C) .
Using the constraints, equivalent statements are dφ •γ, vl(γ, w) = 0 , (4.1) or for each constraint φ. Notice the key difference with respect to vakonomic mechanics: now the admissibility is a C 1 (I)-linear condition on w. This linearity makes things easier. Next, we obtain the equation of motion of nonholonomic mechanics.
Proof: A critical path for nonholonomic mechanics is an admissible path γ such that the first-order variation of the action, I E L (γ(t)), w(t) dt, vanishes for each admissible variation field w. By equation (4.2), this means that E L (γ(t)) is a linear combination of the Dφ i •γ. Thus, the result follows. ✷ Remark: It is obvious that there always exist admissible variation fields in nonholonomic mechanics. For example, if we calculate the admissible variation fields of the example in section 3, we will find that, in this case, they coincide with the admissible variation fields of vakonomic mechanics. But this will not be true in general if the constraints are not integrable.

The case of integrable constraints
Let us consider the problem of holonomic constraints in the usual sense.
Definition 7 Given a differentiable manifold Q and a Lagrangian function L: TQ −→ R, a holonomic problem is a variational problem where • The constraint submanifold is given by a submanifold P ⊂ Q, thus C = TP .
• Variation fields w along γ are admissible if they are tangent to P .
Notice that, from any admissible variation field along an admissible path γ, one may construct a variation Γ contained in P . Therefore, it is clear that the problem with holonomic constraints is equivalent to the unconstrained variational problem defined on P by taking the restriction of the Lagrangian L to TP ⊂ TQ. Now, consider the cases of both vakonomic and nonholonomic mechanics when the constraints are defined by an integrable subbundle C ⊂ TQ. In this situation, we have the following equivalence.
Theorem 4 If the constraint submanifold C is an integrable subbundle of TQ, then both vakonomic and nonholonomic mechanics coincide, and they are equivalent to a holonomic constrained problem on each integral submanifold of C.
Proof: First of all, notice that, in both cases, a path γ: I −→ Q is admissible (i.e.,γ is in C) if and only if it is contained in an integral submanifold P ⊂ Q of C. Recall that T q (P ) = C q , for each point in P .
Let w be a variation field of γ. We know that w is admissible in the nonholonomic framework if vl(γ(t), w(t)) ∈ T˙γ (t) (C) (see definition 6). Since the vertical lift restricts naturally to subbundles, this is equivalent to say that vl(γ(t), w(t)) ∈ Vγ (t) C ⊂ Vγ (t) (TQ), that is, w(t) ∈ C γ(t) or, what is the same, w(t) ∈ T γ(t) P . And this last condition says that w is admissible for the holonomic problem. Therefore, we have proved that a nonholonomic problem with integrable constraints is equivalent to a holonomic problem on each integral submanifold of C. Now, we show the equivalence with the vakonomic problem. Since C is an integrable subbundle of TQ, it is known that the integral submanifolds of C can be locally described as ψ = constant, for some independent functions ψ on Q. This implies that the constraint submanifold C can be locally described by φ =dψ = 0. Here,dψ: TQ −→ R is the differential dψ of ψ: Q −→ R considered as a function on the tangent bundle.
Let w be a variation field of γ, in the sense of vakonomic mechanics. Then, for any φ =dψ, we have Using the propertyddψ =ddψ • s, we obtain Thus, w is an admissible variation field in vakonomic mechanics if and only if dψ • γ, w is constant. Since w(t 1 ) = 0, this constant is zero, dψ • γ, w = 0, which means that w is tangent to P . Therefore, w is admissible for the vakonomic problem if and only if it is admissible for the holonomic problem on P . ✷

Optimal control and vakonomic mechanics
A problem of optimal control may be given by the following data: a configuration space B describing the state variables, a fibre bundle π: M −→ B whose fibres describe the control variables, a vector field Y along the projection of the bundle, Y : M −→ TB, and a "Lagrangian function" L: M −→ R. For a path γ: I → M where π • γ (not γ!) has fixed end-points, the problem is to find an extremum of the action γ L(γ(t)) dt when γ satisfies the differential equation that rules the evolution of the state variables. It is easy to show that this is indeed a vakonomic problem on the manifold M, in which the Lagrangian L is very singular, since it does not depend on the velocities. The constraint submanifold C ⊂ TM, given by the differential equation above, is In this way, a path γ is admissible if and only if it is a solution of the differential equation ( L(x i , u α ) dt and the constraints are given by a set of first order differential equationṡ with boundary conditions x i 1 = x i (t 1 ) to x i 2 = x i (t 2 ) (there are no boundary conditions on the control variables). Notice that for this vakonomic problem the constraints are very particular: they express the velocities of the state variables in terms of the state and control variables.
Let us identify which variation fields w are admissible. Notice that frames for the bundles L C γ ⊂ γ * T(M) are provided with (w α ) and (w i , w α ), where for instance if we have coordinates (x i , u α ) on M. Writing w = λ i w i + λ α w α , the differential equation (3.1) turns out to be Optimal control theory admits several geometric formulations and expressions of the equation of motion. First, we can give a lagrangian description on the configuration manifold T * B × B M. We only need to define a lagrangian on its tangent space: L(x, p, u,ẋ,ṗ,u) = L(x, u) where Let us recall that, given a l-dimensional differentiable manifold Q with local coordinates (q A ), there is a canonical tensor field on TQ, the vertical endomorphism S which is a rank-l (1,1) tensor field on TQ such that Ker S = ImS and whose Nijenhuis tensor N S vanishes. In natural coordinates (q A ,q A ), the local expression of S is given by S = dq A ⊗ ∂ ∂q A . Also, we have the Liouville vector field ∆ (the infinitesimal generator of the dilations along the fibres on TQ), whose local expression is ∆ =q A ∂/∂q A . A vector field X in TQ is called a second order differential equation ( Taking Q = T * B× B M and L = L(x, u)+ p,ẋ−Y (x, u) , we obtain a geometrical expression of the equation of motion of optimal control theory, However, the most interesting geometric description of optimal control theory is a presymplectic description which can be constructed on the manifold T * B × B M.
Here we consider the 2-form ω obtained by pull-back through T * B × B M → T * B of the canonical 2-form of the last manifold. In local coordinates, ω = dq ∧ dp. Taking Remark: In optimal control theory the hamiltonian function is usually written as H(x, u, p) = p, Y (x, u) − µ 0 L(x, u), where µ 0 = 0, 1. When µ 0 = 0 we recover the so called abnormal solutions (see [11]). However, in the vakonomic approach, there are not abnormal solutions. The key issue is that we work with admissible variation fields, not admissible variation curves.

Constraints defined by a distribution
In this section we present a geometric framework for constrained systems when the constraint submanifold C is a distribution (or vector subbundle) of the tangent manifold TQ. In local coordinates, this means that the constraints are linear functions on the velocities. The subbundle C ⊂ TQ can be described in terms of its annihilator, C 0 ⊂ T * Q. If this is locally described in terms of 1-forms, α i = α i a (q)dq a (i = 1, . . . , m, where m is the codimension of C and (q a ) are local coordinates of Q), then C is locally described in terms of the constraints Let us consider the vector bundle TQ⊕C 0 , in which we will set up the dynamics. On the one hand, given the Lagrangian function L on the tangent bundle TQ, let θ L = S * • dL be the Lagrange 1-form on TQ. Its pull-back along the projection π 1 : TQ ⊕ C 0 −→ TQ yields the 1-form on TQ ⊕ C 0 . Also, using the Liouville vector field ∆ on TQ, the energy function associated with L in TQ ⊕ C 0 is On the other hand, let θ Q be the canonical 1-form defined on the cotangent bundle T * Q. If j 0 : C 0 −→ T * Q denotes the canonical inclusion and π 2 : TQ ⊕ C 0 −→ C 0 is the projection onto the second factor, then we can take the pull-back of these mappings to construct a 1-form θ 2 on TQ ⊕ C 0 as Using the 1-forms θ 1 and θ 2 , we have a presymplectic form By means of the energy function E, we obtain a presymplectic dynamics on the extended phase space TQ ⊕ C 0 which is equivalent to vakonomic mechanics: Theorem 5 Let L: TQ → R be a Lagrangian, and C ⊂ TQ a vector subbundle. For a path ξ in the manifold TQ ⊕ C 0 , consider the differential equation This equation is equivalent to the equation of motion of vakonomic mechanics in the following sense: • If ξ = (ξ 1 , ξ 2 ) is a solution of (7.1) and ξ 1 is the lift of a path in Q, ξ 1 =γ, then γ is an admissible path (γ is in C) and is a solution of the equation of motion of vakonomic mechanics (3.4).
If the Lagrangian is regular then equation (7.1) already implies that ξ 1 is the lift of a path in Q.
Proof: It is enough to check the equivalence in local coordinates. We take (q a , v a , λ i ), a = 1, . . . , n, i = 1, . . . , m, as local coordinates in TQ ⊕ C 0 (we represent an element of C 0 q as λ i α i (q)). Then we have Now let us consider the path ξ(t) = (q a (t), v a (t), λ i (t)), with velocityξ = (q, v, λ;q,v,λ). Then Therefore, equation iξΩ = dE is equivalent to the three equations The fact that ξ 1 is the lift of a path γ in Q means in coordinates that v(t) =q(t), so equation (7.3) is an identity. Notice also that if the Lagrangian is regular then the Hessian matrix ∂ 2 L ∂v a ∂v b is invertible, therefore in this case equation (7.3) implies that v(t) =q(t), that is to say, ξ 1 is the lift of a path in Q. Then, in equation (7.4) we obtain the constraints φ i (q,q) = α i a (q)q a = 0, that is, γ is an admissible path. Finally, we can write equation (7.2) as But these are the vakonomic equations (3.4) of the extended Lagrangian L = L + µ i α i a v a , using the natural identification between the functions µ i and the coordinates λ i of the cotangent vectors. ✷

Remark:
In a similar way, the vakonomic dynamics can be also defined on the manifold C ⊕ C 0 . Since C ⊕ C 0 is a vector subbundle of TQ ⊕ C 0 , we can pull-back the 2-form Ω and the energy function E to define a 2-formΩ and a new functionẼ in C ⊕ C 0 . The reader can check that, then the equation of motion of vakonomic mechanics (3.4) is equivalent to find the paths ξ = (ξ 1 , ξ 2 ) in C ⊕ C 0 , where ξ 1 is the lift of a path in Q, such that iξΩ = dẼ • ξ. (7.5) Moreover, if the lagrangian is regular, thenΩ is a symplectic form. Notice also that this equation, as well as equation (7.1), can also be expressed in terms of vector fields. For instance, whenΩ is symplectic, the solutions of equation (7.5) are the integral curves of the vector fieldX such that iXΩ = dẼ.
In the case of nonholonomic mechanics, a similar result can be proved, in the same way as for theorem 5. Let us denote Ω 1 = −dθ 1 . Then we have: Theorem 6 Let L: TQ → R be a Lagrangian, and C ⊂ TQ a vector subbundle. For a path ξ in the manifold TQ ⊕ C 0 , consider the differential equation This equation is equivalent to the equation of motion of nonholonomic mechanics in the following sense: • If ξ = (ξ 1 , ξ 2 ) is a solution of (7.6) where ξ 1 is the lift of a path γ in Q, ξ 1 =γ, then γ is a solution of the equation of motion of nonholonomic mechanics (4.3).
If the Lagrangian is regular then equation (7.6) already implies that ξ 1 is the lift of a path in Q. ✷

Conclusions
In this paper we have presented variational calculus (in one dimension) in a geometric framework, aiming to study dynamical systems with non-holonomic constraints (i.e., constraints depending on the positions and the velocities). We have shown that a generalised formulation of variational calculus, in which the admissible paths and the admissible infinitesimal variations are not necessarily related, makes room for the study of dynamical systems subject to non-holonomic constraints from different points of view. This generalized variational calculus encompasses the often-called vakonomic mechanics (which is a strict variational problem with constraints) and the non-holonomic mechanics (based on d'Alembert's principle).
In the case of vakonomic mechanics, we have provided a geometric procedure to obtain the equation of motion, choosing an appropriate set of admissible infinitesimal variations proving that they always exist.
In the case of non-holonomic mechanics, it is far more simple than in vakonomic mechanics to choose an appropriate set of admissible infinitesimal variations, and the corresponding equation of motion is readily obtained.
Our formulation also provides a neat equivalence between both vakonomic and non-holonomic mechanics when the constraints are integrable (also called holonomic).
We have also found the geometry lying on some particular cases of vakonomic mechanics, namely the case of optimal control and the case where the constraint submanifold is a vector subbundle of the tangent bundle.
All the paper is written for the case of time-independent lagrangian and constraints, but the reader may check that the time-dependent case may be dealt with by adjunction of the time variable in a not too involved way.