%(or, what is the same thing, of $\mu$  with respect of the coadjoint action of $G$ on ${\bf g}^*$).
\begin{enumerate}
\item
The submanifold
${\rm J}^{-1}(\mu )$ is stable under the action of $G_\mu$ and
so the quotient $J^{-1}(\mu )/G_\mu$ is well-defined
(it is called the
\textbf{orbit space} of ${\rm J}^{-1}(\mu )$).
\item
{\rm (Marsden--Weinstein's theorem)}.
Denote by $\pi \colon{\rm J}^{-1}(\mu ) \to{\rm J}^{-1}(\mu )/G_\mu$
the canonical projection and by
$\iota \colon{\rm J}^{-1}(\mu ) \hookrightarrow M$ the embedding.
Then, ${\rm J}^{-1}(\mu )/G_\mu$ is a differentiable manifold
which is endowed with a (unique) symplectic structure
$\widehat\Omega$ such that
$\iota^*\Omega = \pi^*\widehat\Omega$.
\item
If $G$ is a symmetry group of the
Hamiltonian system $(M,\Omega ,h)$,
then $({\rm J}^{-1}(\mu )/G_\mu ,\widehat\Omega ,\widehat h)$
is a Hamiltonian system, where
$\iota^*h = \pi^*\widehat h$.
\end{enumerate}
\end{teor}
\begin{proof}
\begin{enumerate}
\item
In fact, if $g \in G_{\mu}$, for all ${\rm p}\in{\rm J}^{-1}(\mu )$ we have
\Phi_g({\rm p}) = \Phi_g({\rm J}^{-1}(\mu)) =
{\rm J}^{-1}(g\mu )) = {\rm J}^{-1}(\mu ) \ ,
then ${\rm J}^{-1}(\mu )$ is invariant under the action of $G_{\mu}$
and the quotient is well-defined.
\item
We omit he proof of this statement because it is long and heavy.
It can be found in the above-mentioned references.
\item
It is evident, since $h$ is $G$-invariant
(and hence it is also $G_\mu$-invariant),
therefore it projects onto
${\rm J}^{-1}(\mu )/G_\mu$.
\end{enumerate}
\qed  \end{proof}

\chapter{Symplectic mechanics (II): Autonomous Lagrangian dynamical systems}
\protect\label{sdl}

The aim of this chapter is to state a geometrical formalism
for a particular kind of dynamical systems, those which are described by
Lagrangian functions and that, consequently, are {\sl variational}.
These systems admit a description as Hamiltonian dynamical systems,
but they present relevant particular characteristics.
This formulation gives rise to two formalisms: the so-called {\sl Lagrangian formalism}
and its associated {\sl canonical Hamiltonian formalism},
These kinds of systems include, as particular cases, a wide range of mechanical systems
which are very relevant in physics: the {\sl conservative Newtonian systems},
which are those whose configuration space is endowed with a metric
(they are studied in Chapter \ref{sdn}).

There are several alternative ways to state the geometric description for these kinds of systems.
The geometric framework where the theory is developed is the tangent bundle of a manifold, $\Tan Q$,
which represents the phase space of the system.
A selected function on it, the {\sl Lagrangian} $\Lag$,
is a depository of the physical information of the system.
Then, a first formulation consists in using $\Lag$ to define the so-called
{\sl Legendre transformation} which connects $\Tan Q$ and $\Tan^* Q$
and, if this map is a (local) diffeomorphism, use it to translate the Hamiltonian description previously stated in $\Tan^*Q$ to $\Tan Q$ (see, for instance, [1]).

The second and more general approach consists in using the canonical structures of the tangent bundle
to construct, starting from $\Lag$, the geometrical objects needed to establish the dynamics of the system.
This is the so-called {\sl Klein} or {\sl Cartan formulation} of the Lagrangian formalism, which was stated in the classical references
[159, 172, 193, 194, 217] and developed later by many other authors
[53, 96, 98, 101, 132, 305].
It has the advantage that is more direct and
does not need any previously established Hamiltonian formalism
(in fact, the existence of this Hamiltonian formalism is not
assured  for some singular Lagrangian systems).
This is the procedure that we follow in this exposition.

Another elegant alternative was developed in [326, 327],
using the concept of {\sl special symplectic manifold} and of
{\sl Lagrangian submanifold}, and obtaining both the Lagrangian and Hamiltonian formalisms
for Lagrangian systems and their equivalence.
Finally, another unified Lagrangian-Hamiltonian formalism for these systems
is given in [311].
These two approaches have subsequently been generalized
and applied in many physical contexts.

The structure of the chapter is as follows:
first, we introduce the mathematical framework which is needed
to state the Lagrangian formalism and its associated canonical Hamiltonian formalism;
that is, the canonical geometric structures of the tangent and the cotangent bundles of a manifold.
Next, we develop the Lagrangian formalism for {\sl dynamical Lagrangian systems}
and its associated {\sl canonical Hamiltonian formalism},
their equivalence, and the {\sl Hamilton--Jacobi theory}
for the Hamiltonian formalism.
Furthermore, we describe the {\sl Skinner-Rusk formalism,} which is
a nice formulation that unifies both the Lagrangian and the Hamiltonian formalism.
We also discuss the symmetries and conserved quantities in both formalisms,
paying special attention to those which are canonical lifts of diffeomorphisms and vector fields (which are called {\sl natural\/}),
and studying the equivalence of Lagrangians in this context.
Finally, we study the variational formulation introducing the {\sl Hamilton} and the {\sl Hamilton--Jacobi variational principles}
for the Lagrangian and the Hamiltonian formalisms, respectively.
Some relevant physical systems (the harmonic oscillator and the Kepler problem) are analyzed using this geometric treatment.

\section{Geometric structures of the tangent and cotangent bundles}
\protect\label{egft}

(See [96, 98, 101, 132, 159, 172, 193, 194, 217, 305]).

The tangent bundle of a manifold $Q$, denoted as   $\Tan Q$ (whose construction and main characteristics are reviewed in the appendix \ref{sec:tangentb})
is endowed with three canonical geometric structures:
the {\sl vertical subbundle}, the {\sl vertical endomorphism} and the {\sl Liouville vector field}.
Furthermore, there are some characteristic vector fields in $\Tan Q$,
those whose integral curves are obtained as solutions to
{\sl second-order differential equations} in $Q$.
Similarly, the {\sl cotangent bundle} of $Q$, denoted as $\Tan^*Q$
is endowed with some canonical differential forms.
Next, we present and discuss all these topics in detail.

Along this section, $Q$ is a differentiable manifold with $\dim\,Q=n$.

\subsection{The vertical subbundle. Vertical lift}

Considering the canonical projection $\tau_Q \colon \Tan Q \to Q$,
and its tangent map $\Tan\tau_Q\colon\Tan\Tan Q\to\Tan Q$.

\begin{definition}
Let $(q,u)\in\Tan Q$ and ${\rm V}_{(q,u)}(\tau_Q):=\ker \Tan_{(q,u)}\tau_Q$.
The \textbf{vertical subbundle} of $\Tan\Tan Q$ is the vector bundle (of rank $n$)
${\rm V}(\tau_Q)\to\Tan Q$, where
{\rm V}(\tau_Q) := \bigcup_{(q,u)\in\Tan Q}{\rm V}_{(q,u)}(\tau_Q) \ .

The sections of this bundle ${\rm V}(\tau_Q)\to\Tan Q$ are called \textbf{vertical vector fields},
and the set of all these vector fields is denoted by
$\vf^{V(\tau_Q)}(\Tan Q)$.
\end{definition}

It is immediate to prove that, in natural coordinates of $\Tan Q$,
the expression of these vector fields is
\(\dst f^i\derpar{}{v^i}\); that is, $\vf^{V(\tau_Q)}(\Tan Q)$
is locally generated by the set \(\dst\left\{\derpar{}{v^i}\right\}\).

Another interpretation of the fibers of ${\rm V}(\tau_Q)$ is the following:
for every $q\in Q$, consider the $n$-dimensional vector space $\Tan_qQ$,
as a differentiable manifold and the natural immersion
\begin{array}{cccc}
j_q \colon & \Tan_qQ & \to & \Tan Q
\\
& u & \mapsto & (q,u)
\end{array} \ .
Observe that $\tau_Q\circ j_x$ is the constant map equal to $x$.
If $u \in \Tan_qQ$, we have that
\Tan_uj_q \colon  \Tan_u\Tan_qQ \to \Tan_{(q,u)}\Tan Q \ ;
but, as $\tau_Q\circ j_q$ is a constant map,
then $\Tan_u(\tau_Q\circ j_q)=\Tan_{(q,u)}\tau_Q\circ\Tan_uj_q=0$.
This is equivalent to say that
${\rm Im}\,\Tan_uj_q\subseteq\ker \Tan_{(q,u)}\tau_Q={\rm V}_{(q,u)}(\tau_Q)$
and, as $j_q$ is an immersion,
\dim\,{\rm Im}\,\Tan_uj_q=\dim\,(\Tan_u\Tan_qQ=n=\dim\,{\rm V}_{(q,u)}(\tau_Q) \ ,
hence ${\rm Im}\,\Tan_uj_q={\rm V}_{(q,u)}(\tau_Q)$,
(since both of them have the same dimension and the first one is a subset of the second one).

As a consequence of the above discussion, ${\rm V}_{(q,u)}(\tau_Q)$
is identified naturally with $\Tan_u\Tan_qQ$,
through the isomorphism induced by $\Tan_uj_q$ onto its image.
Furthermore, as $\Tan_qQ$ is a vector space,
if $u \in \Tan_qQ$, we have that $\Tan_qQ$
is canonically identified with $\Tan_u(\Tan_qQ)$ by means of the directional derivative
\footnote{
Remember that, if $F$ is an $n$-dimensional real vector space and
$u \in F$, the natural identification between $F$ and $\Tan_uF$
is given as follows:
\begin{eqnarray*}
F & \to & \Tan_uF
\\
v & \mapsto & {\rm D}_v(u) \ ,
\end{eqnarray*}
where ${\rm D}_v(u)$ denotes the directional derivative with respect to the vector $v$ at the point $u$;
that is, if $f \colon \Real^n\simeq F\to \Real$ is any differentiable function, then
({\rm D}_v(u))f\equiv{\rm D}_vf(u):= \lim_{t \mapsto 0}\frac{f(u+tv)-f(u)}{t} \ .
If $x^1,\ldots ,x^n$ are coordinates in $F$ and
$v=(\lambda^1,\ldots ,\lambda^n)$, then
\(\dst ({\rm D}_v(u))f=\lambda^i\derpar{f}{x^i}\Big\vert_u\);
\(\dst {\rm D}_v(u)=\lambda^i\derpar{}{x^i}\Big\vert_u\),
and the identification is immediate.
Thus, ${\rm V}_{(q,u)}(\tau_Q)$ can also be identified with
In other words,
${\rm V}(\tau_Q)$ is the pull-back to $\Tan Q$ of the bundle
$\Tan Q$ over $Q$ by means of the map $\tau_Q$;
that is:
\begin{array}{ccccc}
{\rm V}(\tau_Q) & \simeq &\tau_Q^*(\Tan Q)& \to & \Tan Q
\\
& & \tau_{\Tan Q} \downarrow &  & \downarrow \tau_Q
\\
& & \Tan Q& \mapping{\tau_Q} & Q
\end{array} \ .
In this way, we have constructed the  isomorphism of vector spaces
\begin{eqnarray*}
\Tan_qQ & \to & \Tan_u\Tan_q Q\simeq{\rm V}_{(q,u)}(\tau_Q)\subset\Tan_{(q,u)}\Tan Q
\\
v & \mapsto & {\rm D}_v(q,u) \ ,
\end{eqnarray*}
where, if $f \in\Cinfty (\Tan Q)$, then
({\rm D}_v(q,u))f\equiv{\rm D}_vf(q,u)=\lim_{t \mapsto 0}\frac{f(q,u+tv)-f(q,u)}{t} \ .

\begin{definition}
The vector ${\rm D}_v(q,u)$ is called the
\textbf{vertical lift} of $v$ to the point $(q,u)$,
and the map
\begin{array}{ccccc}
\lambda_q^{(q,u)} & \colon &\Tan_qQ & \to & \Tan_{(q,u)}\Tan Q
\\
& & v & \mapsto & {\rm D}_v(q,u)
\end{array}
which implements the above isomorphism is called the
\textbf{vertical lift}.
\end{definition}

In natural coordinates, if \(\dst v=\lambda^i\derpar{}{q^i}\Big\vert_{(q,u)}\),
then \(\dst\lambda_q^{(q,u)}(v)=\lambda^i\derpar{}{v^i}\Big\vert_{(q,u)}\).

The vertical lift is extended in a natural way to the vector fields of $\vf(Q)$ and the mapping $\lambda^V:\vf(Q) \to \vf^{V(\tau_Q)}(\Tan Q)$,
is $\Cinfty(Q)$-lineal.

In natural coordinates, if \(\dst X=f^i\derpar{}{q^i}\),
then its vertical lift is
\(\dst\lambda^V(X)\equiv  X^V=\tau^*_Qf^i\derpar{}{v^i}\).

\subsection{The canonical (or vertical) endomorphism}

\begin{definition}
Let $(q,u)\in\Tan Q$. The map
\begin{array}{cccc}
J_{(q,u)} \colon & \Tan_{(q,u)}\Tan Q & \to & \Tan_{(q,u)}\Tan Q
\\
& Y & \mapsto & {\rm D}_{(\Tan_{(q,u)}\tau_Q)Y}(q,u)=
\lambda_q^{(q,u)}(\Tan_{(q,u)}\tau_Q(Y))
\end{array}
is called the \textbf{canonical} or \textbf{vertical endomorphism} (at $(q,u)$).
\end{definition}

Observe that $J_{(q,u)}Y$ is the vertical lift of $(\Tan_{(q,u)}\tau_Q)Y$
to the point $(q,u)$ (that is, $J_{(q,u)}$ consists in projecting
to $\Tan_qQ$ and to lift vertically).

It is clear that the image of $J_{(q,u)}$ is in
${\rm V}_{(q,u)}(\tau_Q)$ and, as $\Tan_{(q,u)}\tau_Q$ is a surjective map,
it coincides with ${\rm V}_{(q,u)}(\tau_Q)=\ker\, J_{(q,u)}$.

\begin{prop}
The canonical endomorphism has the following properties:
for $(q,u)\in\Tan_qQ$,
\ben
\item
${\rm Im}\, J_{(q,u)}={\rm V}_{(q,u)}(\tau_Q)=\ker\, J_{(q,u)}$.
\item
\een
\end{prop}

The action of $J$ is extended in a natural way to vector fields:
J\colon \vf(\Tan Q) \to\vf^{V(\tau_Q)}(\Tan Q)\subset\vf(\Tan Q) \ ,
and to differential forms:
J^*&\colon&\df^k(\Tan Q)&\longrightarrow&\df^k(\Tan Q) \\
& & \alpha & \mapsto & \inn(J)\alpha
\end{array} \ ,
where $J^*\alpha=\inn(J)\alpha$ is defined as
[\inn(J)\alpha](\moment{X}{1}{k}):=\alpha(J(X_1),\ldots ,
J(X_i),\ldots ,J(X_k)) \ .
In particular, if $k=1$, then we have that
$\inn(J)\alpha=\alpha\circ J$, which is a
$1$-form verifying that
$\inn(X)(\inn(J)\alpha)=0$, for every $X\in\vf^{V(\tau_Q)}(\Tan Q)$.
These kinds of differential forms are called {\sl $\tau_Q$-semibasic forms}.

\noindent{\bf Local expressions}:
If $(q^i,v^i)$ are natural coordinates in $\Tan Q$, we have
{\rm D}_{\derpar{}{q^i}\Big\vert_q}(q,u)=\derpar{}{v^i}\Big\vert_{(q,u)}
\quad , \quad
J_{(q,u)}\derpar{}{v^i}\Big\vert_{(q,u)}={\rm D}_0(q,u)=0 \ ;
then, the local expression of $J_{(q,u)}$ is
J_{(q,u)}=\d q^i\Big\vert_{(q,u)}\otimes\derpar{}{v^i}\Big\vert_{(q,u)} \ ,
and, by extension,
J=\d q^i\otimes\derpar{}{v^i} \ .
Observe that $J$ is a tensor field of type $(1,1)$ in $\Tan Q$.

\subsection{The Liouville vector field}

\begin{definition}
Let $q\in Q$ and $(q,v)\in\Tan Q$.
Consider the vertical lift of  the vector $v\in \Tan_qQ$
to the point $(q,v)$; that is, ${\rm D}_v(q,v)$.
This operation allows us to construct a vertical vector field
$\Delta \in \vf(\Tan Q)$, which is called the \textbf{Liouville vector field},
as follows:
\begin{array}{cccc}
\Delta \colon & \Tan Q & \to & \Tan\Tan Q
\\
& (q,v) & \mapsto & ((q,v),{\rm D}_v(q,v))
\end{array}
\end{definition}

\noindent{\bf Local expression}:
In local coordinates $(q^i,v^i)$ en $\Tan Q$;
let $f\colon\Tan Q \to \Real$ be a function and $(q,v)\in\Tan Q$;
then we have that
\Delta_{(q,v)}f={\rm D}_v(q,v)f=
\lim_{t \mapsto 0}\frac{f(q,v+tv)-f(q,v)}{t} \ ;
\begin{eqnarray*}
\Delta_{(q,v)}q^i &=&
\lim_{t \mapsto 0}\frac{q^i(q,v+tv)-q^i(q,v)}{t}
=\lim_{t \mapsto 0}\frac{q^i(q)-q^i(q)}{t}=0 \ ,
\\
\Delta_{(q,v)}v^i&=&
\lim_{t \mapsto 0}\frac{v^i(q,v+tv)-v^i(q,v)}{t}
=\lim_{t \mapsto 0}\frac{(v+tv)(q^i)-v(q^i)}{t}=v(q^i)=v^i(q,v) \ ,
\end{eqnarray*}
and hence, the local expression of $\Delta$ is
\Delta=v^i\derpar{}{v^i} \ .

Bearing in mind that the fibers $\Tan_qQ$ of the
tangent bundle are vector spaces, and that
$\Delta_{(q,v)}=v\in\Tan_qQ$, for every $(q,v)\in\Tan Q$,
it is usual to say that $\Delta$ is the vector field that generates
the dilatations along the fibers of $\Tan Q$.
Another way to see this interpretation is considering the local
expression of $\Delta$ and its associated system of differential equations
\frac{d q^i}{d t}=0 \quad , \quad
\frac{d v^i}{d t}=v^i \ ,
whose general solution is
q^i(t)=A^i \quad ,\quad
v^i(t)=B^ie^t \quad ;\quad (A^i,B^i \ ctns.) \ .
Thus, the flux of $\Delta$ is
\begin{array}{ccccc}
F^\Delta&\colon&\Real\times\Tan Q&\longrightarrow&\Tan Q \\
& & (t,q^i,v^i) & \mapsto & (q^i,v^ie^t)
\end{array} \ .
Hence, the elements of the uniparametric local group of diffeomorphisms generated by $\Delta$ are
\begin{array}{ccccc}
F^\Delta_t&\colon&\Tan Q&\longrightarrow&\Tan Q \\
& & (q^i,v^i) & \mapsto & (q^i,v^ie^t) \ ;
\end{array}
that is, they are homothetics on the fibers with positive reason.

\subsection{Holonomic curves. Second Order Differential Equations}

A curve in $\Tan Q$ is not necessarily the canonical lift
of a curve in the base manifold $Q$
\footnote{
See the Appendix \ref{canliftq}}.
Then we define:

\begin{definition}
A curve $\sigma\colon (a,b)\subseteq\Real\to\Tan Q$ is
\textbf{holonomic} if there exists $\gamma\colon (a,b)\subseteq\Real\to Q$
such that $\sigma=\widetilde\gamma$.
\end{definition}

In natural coordinates, $\sigma(t)=(q^i(t),v^i(t))$,
is a canonical lift if, and only if,
$v^i(t)=\dot q^i(t)$.

\begin{definition}
Let $\sigma\colon (a,b)\subseteq\Real\to\Tan Q$ a curve
in $\Tan Q$. Then $\tau_Q\circ\sigma\colon (a,b)\subseteq\Real\to Q$
is a curve in $Q$, which is called the
\textbf{curve in the base manifold} associated with $\sigma$.
\end{definition}

Using this, we can characterize holonomic curves as follows:

\begin{prop}
A curve $\sigma\colon (a,b)\subseteq\Real\to\Tan Q$ is
holonomic if, and only if,
\end{prop}
\begin{proof}
($\Longrightarrow$) \quad
If $\sigma$ is holonomic then there exists $\gamma\colon (a,b)\subseteq\Real\to Q$
such that $\sigma=\widetilde  \gamma$; therefore
\tau_Q\circ\sigma=\tau_Q\circ\widetilde  \gamma=\gamma
\quad \Longrightarrow \quad
\widetilde{(\tau_Q\circ\sigma)}=\widetilde  \gamma=\sigma \ .
($\Longleftarrow$) \quad
The converse is immediate.
\\ \qed  \end{proof}

Finally, we have the following fundamental result:

\begin{prop}
\label{lema2}
\ben
\item
Let $\varphi\colon Q\to Q$ be a diffeomorphism and
$\Tan\varphi\colon \Tan Q \to \Tan Q$ its canonical lift to $\Tan Q$. Then
(\Tan\varphi)^*J = J\quad , \quad
(\Tan\varphi)_*\Delta=\Delta \ .
\item
Let $Z\in\vf (Q)$ and $Z^C\in\vf(\Tan Q)$  its canonical lift to $\Tan Q$.
Then the canonical endomorphism $J$ and the Liouville vector field $\Delta$
are invariant by the uniparametric group of local diffeomorphisms generated by $Z^C$.
\label{constq}
\een
\end{prop}
\begin{proof}
\bit
\item
The result for $J$ is  a straightforward consequence of the local expressions
of $J$ and $\Tan\varphi$.

The result for $\Delta$ is  a straightforward consequence of the property
$\Tan\varphi\circ F_t^\Delta=F_t^\Delta\circ\Tan\varphi$,
where $F_t^\Delta$ is an element uniparametric group of local diffeomorphisms generated by $\Delta$.
\item
It is immediate from the above result, taking the
uniparametric group of local diffeomorphisms generated by $Z$ and $Z^C$.
\eit
\qed  \end{proof}

This means that the canonical lifts of diffeomorphisms and vector fields
to the tangent bundle preserve the canonical structures of this bundle.

\begin{definition}
A vector field $X\in\vf(\Tan Q)$ is a
\textbf{Second Order Differential Equation ({\sc sode})}
or also a \textbf{holonomic vector field}
\footnote{It is also said that $X$ satisfies the
\textbf{second-order condition}.}
if its integral curves are holonomic.
\end{definition}

The local interpretation of this definition is as follows:

\begin{prop}
The necessary and sufficient condition for a vector field
$X\in\vf(\Tan Q)$ to be a {\sc sode} is that its local expression
in any natural system of coordinates in $\Tan Q$ is
\beq
X=v^i\derpar{}{q^i}+g^i\derpar{}{v^i} \ ;
\label{cvedso}
\eeq
that is,
$X_{(q,v)}=(v^i,g^i(q,v))$, for every $(q,v)\in\Tan Q$.
\end{prop}
\begin{proof}
In natural coordinates, the general expression of $X\in\vf(\Tan Q)$ is
\(\dst X=f^i\derpar{}{q^i}+g^i\derpar{}{v^i}\).
Let $\sigma\colon (a,b)\subset\Real\to \Tan Q$
be an integral curve of $X$, with $\sigma(t)=(q^i(t),v^i(t))$; then
\beq
\frac{d q^i}{d t}=(f^i\circ\sigma)(t)=f^i(q^j(t),v^j(t))
\quad , \quad
\frac{d v^i}{d t}=(g^i\circ\sigma)(t)=g^i(q^j(t),v^j(t)) \ .
\label{edo1}
\eeq
Furthermore, if $X$ is a {\sc sode}, by definition there exists
$\gamma\colon (a,b)\subset\Real\to Q$, with $\gamma(t)=(q^i(t))$,
such that $\sigma=\widetilde  \gamma$; that is,
$\sigma(t)=(q^i(t),\dot q^i(t))$.
Therefore, we have that $\dot q^i(t)=v^i(t)$, for $i=1,\ldots ,n$;
and hence, going to the first group of equations (\ref{edo1}), we obtain that
v^i(t)=\frac{d q^i}{d t}=f^i(q^j(t),v^j(t)) \quad , \quad t\in (a,b) \ ,
and the result follows.

\quad($\Longleftarrow$)\quad
If \(\dst X=v^i\derpar{}{q^i}+g^i\derpar{}{v^i}\), then its integral curves
$\sigma\colon (a,b)\subset\Real\to \Tan Q$, with $\sigma(t)=(q^i(t),v^i(t))$,
are determined by the system
\frac{d q^i}{d t}=(v^i\circ\sigma)(t)=v^i(t)
\quad , \quad
\frac{d v^i}{d t}=(g^i\circ\sigma)(t)=g^i(q^j(t),v^j(t)) \ ;
that is, $\sigma(t)=(q^i(t),\dot q^i(t))$.
Therefore, they are holonomic curves and $X$ is a {\sc sode}.
\\ \qed  \end{proof}

\begin{remark}{\rm
Observe that, with the above conditions,
the second group of equations (\ref{edo1}) is written as
\frac{d^2 q^i}{d t^2}=f^i(q^j,\dot q^j) \ ,
which is a system of  second order ordinary differential equations,
whose solution completely determines the integral curves of $X$.
This fact justifies the name {\sc sode} for this kind of vector fields.

From this result, we obtain the following intrinsic characterization:

\begin{prop}
The necessary and sufficient condition for $X\in\vf(\Tan Q)$ to be a {\sc sode} is that
J(X)=\Delta \ .
\end{prop}
\begin{proof}
In natural coordinates, the general expression of $X\in\vf(\Tan Q)$ is
\(\dst X=f^i\derpar{}{q^i}+g^i\derpar{}{v^i}\); then
\quad \Longleftrightarrow \quad f^i=v^i \ ,
and the result follows from the above proposition.
\\ \qed  \end{proof}

There is another intrinsic characterization as follows:
the bundle $\Tan \Tan Q$ has two natural projections
\begin{array}{ccc}
\Tan\Tan Q&\mapping{\Tan\tau_Q}&\Tan Q
\\
\tau_{\Tan Q}\downarrow& &\downarrow\tau_Q
\\
\Tan Q&\mapping{\tau_Q}&Q
\end{array} \ .
Taking natural coordinates in the bundles $\Tan Q$ and
$\Tan\Tan Q$, and reminding the expression (\ref{matrix1}),
for every $((q,v),Y_{(q,v)})\equiv (q^i,v^i;u^i,w^i)\in\Tan\Tan Q$,
we have that
\begin{array}{ccccccc}
\tau_{\Tan Q}((q,v),Y_{(q,v)})&=&\tau_{\Tan Q}(q^i,v^i;u^i,w^i)&=&(q^i,v^i)& & \\
\Tan\tau_Q((q,v),Y_{(q,v)})&=&\tau_{\Tan Q}(q^i,v^i;u^i,w^i)&=&
(\tau_Q(q^i,v^i),\Tan_{(q^i,v^i)}\tau_Q(u^i,w^i))&=&(q^i,u^i) \ .
\end{array}
By definition, $X\in\vf(\Tan Q)$ is a section of the projection
$\tau_{\Tan Q}$; that is, a map $X\colon\Tan Q\to\Tan\Tan Q$
such that $\tau_{\Tan Q}\circ X={\rm Id}_{\Tan Q}$. Then:

\begin{prop}
The necessary and sufficient condition for a vector field
$X\in\vf(\Tan Q)$ to be a {\sc sode} is that $X$ is a section
of the projection $\Tan\tau_Q$; that is,  a map
$X\colon\Tan Q\to\Tan\Tan Q$ such that
\Tan\tau_Q\circ X ={\rm Id}_{\Tan Q}
\end{prop}
\begin{proof}
In natural coordinates, the general expression of
$X\in\vf(\Tan Q)$ is
\(\dst X=f^i\derpar{}{q^i}+g^i\derpar{}{v^i}\);
that is, for every
$(q,v)\equiv (q^i,v^i)\in\Tan Q$, it is a map
X(q,v)=X(q^i,v^i)=(q^i,v^i;f^i(q,v),g^i(q,v)) \ .
(\Tan\tau_Q\circ X)(q,v)=(\Tan\tau_Q\circ X)(q^i,v^i)=
\Tan\tau_Q(q^i,v^i;f^i(q,v),g^i(q,v))=(q^i,f^i(q,v)) \ ;
and, as ${\rm Id}_{\Tan Q}(q,v)=(q^i,v^i)$, we have that
(\Tan\tau_Q\circ X)(q,v)={\rm Id}_{\Tan Q}(q,v)\quad
\Longleftrightarrow \quad f^i=v^i \ ,
and the result follows.
\\ \qed  \end{proof}

\begin{remark}{\rm
Summarizing, we have proved that the following assertions are equivalent:
\begin{enumerate}
\item
A vector field $X\in\vf(\Tan Q)$ is a {\sc sode}.
\item
The integral curves of $X$ are canonical lifts of curves in $Q$.
\item
The expression of $X$ in a system of natural coordinates in $\Tan Q$,
is (\ref{cvedso}).
\item
\item
$\Tan\tau_Q\circ X ={\rm Id}_{\Tan Q}$.
\end{enumerate}

\subsection{Canonical forms in the cotangent bundle}

An essential characteristic of the
cotangent bundle is the following:

\begin{teor}
The cotangent bundle $\Tan^*Q$ is endowed with a canonical $2$-form
which is closed and nondegenerate and, hence, it
is a {\sl symplectic manifold}.
\label{ficotvs}
\end{teor}
\begin{proof}
As we know,
$\Tan^*Q := \{ {\rm p}= (q,\xi) \ \mid \ q \in Q \ ,  \ \xi \in \Tan^*_qQ \}$.
As $\Tan^*Q$ is a differentiable manifold,
we can consider its tangent bundle $\Tan\Tan^*Q$
and the tangent structure induced by
$\pi_Q \colon \Tan^*Q \to Q$,
which must be understood as a fiber map
$\Tan_{(q,\xi)}\pi_Q \colon \Tan_{(q,\xi)}\Tan^*Q \to \Tan_q Q$.
Now, we prove the theorem constructively using the fiber projection.
\begin{enumerate}
\item
We construct the  differential $1$-form
$\Theta \in {\mit\Omega}^1(\Tan^*Q)$
as follows: for every ${\rm p}=(q,\xi) \in \Tan^*Q$ and
$X_{\rm p} \in \Tan_{\rm p}\Tan^*Q$,
\Theta_{\rm p}(X_{\rm p}) := \xi(\Tan_{\rm p}\pi_Q(X_{\rm p})) \ .
Its expression in a natural chart of coordinates of $\Tan^*Q$
is obtained in the following way:
as we have seen in proposition \ref{prop:cotbun} of the Appendix \ref{sec:cotbun},
$\xi = p_i({\rm p})\,\d q^i\mid_q$;
furthermore, every $X_{\rm p} \in \Tan_{\rm p}(\Tan^*Q)$ has the local expression
\(\dst X_{\rm p}= A^j\derpar{}{q^j}\Big\vert_{\rm p}+B_j\derpar{}{p_j}\Big\vert_{\rm p}\),
and the general expression of $\Theta_{\rm p}$ is
$\Theta_{\rm p}= a_i\,\d q^i\mid_{\rm p} + b^i\,\d p_i\mid_{\rm p}$, then
\Theta_{\rm p}(X_{\rm p}) = a_iA^i + b^iB_i \ ;
but, from the definition,
\begin{eqnarray*}
\Theta_{\rm p}(X_{\rm p}) &:=& \xi(\Tan_{\rm p}\pi_Q(X_{\rm p}))
=(p_i(m)\d q^i\mid_q)
\left[\Tan_{\rm p}\pi_Q \Big(A^j\derpar{}{q^j}\Big\vert_{\rm p}+
B_j\derpar{}{p_j}\Big\vert_{\rm p}\Big)\right]
\\ &=&
(p_i({\rm p})\d q^i\mid_x)\Big( A^j\derpar{}{q^j}\Big\vert_q\Big)
= p_i({\rm p})A^j\delta^i_j = p_i({\rm p})A^i \ ,
\end{eqnarray*}
and as this holds for every $X_{\rm p}$ (that is, for every $A^i,B_i$),
from the above expressions we obtain that
$a_i=p_i(m)$ and $b^i=0$; that is, the final local expression of $\Theta$ is
\Theta = p_i\,\d q^i \ .
\item
We define the differential $2$-form
\Omega := -\d\Theta \ ,
whose local expression in a natural chart is
\Omega = \d q^i \wedge \d p_i \ .
\end{enumerate}
Obviously $\Omega$ is closed (because it is exact)
and  nondegenerate (as we can see from its local expression in coordinates).
\\ \qed  \end{proof}

Then, cotangent bundles of manifolds are the canonical models of symplectic manifolds, since they carry a canonical symplectic form.
Furthermore,  their natural coordinates are also the Darboux coordinates
for this canonical symplectic form.

\begin{definition}
The forms $\Theta \in {\mit\Omega}^1(\Tan^*Q)$
and $\Omega \in {\mit\Omega}^2(\Tan^*Q)$ are the
\textbf{$1$ and $2$ canonical forms} of the cotangent bundle
\footnote{ The $1$-form $\Theta$ is also called the {\sl tautological form} of $\Tan^*Q$.}.
\end{definition}

From Proposition \ref{Liouville} we have that:

\begin{prop}
The cotangent bundle of a differentiable manifold is an
{\sl oriented} manifold.
\end{prop}

%\subsection{Canonical lifts to the cotangent bundle}
The canonical lift of a vector field in $Q$ to the cotangent bundle $\Tan^*Q$
\footnote{
See the Appendix \ref{sec:cotbun}.}
can be characterized using the canonical forms. First we define:

\begin{definition}
Every vector field $Z\in\vf (Q)$
induces a function $F_Z\in\Cinfty (\Tan^*Q)$ defined as
\begin{array}{ccccc}
\\
& &{\rm p}\equiv (q,\xi ) & \mapsto & \xi (Z_q)
\end{array}
\end{definition}

Taking into account the definition of the canonical  1-form
$\Theta$ of $\Tan^*Q$ and Proposition \ref{prolevcan}
we have that, for every ${\rm p}\equiv (q,\xi)\in\Tan^*Q$,
F_Z({\rm p})\equiv F_Z(q,\xi)=\xi (Z_q)=\xi (\Tan \pi_Q (Z^*_{\rm p}))=\Theta_{\rm p}(Z^*_{\rm p}) \ ,
and thus we have proved that:

\begin{prop}
If $Z\in\vf (Q)$,  then $F_Z=\Theta (Z^*)$.
\end{prop}

Bearing this in mind, we obtain that:

\begin{prop}
If $Z\in\vf (Q)$, then the canonical lift of $Z$ to $\Tan^*Q$
is the only vector field $Z^*\in\vf (\Tan^*Q)$ such that
$\inn (Z^*)\Omega =\d F_Z$
\footnote{
That is, with the terminology of Section \ref{icch},
$Z^*$ is the  (global) Hamiltonian vector field associated with the function $F_Z$.}.
\label{hamlev}
\end{prop}
\begin{proof}
In fact, using the Cartan formula and taking into account Proposition \ref{levdif},
\inn (Z^*)\Omega =-\inn (Z^*)\d\Theta =
\d\inn (Z^*)\Theta -\Lie (Z^*)\Theta =\d (\Theta (Z^*))=\d F_Z
since, according to Proposition \ref{levdif},
as the local uniparametric groups of diffeomorphisms of $Z^*$
are canonical lifts,
they let  the canonical forms of $\Tan^*Q$ invariant, and then
$\Lie (Z^*)\Theta =0$.
\\ \qed \end{proof}

\noindent {\bf Local expression}:
Bearing in mind this characterization, it is easy to obtain the local expression
of $Z^*$ in a chart of canonical coordinates
$(U;q^i,p_i)$ of $\Tan^*Q$. So, if
\ $\displaystyle Z\vert_{\pi_Q (U)}=f^i(q)\derpar{}{q^i}$,\
we have that $F_Z(q^i,p_i)=p_if^i(q^j)$, and then
\beq
Z^*\vert_U=f^i\derpar{}{q^i}-p_j\derpar{f^j}{q^i}\derpar{}{p_i} \ .
\label{canlifcot}
\eeq

Finally, from Proposition \ref{levdif} we obtain:

\begin{prop}
If $Z\in\vf (Q)$, then
\Lie(Z^*)\Theta=0 \quad , \quad
\Lie(Z^*)\Omega=0 \ .
\label{inf}
\end{prop}
\begin{proof}
To prove this, it suffices to take the local uniparametric groups of diffeomorphisms
of $Z$ and their canonical lifts.
\\ \qed \end{proof}

\subsection{Fiber derivative of a function}

Let $F\in\Cinfty(\Tan Q)$.
Given $q \in Q$, we consider the function $F_q \colon \Tan_qQ \to \Real$,
which is the restriction of $F$ to the fiber $\Tan_qQ$.
If $(q,u)\in \Tan Q$, the differential of $F_q$ at this point
is an element of $\Tan_q^*Q$; so ${\rm D}_{(q,u)}F_q \in \Tan^*_qQ$. Then:

\begin{definition}
The \textbf{fiber derivative} of $F$ is the map
\begin{array}{ccccc}
{\cal F}F & \colon & \Tan Q & \to & \Tan^*Q
\\
& & (q,u) & \mapsto & (q,{\rm D}F_q(u))
\end{array} \ .
\end{definition}

Observe that $\pi_Q \circ{\cal F}F = \tau_Q$;
that is, ${\cal F}F$ preserve the fibers.

\noindent {\bf Local expressions}:
Consider a natural chart $(U;q^i,v^i)$ of $\Tan Q$
and the corresponding canonical chart $({\cal F}F(U);q^i,p_i)$ in $\Tan^* Q$.
Observe that a basis of $\Tan_qQ$ is
\(\dst \left\{ \derpar{}{q^i}\Big\vert_q\right\} \),
and the coordinates in $\Tan_qQ$ are $(v^1,\ldots ,v^n)$.
Then, the Jacobian matrix of ${\rm D}_{(q,u )}F_q$ is
\left( \derpar{F}{v^1}\Big\vert_{(q,u)} \ldots
\derpar{F}{v^n}\Big\vert_{(q,u)} \right) \ ,
and if  \(\dst v=\lambda^i\derpar{}{q^i}\Big\vert_q \in \Tan_qQ\), then
({\rm D}_{(q,u)}F_q)(v) =
\left( \derpar{F}{v^1}\Big\vert_{(q,u)} \ldots
\derpar{F}{v^n}\Big\vert_{(q,u)} \right)
\left(\begin{matrix}\lambda^1 \\ \vdots \\ \lambda^n \end{matrix}\right)\ ,
and therefore
{\cal F}F(x,u) = \left( q,\derpar{F}{v^i}\Big\vert_{(q,u)}\d q^i
\Big\vert_q\right) \ ;
that is, the expression in coordinates of ${\cal F}F$ is
q^i \circ{\cal F}F = q^i \quad , \quad p_i \circ{\cal F}F =\derpar{F}{v^i}
\ .

\section{Lagrangian formalism for Lagrangian dynamical systems}

Next we introduce the so-called {\sl Lagrangian formalism} of the
Lagrangian dynamical systems,
stating first what are these kinds of systems.

\subsection{Lagrangian dynamical systems}
\label{poslagdyn}

The physical and geometrical foundations of this formulation are the following:

\begin{pos}
{\rm (First Postulate of Lagrangian mechanics\/)}:
In a physical Lagrangian system,  the $n$ possible degrees of freedom of the system
are described by the domain of variation of a set of $n$
{\sl generalized coordinates}
\footnote{
If we have a mechanical system, the generalized coordinates
correspond to degrees of freedom of ``mechanical type'' (for instance.,
position coordinates). But if we have a more generic physical system,
such as an electric or a thermodynamical system,
then the generalized coordinates correspond to other kinds of physical magnitudes
(for instance, electric charge, temperature, etc.).
which determine locally the {\sl configuration space} of the system.
The {\rm states} of the system are locally described by means of
generalized coordinates and their corresponding
generalized velocities.

Geometrically, this means that
the configuration space $Q$ of a dynamical system
with $n$ degrees of freedom is a $n$-dimensional differentiable manifold,
and that
the phase space is the tangent bundle $\Tan Q$ of the configuration manifold $Q$,
which is called the
\textbf{state} or \textbf{phase space} of \textbf{positions-velocities} of the system.
\end{pos}

\begin{pos}
{\rm (Second Postulate of Lagrangian mechanics\/)}:
The observables or physical magnitudes of a
dynamical system are functions of $\Cinfty (\Tan Q)$.

The result of a measure of an observable is the value that the function
which represents the observable takes at a point of the phase space $\Tan Q$
(that is, in some state, following the first postulate).
\end{pos}

\begin{pos}
{\rm (Third Postulate of Lagrangian mechanics\/)}:
There is a function $\Lag \in \Cinfty (\Tan Q)$, called \textbf{Lagrangian function},
which carries the dynamical information of the system.
\end{pos}

As we are going to see,
from this function and using  the geometrical structures of the
tangent bundle, one can construct a differential form
$\Omega_\Lag\in\df^2(\Tan Q)$ and the so-called
{\sl Lagrangian Energy function} $E_\Lag\in\Cinfty(\Tan Q)$,
and we can set the dynamical equations of the system
(Postulate \ref{4poslag}).

Taking all of this into account, we define:

\begin{definition}
A \textbf{Lagrangian dynamical system} is a pair $(\Tan Q,\Lag )$,
where $Q$ is a manifold representing the configuration space of
a physical system and $\Lag \in \Cinfty (\Tan Q)$
is the Lagrangian function of the system.
\end{definition}

\begin{remark}{\rm
It is important to point out that the dynamical systems which are
described in this way are {\sl autonomous}; that is, {\sl independent of time}
(a geometrical description of {\sl  dynamical systems}
is presented in Chapter \ref{chap:cosym}).
They are also {\sl first-order} systems,
which are those  whose Lagrangian function
depends locally on the coordinates of position and velocity,
in contrast with those for which the dependence is also on the
{\sl generalized accelerations} or, in general,
higher-order time-derivatives of the generalized positions.
(For the geometrical description of {\sl higher-order} systems,
see, for instance, [38, 48, 67, 133, 190, 191, 220, 285, 286, 287]).

In the next section we explain how, using the canonical structures of the
tangent bundle introduced in Section  \ref{egft} and starting from the Lagrangian function,
we can construct the dynamical-geometric structures which allow us to
set the dynamical equations in an intrinsic way.
In this way, we will complete the set of Postulates of the Lagrangian formalism.

\subsection{Geometric structures induced by the dynamics}

Given a Lagrangian function $\Lag \in \Cinfty (\Tan Q)$ and
using the canonical structures of the tangent bundle
(the vertical endomorphism
$J \colon \vf (\Tan Q) \to \vf^{V(\tau_Q)}(\Tan Q)$
and the Liouville vector field $\Delta \in \vf^{V(\tau_Q)}(\Tan Q)$)
we can define the following elements:

\begin{definition}
The \textbf{Cartan} or \textbf{Lagrangian $1$-form} associated with $\Lag$ is
\Theta_\Lag := \inn(J)\d\Lag=\d \Lag \circ J \in \df^1(\Tan Q) \ .
The \textbf{Cartan}  or \textbf{Lagrangian $2$-form} associated with $\Lag$ is
\Omega_\Lag := -\d \Theta_\Lag \in \df^2(\Tan Q) \ .
\end{definition}

\begin{definition}
The \textbf{Lagrangian action} associated with $\Lag$ is the function
A_\Lag := \Delta (\Lag ) \in \Cinfty (\Tan Q) \ .
The \textbf{Lagrangian energy} associated with $\Lag$ is the function
E_\Lag := A_\Lag - \Lag \in \Cinfty (\Tan Q) \ .
\end{definition}

\begin{remark}{\rm
\begin{itemize}
\item
The physical observable represented by the Lagrangian energy
is the total energy of the system, and this justifies this terminology.
\item
There are Lagrangian functions which, being different, give the same
Lagrangian form $\Omega_{\Lag}$ and the same Lagrangian energy $ E_{\Lag}$.
They are called {\sl gauge-equivalent Lagrangians} (and they are studied in Section \ref{flsltn}).
\item
It is important to point out that, for an arbitrary function
$\Lag \in \Cinfty (\Tan Q)$, the form $\Omega_\Lag$
has not constant rank in $\Tan Q$ necessarily.
The Lagrangian $\Lag$ is said to be {\sl  geometrically admissible}
when this rank is constant.
The theory we are developing concerns Lagrangian systems of this kind
\footnote{
When this is not the case,
there exists a more general framework which consists in using {\sl Poisson manifolds} as phase states for the formalism (see, for instance, [238]).
\end{itemize}

\noindent {\bf Local expressions}:
Consider a natural  chart $(U;q^i,v^i)$ in$\Tan Q$.
Remember that the local expression of the vertical endomorphism and
the Liouville vector field on this chart are
$\displaystyle J = \d q^i\otimes \derpar{}{v^i}$ and
$\displaystyle \Delta = v^i\derpar{}{v^i}$. Then,
given a Lagrangian function $\Lag=\Lag (q^i,v^i)$,
the local expressions of the action and the Lagrangian energy associated with the Lagrangian $\Lag$ are
A_\Lag = v^i\derpar{\Lag}{v^i}
\quad , \quad
E_\Lag = v^i\derpar{\Lag}{v^i} - \Lag \ .
The more general expression for a $1$-form in $\Tan Q$ is
\Theta_\Lag = a_i(q^j,v^j) \d q^i + b_i(q^j,v^j) \d v^i \ ,
then, for an arbitrary $Y\in\vf (\Tan Q)$,
Y = A^i(q^j,v^j) \derpar{}{q^i} + B^i(q^j,v^j) \derpar{}{v^i} \ ,
we have that
\Theta_\Lag (Y) = a_iA^i +b_iB^i
and furthermore, by definition,
\Theta_\Lag (Y) := (\d \Lag \circ J)(Y) =
\left(\derpar{\Lag}{q^i}\d q^i + \derpar{\Lag}{v^i}\d v^i\right)
\left(A^i\derpar{}{v^i}\right)
=A^i \derpar{\Lag}{v^i} \ ;
therefore, from both expressions we obtain that
\(\dst a_i = \derpar{\Lag}{v^i}\) and $b_i = 0$; that is
\Theta_\Lag  = \derpar{\Lag}{v^i}\,\d q^i \ ,
and, as a consequence,
\Omega_\Lag  =
\frac{\partial^2\Lag}{\partial q^j \partial v^i}\, \d q^i \wedge \d q^j +
\frac{\partial^2\Lag}{\partial v^j \partial v^i}\, \d q^i \wedge \d v^j \ .

It is important to remark that, for an arbitrary function
$\Lag \in \Cinfty (\Tan Q)$, although the Lagrangian $2$-form $\Omega_\Lag$
is always closed, it is not necessarily non-degenerated
(since, as it is seen from the above local expression, its rank
is determined by the second derivatives of the function $\Lag$). Then:

\begin{definition}
$\Lag \in \Cinfty (\Tan Q)$ is a  \textbf{regular Lagrangian function}
(and  $(\Tan Q,\Lag )$ is a \textbf{regular Lagrangian system})
if the Lagrangian $2$-form $\Omega_\Lag$ is nondegenerated.
Otherwise, $\Lag$ is a  \textbf{singular Lagrangian function}
(and  $(\Tan Q,\Lag )$ is said to be a \textbf{singular Lagrangian system})
\footnote{
In this exposition, we are mainly interested in
regular Lagrangian systems.}.
\end{definition}

The non degeneracy of the Lagrangian $2$-form
can be characterized locally as follows:

\begin{prop}
Let $(\Tan Q,\Lag )$ be a Lagrangian system. Then
$\Lag$ is a regular Lagrangian if, and only if,
in a natural chart $(U;q^i,v^i)$ of $\Tan Q$, the Hessian matrix
\(\dst {\cal H}_\Lag := \left(\frac{\partial^2\Lag}{\partial v^j \partial v^i}\right)\)
is regular at every point of $U$.
\end{prop}
\begin{proof}
We have to prove that $\Omega_\Lag$ is nondegenerated if, and only if,
this condition holds. Then, it suffices to take into account that
$\Omega_\Lag \in \df^2(\Tan Q)$
is non degenerated if, and only if, $(\Omega_\Lag)^{\ n}$
is a volume form in $\Tan Q$. Therefore,
\Omega_\Lag^{\ n} =
n!\ {\rm det}\left(\frac{\partial^2\Lag}{\partial v^j \partial v^i}\right)^n
\d q^1 \wedge \ldots \d q^n \wedge\d v^1 \wedge \ldots \d v^n \ ,
which  is a non-vanishing form at every point when
\(\dst{\rm det}\left(\frac{\partial^2\Lag}{\partial v^j\partial v^i}\right)
\not= 0\)
at every point.
\\ \qed \end{proof}

\subsection{Lagrangian dynamical equations.
Euler--Lagrange equations}

The dynamical equation in the Lagrangian formalism is stated in the following:

\begin{pos}
\label{4poslag}
{\rm (Fourth Postulate of Lagrangian mechanics\/)}:
The dynamical trajectories of a Lagrangian system
$(\Tan Q,\Lag)$ are the integral curves
of a vector field $X_\Lag \in \vf (\Tan Q)$ such that:
\ben
\item
$X_\Lag$ is a solution to the equation
\beq
\inn (X_\Lag )\Omega_\Lag = \d E_\Lag \ .
\label{elm}
\eeq
\item
$X_\Lag$ is a {\sc sode}; that is,
\beq
J (X_\Lag ) = \Delta \ .
\label{edso}
\eeq
\een
Equation (\ref{elm}) is called the
\textbf{Lagrangian equation for vector fields,} and
a vector field $X_\Lag$ solution to \eqref{elm} (if it exists) is a
\textbf{Lagrangian dynamical vector field}.
If, in addition, the condition (\ref{edso}) holds, then
$X_\Lag$ it is called an \textbf{Euler--Lagrange vector field} of the system,
\end{pos}

Bearing in mind the definition of integral curve and equation  \eqref{Hvecf},
it is immediate to prove that:

\begin{teor}
\label{teor:Lcurv}
The vector field $X_\Lag\in\vf(\Tan Q)$ is a Lagrangian vector field for a
Lagrangian system $(\Tan Q,\Lag)$ if, and only if,
the integral curves $c\colon I\subset\Real\to M$ of $X_\Lag$ are the solutions to the equations
\begin{equation}
\label{Lcurv}
\inn( \widetilde c)(\Omega_\Lag\circ c)=\d E_\Lag\circ c \ ,
\eeq
Equation \eqref{Lcurv} is the \textbf{Lagrangian equation} for the
integral curves of $X_\Lag$.
If, in addition, $X_\Lag$ is a {\sc sode}, then $c$ is a holonomic curve
and \eqref{Lcurv} is the
\textbf{Euler--Lagrange equation} for the integral curves of $X_\Lag$.
\end{teor}

\begin{remark}{\rm
It is usual to require that the Lagrangian dynamical equations are
obtained from a variational principle (as we will see
in Section \ref{lagvariational}) and
the necessary condition for it is that the integral curves
of the dynamical vector field $X_\Lag$ must be canonical lifts of
curves in the base $Q$ of the bundle $\Tan Q$ which represents the
Lagrangian phase space; and hence $X_\Lag$ must be a {\sc sode}.

\begin{definition}
Given a Lagrangian dynamical system $(\Tan Q,\Lag )$,
the \textbf{Lagrangian problem} posed by  the system
consists in finding a vector field $X_\Lag \in \vf (\Tan Q)$
verifying  the conditions (\ref{elm}) and (\ref{edso}).
\end{definition}

\noindent {\bf Local expressions}:
Consider a natural chart $(U;q^i,v^i)$ of $\Tan Q$.
Bearing in mind  the local expressions of the several geometric elements
appearing in the dynamical equations we obtain that, if
\(\dst X_\Lag = A^i(q^j,v^j) \derpar{}{q^i} +
B^i(q^j,v^j) \derpar{}{v^i}\),
equation (\ref{elm}), written in coordinates, is:
\bea
\frac{\partial^2\Lag}{\partial v^j \partial v^i}B^i -
\left(\frac{\partial^2\Lag}{\partial q^j \partial v^i} +
\frac{\partial^2\Lag}{\partial v^j \partial q^i}\right)A^i +
\frac{\partial^2\Lag}{\partial v^i \partial q^j}v^i -
\derpar{\Lag}{q^j} &=& 0 \ ,
\label{eq11a}
\\
\frac{\partial^2\Lag}{\partial v^j \partial v^i}(A^i-v^i) &=& 0 \ .
\label{eq11}
\eea
As we know, condition (\ref{edso}) is locally equivalent to demand that
$A^i=v^i$. Furthermore, the integral curves
$\sigma\colon I\subseteq\Real\to\Tan Q$ of $X_\Lag$
are canonical lifts of curves
$\gamma\colon I\subseteq\Real\to Q$; therefore, if
$\gamma(t)=(q^i(t))$, then $\sigma(t)=(q^i(t),\dot q^i(t))$ and
A^i = v^i = \frac{d q^i}{d t}
\quad , \quad
B^i = \frac{d^2q^i}{d t^2} \ ,
and the combination of these expressions with equations (\ref{eq11a}) and (\ref{eq11}) leads to the
equation of  the integral curves which is
\left(\frac{\partial^2\Lag}{\partial v^j \partial v^i}\circ\sigma\right)
\frac{d^2q^i}{d t^2} =
-\left(\frac{\partial^2\Lag}{\partial v^j \partial q^i}\circ\sigma\right)
\frac{d q^i}{d t} +
\derpar{\Lag}{q^j}\circ\sigma \ ,
and can be written as
(H_\Lag)_{ji}(q^k(t),\dot q^k(t))\frac{d^2q^i}{d t^2} =F_j( q^k(t),\dot q^k(t)) \ ,
or also in an equivalent form as
\beq
\frac{d}{d t}\left(\derpar{\Lag}{v^j}\circ\sigma\right)-
\derpar{\Lag}{q^j}\circ\sigma=0 \ .
\label{ELequats}
\eeq
This is the classical coordinate expression of the Euler--Lagrange equation \eqref{Lcurv}.

Therefore, for the case of regular Lagrangians we have the following result:

\begin{teor}
Let $(\Tan Q,\Lag)$ be a regular Lagrangian system.
Then, there exists a unique vector field $X_\Lag\in\vf (\Tan Q)$
which is the solution to the Lagrangian equation
(\ref{elm}) and it is a {\sc sode}.
\end{teor}
\begin{proof}
The existence and uniqueness are a straightforward consequence
of the fact that $\Omega_\Lag$ is non-degenerated.

Furthermore, if the Lagrangian is regular, the Hessian matrix
$H_\Lag$ is regular and equation (\ref{eq11}) leads to
$A^i = v^i$, and thus the vector field $X_\Lag$ is a {\sc sode}.
(Observe that, in this case, all the coefficients $B^i$ are determined
by equations (\ref{eq11a})).
\\ \qed \end{proof}

Assuming that the Lagrangian $\Lag$ is regular, from \eqref{eq11a} and \eqref{eq11}, we can obtain the local expression of the Lagrangian dynamical vector field:
\begin{equation}\label{lagdynvf}
X_\Lag= v^i\derpar{}{q^i}+
-v^j\frac{\partial^2\Lag}{\partial q^j \partial v^i}\right)\derpar{}{q^k}\, ,
\end{equation}
where $ W^{ik}$ is the inverse matrix of the partial Hessian of $\Lag$, that is
$ W^{ik}W_{ji}=\delta^k_j$.

\begin{remark}{\rm
\bit
\item
For Lagrangian systems, the triple
$(\Tan Q,\Omega_{\Lag},\d E_{\Lag})$ is a Hamiltonian system
which is regular or singular, depending on the regularity of the Lagrangian $\Lag$.
Thus, the Lagrangian formalism of these kinds of systems is a Hamiltonian formalism
with certain additional characteristics.
\item
If the Lagrangian system is singular, then $(\Tan Q,\Omega_{\Lag},\d E_{\Lag})$
is a presymplectic Hamiltonian system and then equation (\ref{elm})
is not necessarily compatible everywhere on $\Tan Q$
and, even in the case that it has solution,
it is not unique and it is not necessarily a {\sc sode}.
In fact, if $X_\Lag^0$ is a solution, then $X_\Lag^0+Z$, with
$Z\in\ker\,\Omega_\Lag$, is also a solution.
Then, in order to obtain the Euler--Lagrange equations \eqref{Lcurv},
the condition $J(X_\Lag)=\Delta$ must be added to the above Lagrangian equations.
In general, solutions $X_\Lag$ could exist only in some submanifold $S_f\hookrightarrow\Tan Q$.
and a suitable {\sl constraint algorithm} must be implemented in order to find
this {\sl final constraint submanifold} $S_f$ (if it exists) where there are
{\sc sode} vector fields $X_{\cal L}\in\vf(\Tan Q)$,
tangent to $S_f$, which are (not necessarily unique) solutions to the Lagrangian equations on $S_f$.
All these problems have been also widely studied
(see, for instance, [24, 25, 68, 69, 177, 178, 213, 270]).
\eit

\section{Canonical Hamiltonian formalism for Lagrangian systems}

The {\sl canonical Hamiltonian formalism} of Mechanics was
initially introduced by {\it Hamilton, Lagrange, Poisson,
Ostrogadsky} and {\it Donkin}, among others, and constitutes the dual
formulation of the Lagrangian formalism.
Its construction is based on the introduction of a map:
the {\sl fiber derivative} of the Lagrangian function.

\subsection{Legendre map}

\begin{definition}
Let $(\Tan Q,\Lag )$ be a Lagrangian dynamical system.
The \textbf{Legendre map} associated with this system
is the fiber derivative of $\Lag$; that is the map
\begin{array}{ccccc}
\Leg & \colon & \Tan Q & \to & \Tan^*Q
\\
& & (q,u) & \mapsto & (q,{\rm D}\Lag_q(u))
\end{array} \ .
\end{definition}

\noindent {\bf Local expression}:
Given a natural chart $(U;q^i,v^i)$ in $\Tan Q$
and the corresponding canonical coordinates
$(\Leg(U);q^i,p_i)$ in $\Tan^* Q$,
the local expression of $\Leg$ is
q^i \circ \Leg = q^i \quad , \quad p_i \circ \Leg =\derpar{\Lag}{v^i} \ ,
the coordinates $p_i$ are called the
{\sl generalized momenta} associated with the generalized coordinates $q^i$.

A relevant characteristic of the Legendre map is given by the following:

\begin{teor}
If $\Theta$ and $\Omega$ are the canonical forms in $\Tan^*Q$,
$\Leg^*\Theta =\Theta_\Lag$ and $\Leg^*\Omega =\Omega_\Lag$.
\end{teor}
\begin{proof}
The local expression of $\Theta$ is $\Theta =p_i\d q^i$; therefore
\Leg^*\Theta = (\Leg^*p_i)\d (q^i\circ\Leg ) =
\derpar{\Lag}{v^i}\d q^i = \Theta_\Lag \ ,
and, bearing in mind that $\Leg^*$ commutes with the exterior differential,
we obtain the result for $\Omega$.
\\ \qed \end{proof}

Working also with local coordinates, it is immediate to prove that:

\begin{prop}
$\Lag$ is a regular Lagrangian if, and only if, $\Leg$ is a local diffeomorphism.
\end{prop}
\begin{proof}
As $\Lag$ is $\Cinfty$, the necessary and sufficient condition for
$\Leg$ to be a local diffeomorphism is that, for all ${\rm p}\in\Tan Q$,
the differential of $\Lag$ at ${\rm p}$,  ${\rm D}_{\rm p}\Leg$, is an isomorphism.
Then it suffices to analyze the local expression
of the Jacobian matrix of $\Leg$ at ${\rm p}$, which is
{\cal H}_{{\cal F}\Lag}({\rm p})=
\left(\begin{matrix}
({\rm Id})_{n\times n}& (0)_{n\times n} \\
\Big(\displaystyle\frac{\partial^2\Lag}{\partial q^ij\partial v^i}({\rm p}) \Big)& \Big(\displaystyle\frac{\partial^2\Lag}{\partial v^j \partial v^i}({\rm p})\Big)
\end{matrix}\right) \ ;
therefore, ${\rm det}\,{\cal H}_{{\cal F}\Lag}({\rm p})\not=0$
if, and only if, ${\rm det}\,\Big(\displaystyle\frac{\partial^2\Lag}{\partial v^i \partial v^j}({\rm p})\Big)\not=0$.
\\ \qed \end{proof}

This leads to:

\begin{definition}
$\Lag$ is a \textbf{hyperregular Lagrangian} if
$\Leg$ is a (global) diffeomorphism.
\end{definition}

\begin{remark}{\rm
If $\Lag$ is regular (but not hiperregular), then $\Leg (\Tan Q)=U\subset\Tan^*Q$
(where $U$ is an open set).
If $\Lag$ is hiperregular, then $\Leg (\Tan Q)=\Tan^*Q$

Regarding the singular Lagrangians,  the most interesting ones are:

\begin{definition}
$\Lag$ is an \textbf{almost-regular Lagrangian} if:
\ben
\item
$\Leg(\Tan Q)\equiv P$ is a closed submanifold of $\Tan^*Q$.
\item
$\Leg$ is a submersion onto its image.
\item
The fibers $\Leg^{-1}(\Leg(p))$, for every $ p\in\Tan Q$, are connected submanifolds of $\Tan Q$.
\een
\end{definition}

\subsection{Canonical  Hamiltonian formalism. Equivalence with the Lagrangian formalism}
\label{canforma}

We study essentially the case of hiperregular systems.
Nevertheless, all the results hold also for the case de
regular systems in general,
changing $\Tan^*Q$ by $\Leg (\Tan Q)\subset\Tan^*Q$
(or locally, at least).
First, as $\Leg$ is a diffeomorphism we have:

\begin{prop}
Let $(\Tan Q,\Lag)$ be a hiperregular Lagrangian system.
Then there exists a unique function ${\rm h}\in\Cinfty (\Tan^*Q)$ such that
$\Leg^*{\rm h}=E_\Lag$,
which is called the \textbf{Hamiltonian function} associated with the system
$(\Tan Q,\Lag)$,
and the triple $(\Tan^*Q,\Omega,{\rm h})$ is the
\textbf{canonical Hamiltonian system} associated with $(\Tan Q,\Lag)$.
\end{prop}

As $E_\Lag$ represents the energy
of the system in the Lagrangian formalism, the function ${\rm h}$
represents the same observable in the canonical Hamiltonian formalism.

Therefore, we have the regular Hamiltonian system
$(\Tan^*Q,\Omega,\d {\rm h})$, where $\Omega$ is the canonical $2$-form in
fulfilling the Postulates and results established in Section \ref{shreh}.
In particular, the Hamiltonian equations for vector fields and their
integral curves read
\bea
\inn(X_{\rm h})\Omega=\d {\rm h} \quad &,& \quad X_{\rm h}\in\vf(\Tan^* Q) \ .
\label{elmh} \\
\inn(\widetilde c)(\Omega\circ c))=\d {\rm h}\circ c \quad &,& c\colon I\subseteq\Real\to\Tan^* Q \ ;
\label{elmh2}
\eea

Their local expressions in a natural chart of coordinates
$U;q^i,p_i)$ in $\Tan^*Q$ are the following:
if $\displaystyle X_{\rm h}\vert_U=f^i\derpar{}{q^i}+g_i\derpar{}{p_i}\in\vf (\Tan^*Q)$,
f^i= \derpar{h}{p_i} \quad ; \quad g_i=-\derpar{h}{q^i}
and its integral curves $c(t)=(q^i(t),p_i(t))$ solution to  \eqref{elmh2} are
the solutions to the system of first-order differential equations
\beq
\frac{d q^i}{d t} = \derpar{h}{p_i}(c(t))
\quad , \quad
\frac{d p_i}{d t} = -\derpar{h}{q^i}(c(t)) \ .
\label{hameq3}
\eeq

The relation between the Lagrangian and the canonical Hamiltonian formalisms of a (hyper)regular Lagrangian system is stated in the following:

\begin{teor} {\rm (Equivalence Theorem)}
\label{eqteorema}
Let $(\Tan Q,\Lag)$ be a (hyper)regular Lagrangian system.
\ben
\item
If $X_\Lag$ is the Lagrangian vector field
solution to equations (\ref{elm}) and \eqref{edso},
then there exists a unique vector field
$\Leg_*X_\Lag\equiv X_{\rm h}\in\vf (\Tan^*Q)$
which is the solution to equations (\ref{elmh}).

Conversely, if $X_{\rm h}$ is the Hamiltonian vector field
solution to equation (\ref{elmh}),
then there exists a unique vector field
$\Leg_*^{-1}X_{\rm h}\equiv X_\Lag\in\vf (\Tan Q)$
which is the solution to equations (\ref{elm}) and \eqref{edso}.
\item
Equivalently, if $\gamma \colon I\subset\Real\to Q$
is a curve and its canonical lift
$\widetilde \gamma \colon I\subset\Real\to \Tan Q$ is a
solution to equation \eqref{Lcurv},
%(and hence it is an integral curve of the Euler--Lagrange vector field $X_\Lag$),
then $\zeta=\Leg\circ\widetilde \gamma$ is a curve
solution to equation \eqref{elmh2}.
%(and hence it is an integral curve of the Hamiltonian vector field $X_{\rm h}$).

Conversely, if $\zeta \colon I\subset\Real\to \Tan^*Q$
is a curve solution to equation \eqref{elmh2},
then $\widetilde\gamma=\widetilde{\pi_Q\circ\zeta} \colon I\subset\Real\to \Tan Q$
is a curve solution to equation \eqref{Lcurv}.
\een
\end{teor}
\begin{proof}
\ben
\item
For the first item we have that
0=\inn (X_\Lag)\Omega_\Lag -\d E_\Lag=
\inn (X_\Lag)(\Leg^*\Omega) -\d (\Leg^*{\rm h})=\Leg^*[\inn (X_{\rm h})\Omega -\d {\rm h}]
and as $\Leg$ is a diffeomorphism, this is equivalent to equation (\ref{elmh}).
The proof that $X_\Lag$ is a {\sc sode} is a consequence of the regularity.
\item
For the second item, if $\widetilde \gamma$
is a solution to equations \eqref{Lcurv}
then, by Theorem \ref{teor:Lcurv}, it is an integral curve of the Euler--Lagrange vector field $X_\Lag$,
and this means that
Then, as $\zeta=\Leg\circ\widetilde \gamma$ and $\Leg_*X_\Lag=X_{\rm h}$,  we have that
\dot\zeta=\Tan\Leg\circ\dot{\widetilde\gamma}=
\Tan\Leg\circ X_\Lag\circ\widetilde\gamma=
X_{\rm h}\circ\Leg\circ\widetilde\gamma=X_{\rm h}\circ\zeta\ ;
then $\zeta$ is an integral curve of the Hamiltonian vector field $X_{\rm h}$
and, by Theorem \ref{teo:Hcurv}, it is a solution to equation \eqref{elmh2}

Conversely, from a solution $\zeta$ to the equation \eqref{elmh2},
we construct the curve $\gamma=\pi_Q\circ\zeta$ and its
canonical lift $\widetilde\gamma$. Then, reasoning as above, we conclude that $\widetilde\gamma$ is a solution to \eqref{Lcurv}.

The following (commutative) diagram summarizes the situation
\xymatrix{
\Tan\Tan Q
\ar[rrrr]^<(0.45){\Tan\mathcal{FL}}
& \ & \ & \ &
\Tan\Tan^*Q   \\
\ & \ & \Real  \ar[dd]^<(0.65){\gamma}
\ar[urr]^<(0.45){\widetilde\zeta} \ar[dll]_<(0.45){\widetilde\gamma}
\ar[drr]^<(0.45){\zeta}  \ar[ull]_<(0.45){\widetilde{\widetilde\gamma}} & \ & \ \\
\Tan Q \ar[uu]^<(0.45){X_\Lag} \ar[drr]^<(0.45){\tau_Q}
\ar[rrrr]^<(0.35){\mathcal{FL}}
& \ & \ & \ &
\Tan^*Q  \ar[uu]_<(0.45){X_{\rm h}}  \ar[dll]_<(0.45){\pi_Q}  \\
& \ & Q & \ &
\een
\qed \end{proof}

\begin{remark}{\rm
If $(\Tan Q,\Lag)$ is an almost-regular Lagrangian system
and $j_0\colon P\hookrightarrow\Tan^*Q$ is the
natural embedding of $P\equiv\Leg(\Tan Q)$ in $\Tan^*Q$,
then it can be proved that there exists ${\rm h}_0\in\Cinfty (P)$
such that $\Leg_0^*{\rm h}_0=E_\Lag$, where
$\Leg_0\colon\Tan Q\to P$ is defined by $\Leg=j_0\circ\Leg_0$.
This function is the {\sl canonical Hamiltonian function} of the system,
and has the same physical interpretation than ${\rm h}$.
Now, taking $\Omega_0=j_0^*\Omega$, the triple
$(P,\Omega_0,\d{\rm h}_0)$ is in this case the {\sl canonical Hamiltonian system}
associated with $(\Tan Q,\Lag)$, which is the equivalent to $(\Tan^*Q,\Omega,\d{\rm h})$ in the regular case, and is a presymplectic Hamiltonian system, in general.
In particular, the equation equivalent to (\ref{elmh}) is
\inn (X_{{\rm h}_0})\Omega_0= \d {\rm h}_0 \quad ;\quad X_{{\rm h}_0}\in\vf(P) \ ,
which, if $\Omega_0$ is a presymplectic form,
is incompatible in general and,  in the most interesting cases, $X_{{\rm h}_0}$ exists only in
some submanifold $P_f\hookrightarrow P$, and is tangent to it.
Moreover, the solution is not unique, since if $X_{{\rm h}_0}$ is a solution, then
$X_{{\rm h}_0}+Z$, for every $Z\in\ker\,\Omega_0$, is also a solution.

Details on the construction of the canonical Hamiltonian formalism for
almost-regular Lagrangians and a deeper study on the equivalence of
both, the Lagrangian and Hamiltonian formalisms, for this case
can be found, for instance, in
[24, 66, 68, 69, 177, 188, 213, 311]).

\subsection{Discussion and comparison}

As a summary of the results in this section,
we state the essential characteristics of  the Lagrangian and canonical Hamiltonian
formalisms of  the Lagrangian dynamical systems.

In the Lagrangian formalism we have that:
\ben
\item
Local description:
\ben
\item
To describe locally  the {\sl states} of the system we use
the {\sl generalized coordinates} $(q^i)$ ($i=1,\ldots ,n$),
representing the degrees of freedom of the system, and
the {\sl generalized velocities} $(v^i)$ corresponding to each generalized coordinate.
\item
The dynamical information of the system is given by the
{\sl Lagrangian function} of the system, $\Lag (q^i,v^i)$.
\item
The dynamical  evolution of the system is described by the {\sl  Euler--Lagrange equations} \eqref{ELequats},
which are a second-order system of $n$ differential equations for the functions $q^i(t)$.
\item
The dynamical system  is {\sl regular} if
\(\dst{\rm det}\left(\derpar{^2\Lag}{v^i\partial v^j}(q,v)\right)\not= 0\)
in all  the points $(q,v)$.
In this case, given a set of initial conditions
(that is, a state of the system), the local solution to  the equations is unique.
\een
\item
In the geometrical description, the above characteristics are translated as:
\ben
\item
The phase space of the system is the tangent bundle
$\Tan Q$ of the manifold $Q$ which constitutes the configuration space of the system.
\item
The Lagrangian function $\Lag \in \Cinfty (\Tan Q)$
contains the dynamical information of the system.
\item
Starting from this function and using the geometric structures
of the tangent bundle (the {\sl  canonical endomorphism} and the
{\sl Liouville vector field\/}), one can construct
the {\sl  Lagrange $2$-form} $\Omega_\Lag$
and the {\sl Lagrangian energy} of the system, $ E_{\Lag}$,
and write the Lagrangian dynamical equations which are
$\inn (X_{\Lag})\Omega_{\Lag}=\d E_{\Lag}$,
together with the second-order condition $J(X_\Lag)=\Delta$.
The integral curves of $X_\Lag\in\vf(\Tan Q)$ are the
dynamical trajectories of the system.
\item
The dynamical system is {\sl regular} if
$\Omega_{\Lag}$ is a non-degenerated form.
In this case, the vector field $X_\Lag$ is unique and necessarily a {\sc sode}.
\een
\een

Concerning to the canonical Hamiltonian formalism, we have that:
\ben
\item
Local description:
\ben
\item
The states of the system are now described
by generalized coordinates of position $(q^i)$
and their corresponding generalized momenta $(p_i)$.
\item
The dynamical information of the system is given by the
{\sl Hamiltonian function} of the system, ${\rm h}(q^i,p_i)$.
\item
The dynamical evolution of the system is obtained from the
{\sl Hamilton equations} \eqref{hameq3},
which are a first-order system of $2n$ differential equations.
\item
The dynamical system  is {\sl regular} if $\Leg$ is a (local) diffeomorphism.

In this case, given a set of initial conditions
(that is, a state of the system), the solution to  the equations is unique.
\een
\item
In the geometrical description, the above characteristics are translated as::
\ben
\item
The phase space of the system is $\Leg(\Tan Q)$,
and is, whether the cotangent bundle
$\Tan^* Q$ of the manifold $Q$ which constitutes the
configuration space of the system, or an open set $U\subset\Tan^*Q$,
or a submanifold $P\hookrightarrow\Tan^*Q$
(depending on the regularity of $\Lag$).
\item
The dynamical information is given by ${\rm h}\in \Cinfty (\Tan^*Q)$,
(resp. ${\rm h}_0\in \Cinfty (P)$): the {\sl Hamiltonian function}.
\item
The Hamiltonian dynamical equations are obtained
using this function and the can\'onical  $2$-form
of the cotangent bundle $\Omega$, and they are
$\inn (X_{\rm h})\Omega=\d{\rm h}$ (resp. $\inn (X_{{\rm h}_0})\Omega_0=\d{\rm h}_0$).
The integral curves of the vector field solution are the
dynamical trajectories of the system.
\item
The dynamical systems  is {\sl regular} if
$\Leg$ is a (local) diffeomorphism, and hence
$\Leg (\Tan Q)=U\subseteq\Tan^*Q$.
\een
\een

The canonical Hamiltonian formalism is especially interesting by the following facts:
\bit
\item
Locally, it is manifest the asymmetry between the sets of variables $q^i$
and $v^i$ in  the  Lagrangian dynamical equations.
This does not happen in  the dynamical equations of the
Hamiltonian formalism, with the coordinates $q^i$ and $p_i$.
\item
in the Lagrangian formalism, the Lagrange 2-form and the
Lagrangian energy, which appear in  the dynamical equations,
are obtained from the Lagrangian function and the canonical structures of the tangent bundle.
This means that the dynamical information is present in both the
Lagrangian  2-form and the Lagrangian energy.

On the contrary, in the canonical Hamiltonian formalism,
the corresponding  geometric elements appearing
in  the dynamical equations are the canonical $2$-form
of the cotangent bundle and the Hamiltonian function;
la first of them contains only the geometric information
and the second one only the dynamical  information.
\item
Finally,  the characteristics of the canonical Hamiltonian formalism
are suitable in order to make the quantization of the physical system and,
in particular, to implement the so-called {\sl geometric quantization procedure}
(see, for instance, [28, 152, 161, 200, 216, 308, 314, 316, 328, 351]).
\eit

In conclusion, a {\sl Lagrangian dynamical system}
can be thought as a triple $(\Tan Q,\Omega_{\Lag},E_{\Lag})$
in the Lagrangian formalism, or
as a triple $(\Tan^* Q,\Omega,{\rm h})$ (or $(P,\Omega_0,{\rm h}_0)$),
in the canonical Hamiltonian formalism.
In both cases,  the phase spaces are differential manifolds
endowed with closed differential 2-forms (symplectic or presymplectic,
depending on the regularity of the system).

\subsection{Geometric Hamilton--Jacobi theory}
\label{firstsec}

One of the most relevant features of the study of Hamiltonian systems is the
{\sl Hamilton--Jacobi theory}, which gives a way to integrate
Hamilton equations (and systems of first-order ordinary differential equations in general).
The classical theory is based on using canonical transformations
[7, 212, 160, 226, 302] and is also extended to singular systems [145]
or higher-order dynamics [92].
The geometric description of the standard theory and other  geometric descriptions (for autonomous Hamiltonian systems)
is well-established in several texts, as [1, 7, 212, 26, 238, 248].
Following the ideas stated in  [1, 221],
the Hamilton--Jacobi theory has been formulated, recently, in a new more general geometric perspective
both for the Lagrangian and the Hamiltonian formalisms,
for autonomous and nonautonomous mechanical systems [60].
This framework has been extended to many other situations; namely,
to singular Lagrangian and singular Hamiltonian systems [128, 129, 233],
holonomic and nonholonomic mechanics
[22, 62, 122, 211, 233, 276, 278],
higher-order dynamical systems [89, 90],
control theory [18, 343],
systems described using Poisson manifolds [129, 196]
and Lie algebroids [10, 234],
dissipative systems described using contact manifolds [112, 113, 197],
discretization of dynamical systems [19, 277],
first-order classical field theories [43, 121, 126, 131, 136]
and higher-order field theories [337, 339],
partial differential equations in general [338, 340],
and other geometric applications and generalizations [17, 63, 195, 344].
(A review on this approach and some of its applications is given in [300]).

Next, we review the foundations of this geometric framework of the Hamilton--Jacobi theory
for the Hamiltonian formalisms of autonomous dynamical systems.

Let $(\Tan^*Q,\omega,{\rm h})$ be a Hamiltonian system and $X_{\rm h}\in\vf(\Tan^*Q)$
the Hamiltonian vector field.

\begin{definition}
\label{genHJh}
The  \textbf{generalized Hamiltonian Hamilton--Jacobi problem}
consists in finding a vector field $X\in\vf(Q)$ and
a $1$-form $\alpha\in\df^1(Q)$
such that, if $\gamma\colon\Real\to Q$ is an integral curve
of $X$, then $\alpha\circ\gamma\colon\Real\to\Tan^*Q$
is an integral curve of $X_{\rm h}$; that is,
if $X\circ\gamma=\dot\gamma$, then
$\dot{\overline{\alpha\circ\gamma}}=X_{\rm h}\circ(\alpha\circ\gamma)$.
The pair $(X,\alpha)$ is said to be a  \textbf{solution to the generalized Hamiltonian Hamilton--Jacobi problem}.
\end{definition}

We have the following diagram:
\xymatrix{
\ & \Tan Q<EMAIL_ADDRESS>& \ & \ar[ll]_{\Tan\pi_Q} \Tan(\Tan^*Q) \\
\ & \ & \ & \ \\
\Real  \ar[r]_{\gamma} \ & Q \ar[uu]^{X}<EMAIL_ADDRESS>& \ & \ar[ll]_{\pi_Q} \Tan^*Q \ar[uu]_{X_{\rm h}}

Solutions to the generalized Hamiltonian Hamilton--Jacobi problem are characterized as follows:

\begin{teor}
\label{HJhcns}
The following statements are equivalent:
\begin{enumerate}
\item
The pair $(X,\alpha)$ is a solution to the generalized Hamiltonian Hamilton--Jacobi problem.
\item
The vector fields $X$ and $X_{\rm h}$ are $\alpha$-related; that is,
$X_{\rm h}\circ\alpha=\Tan\alpha\circ X$.

$X=\Tan\pi_Q\circ X_{\rm h}\circ\alpha$ and, as a consequence,
the integral curves of $X_{\rm h}$ with initial conditions
in $\mathrm{Im}\,\alpha$ project onto the integral curves of

$X$ is called the \textbf{vector field associated with the form $\alpha$}.
\item
The submanifold ${\rm Im}\,\alpha$ of $\Tan^*Q$
is invariant by $X_{\rm h}$
(that is, $X_{\rm h}$ is tangent to ${\rm Im}\,\alpha$).
\item
\end{enumerate}
\end{teor}
\begin{proof}
The equivalence between 1 and 2 is as follows:
If $(X,\alpha)$ satisfies the condition in Definition \ref{genHJh} then,
for every integral curve of $X$,
$\gamma\colon\Real\to Q$, by definition $X\circ\gamma=\dot\gamma$,
X_{\rm h}\circ\alpha\circ\gamma=\dot{\overline{\alpha\circ\gamma}}=
T\alpha\circ\dot\gamma=\Tan\alpha\circ X\circ\gamma \ ;
and hence $X_{\rm h}\circ\alpha=\Tan\alpha\circ X$.
The proof of the converse is immediate.

From here, composing both members of this equality with $\Tan\pi_Q$
and taking into account that $\pi_Q\circ\alpha={\rm Id}_Q$,
we obtain that $X=\Tan\pi_Q\circ X_{\rm h}\circ\alpha$.
As a consequence,
we conclude that the $\pi_Q$-projection of the integral curves of $X_{\rm h}$
in ${\rm Im}\,\alpha$ are the integral curves of $X$.

For the equivalence between 2 and 3 we have that,
if $X_{\rm h}\circ\alpha=\Tan\alpha\circ X$, then
$X_{\rm h}(\alpha({\rm q}))=\Tan\alpha(X({\rm q}))$, for every ${\rm q}\in Q$
and therefore $X_{\rm h}$ is tangent to ${\rm Im}\,\alpha$.
Conversely, if ${\rm Im}\,\alpha$ is invariant by $X_{\rm h}$ then
$X_{\rm h}(\alpha({\rm q}))\in\Tan_{\alpha({\rm q})}{\rm Im}\,\alpha$,
which implies that there exists ${\rm u}\in\Tan_{\rm q}Q$ such that
$X_{\rm h}(\alpha({\rm q}))=\Tan_{\rm q}\alpha({\rm u})$. Defining
$X$ by $\Tan_{\rm q}\alpha(X_{\rm q})=X_{\rm h}(\alpha({\rm q}))$,
we have that $X$ is differentiable, since $X=\Tan\pi_Q\circ X_{\rm h}\circ\alpha$,
and thus $X$ is a vector field in $Q$ satisfying that
$X_{\rm h}\circ\alpha=\Tan\alpha\circ X$, and then $\alpha$ is a solution to the
generalized Hamilton--Jacobi problem.

If $(X,\alpha)$ is a solution to the generalized Hamilton--Jacobi problem, by item 2 we have that $X=\Tan\pi_Q\circ X_{\rm h}\circ\alpha$

Finally, the proof of the equivalence with 4 is the following:
from the Hamiltonian equation \eqref{elmh} we obtain that
\alpha^*\inn(X_{\rm h})\omega=\alpha^*\d{\rm h}=\d(\alpha^*{\rm h}) \ .
As $\Theta$ is the canonical form of $\Tan^*Q$, then
$\alpha^*\Theta=\alpha$, and
\beq
\alpha^*\Omega = -\alpha^*\d\Theta=-\d(\alpha^*\Theta)=-\d\alpha \ ,
\label{00}
\eeq
and, as $X$ and $X_{\rm h}$ are $\alpha$-related, we have
\alpha^*\inn(X_{\rm h})\omega=\inn(X)\alpha^*\Omega=-\inn(X)\d\alpha
\ ,
which yields condition 4.
For the converse, first define
$Z_{\rm h}=X_{\rm h}\circ\alpha-\Tan\alpha\circ X\colon Q\to \Tan(\Tan^*Q)$,
which is a vector field along $\alpha$.;
then we have to prove that $Z_{\rm h}=0$.
First, we have that $Z_{\rm h}$ is $\pi_Q$-vertical since,
as $\pi_Q\circ\alpha={\rm Id}_Q$,
\beann
\Tan\pi_Q\circ Z_{\rm h} &=& \Tan\pi_Q\circ(X_{\rm h}\circ\alpha-\Tan\alpha\circ X)=
\Tan\pi_Q\circ(X_{\rm h}\circ\alpha-\Tan\alpha\circ\Tan\pi_Q\circ X_{\rm h}\circ\alpha)
\\ &=&
\Tan\pi_Q\circ X_{\rm h}\circ\alpha-\Tan\pi_Q\circ X_{\rm h}\circ\alpha=0 \ .
\eeann
From equation \eqref{elmh}
and the hypothesis, as $\alpha^*\Omega=-\d\alpha$, we obtain
\beann
\alpha^*\inn(X_{\rm h})\Omega = \alpha^*\d{\rm h} &=& d(\alpha^*{\rm h})
\ ,
\\
\inn(X)\alpha^*\Omega=-\inn(X)\d\alpha &=& \d(\alpha^*{\rm h}) \ ,
\eeann
hence $\alpha^*\inn(X_{\rm h})\Omega-\inn(X)\alpha^*\Omega=0$.
Therefore, for every ${\rm q}\in Q$ and $Y_{\rm q}\in\Tan_{\rm q}Q$, we have
\beann
0 &=& (\alpha^*\inn(X_{\rm h})\Omega-\inn(X)\alpha^*\Omega)_{\rm q}(Y_{\rm q})=
\Omega_{\alpha({\rm q})}(X_{\rm h}(\alpha({\rm q})),\Tan_{\rm q}\alpha(Y_{\rm q}))-
\Omega_{\alpha({\rm q})}(\Tan_{\rm q}\alpha(X_{\rm q}),\Tan_{\rm q}\alpha(Y_{\rm q}))
\\
&=& \Omega_{\alpha({\rm q})}(Z_{\rm h}({\rm q}),\Tan_{\rm q}\alpha(Y_{\rm q})) \ .
\eeann
Furthermore, as ${\rm V}(\pi_Q)$ is a Lagrangian distribution in
$(\Tan^*Q,\Omega)$, for every $\pi_Q$-vertical vector field $V\in\vf(\Tan^*Q)$
we have that
$\Omega_{\alpha({\rm q})}(Z_{\rm h}({\rm q}),V(\alpha({\rm q})))=0$;
but $\Tan_{\alpha({\rm q})}\Tan^*Q=
\Tan_{\alpha({\rm q})}({\rm Im}\,\alpha)\oplus{\rm V}_{\alpha({\rm q})}(\pi_Q)$,
and thus we have proved that
\Omega_{\alpha({\rm q})}(Z_{\rm h}({\rm q}),Z(\alpha({\rm q})))=0 \ ;
for every $Z\in\vf(\Tan^*Q)$. Then we conclude that $Z_{\rm h}=0$,
since $\Omega$ is non-degenerate;
or what is equivalent,
$X$ and $X_{\rm h}$ are $\alpha$-related, and thus
$(X,\alpha)$ is a solution to the generalized Hamilton--Jacobi problem
\\ \qed \end{proof}

To solve the generalized Hamilton--Jacobi problem is, in general, a very difficult task.
Then, it is usual to state a less general version of the problem
which leads to the standard version of the Hamilton--Jacobi problem:

\begin{definition}
\label{HJh}
The \textbf{Hamiltonian Hamilton--Jacobi problem}
consists in finding a closed $1$-form $\alpha\in\df^1(\Tan^*Q)$
which is a solution to the generalized Hamiltonian Hamilton--Jacobi problem.
This form  $\alpha$ is said to be a \textbf{solution to the Hamiltonian Hamilton--Jacobi problem}.
\end{definition}

As $\d\alpha=0$, for every point in $Q$,
there exists a function $S$ in  a neighbourhood $U\subset Q$
such that $\alpha=\d S$.
Then, we say that $S$ is a {\sl local generating function} of the solution $\alpha$.

\begin{teor}
\label{cnsh}
The following statements are equivalent:
\begin{enumerate}
\item
The form  $\alpha\in\df^1(Q)$ is a solution to the Hamiltonian Hamilton--Jacobi problem.
\item
$\mathrm{Im}\,\alpha$ is a Lagrangian submanifold of
$\Tan^*Q$, which is invariant by $X_{\rm h}$,
and $S$ is a local generating function of this Lagrangian submanifold.
\item
The condition  $\d(\alpha^*{\rm h})=0$ holds
or, what is equivalent, the function
${\rm h}\circ\d S\colon Q\to\Real$ is locally constant.
\end{enumerate}
\end{teor}
\begin{proof}
These statements are consequences of Theorem \ref{HJhcns} and Definition \ref{HJh}.
In fact, if $\alpha$ is a solution to the Hamilton--Jacobi problem,
as a consequence of \eqref{00},
$d\alpha=0$ is equivalent to $\alpha^*\Omega=0$. Then
${\rm Im}\,\alpha$ is a Lagrangian submanifold of $(\Tan^*Q,\Omega)$,
which is contained in a level set of
${\rm h}$, because the condition $\inn(X)\d\alpha=-\d(\alpha^*{\rm h})$
implies that $d(\alpha^*{\rm h})=0$.
Notice that $\dim\,{\rm Im}\,\alpha=n$ and,
if $j_\alpha\colon{\rm Im}\,\alpha\hookrightarrow \Tan^*Q$
is the natural embedding, we have that $j_\alpha^*\Omega=0$.
\\ \qed \end{proof}

In natural coordinates of $\Tan^*Q$, condition (3) is the classical form of the
Hamiltonian Hamilton--Jacobi equation:
\beq
H\left(q^i,\derpar{S}{q^i}\right)= E\ (ctn.) \ .
\label{tres}
\eeq

Until now, we have only considered particular solutions $\alpha$
to the (generalized) Hamilton--Jacobi problem, which are given by particular solutions
to the partial differential equation \eqref{tres}.
Nevertheless, we are also interested in the general solution. Then:

\begin{definition}
\label{completeHJ}
Let $\Lambda\subseteq\Real^n$.
A family of  solutions $\{ \alpha_\lambda; \lambda\in\Lambda\}$
(which depends on $n$ parameters
$\lambda\equiv (\lambda_1,\ldots,\lambda_n)\in\Lambda$)
is a \textbf{complete solution} to the Hamilton--Jacobi problem
if the map
\begin{array}{ccccc}
\Phi & \colon &Q\times\Lambda & \longrightarrow & \Tan^*Q \\
& & (q,\lambda) & \mapsto & \alpha_\lambda(q)
\end{array}
is a local diffeomorphism.
\end{definition}

\begin{remark}{\rm
\bit
\item
Given a complete solution $\{ \alpha_\lambda; \lambda\in\Lambda\}$,
since $\d\alpha_\lambda=0$, for every $\lambda\in\Lambda$,
there is a family of functions $\{ S_\lambda\}$ defined in
open sets $U_\lambda\subset Q$ such that $\alpha_\lambda=\d S_\lambda$.
Therefore, we have a function
\begin{array}{ccccc}
{\cal S} & \colon &\bigcap U_\lambda\times\Lambda\subset Q\times\Lambda & \longrightarrow & \Real \\
& & (q,\lambda) & \mapsto & S_\lambda(q)
\end{array}
which is locally defined, and is called a {\sl local generating function} of the
complete solution $\{ \alpha_\lambda; \lambda\in\Lambda\}$.
\item
Every complete solution defines a Lagrangian foliation in $\Tan^*Q$
which is  transverse to the fibers,
and such that $X_{\rm h}$ is tangent to the leaves.
This foliation is locally defined by a family of functions which are the components of a map
$F\colon \Tan^*Q\stackrel{\Phi^{-1}}{\longrightarrow} Q\times\Lambda
{\longrightarrow} \Lambda\subset\Real^n$.
Furthermore, these functions are a set of constants of motion of $X_{\rm h}$.

Conversely, from a set  $n$ first integrals $f_1,\ldots,f_n$
of $X_{\rm h}$ in involution, such that $\d f_1\wedge\ldots\wedge \d f_n\not=0$;
we can define a $\pi$-transversal Lagrangian foliation of $\Tan^*Q$
taking $f_i=\lambda_i$, with $\lambda_i\in\Real$,
and in this way we obtain a local complete solution $\{\alpha_\lambda,\lambda\in\Lambda\}$.
Then, from equations $f_i=\lambda_i$, we can  locally isolate
$p_i=p_i(q,\lambda)$, replace them in the expression of $X_{\rm h}$
and finally project to the basis, then obtaining the family of vector fields
$\{X_\lambda\}$ associated with the local complete solution.
From a complete solution $\{ \alpha_\lambda;\lambda\in\Lambda\}$,
all the integral curves of  $X_{\rm h}$ are obtained starting from
the integral curves of the vector fields $\{ X_\lambda\}$
associated to this complete solution.
\item
This geometric framework for the Hamilton--Jacobi theory
can be also stated in a very natural way for the Lagrangian formalism
(see [60]).
\eit

The ``classical'' Hamilton--Jacobi problem for a (regular) Hamiltonian system
$(\Tan^*Q,\Omega,{\rm h})$ consists in
obtaining a canonical transformation which leads
the system to equilibrium [7, 212, 226, 302].
This transformation is given by a generating function, which is
the solution to the {\sl Hamilton--Jacobi equation}.
From a geometric point of view, this canonical transformation
is associated with a foliation in the phase space of the system, $\Tan^*Q$,
which has the following properties:
it is invariant by the dynamics, transverse to the canonical projection of the cotangent bundle,
and is Lagrangian with respect to the
canonical symplectic structure of $\Tan^*Q$.
Then, the restriction of the Hamiltonian vector field $X_{\rm h}\in\vf(\Tan^*Q)$ to
each leaf  $S_\lambda$ of this foliation  projects onto a vector field $X_\lambda\in\vf(Q)$,
and the integral curves of $X_{\rm h}$ and  $X_\lambda$ are one-to-one related.
In this way,  all the dynamical trajectories are recovered from the integral curves
of all these vector fields $\{ X_\lambda\}$.
Thus, the geometric Hamilton--Jacobi problem consists in finding
this foliation and  the vector fields $\{ X_\lambda\}$.

Bearing this in mind, the  relation between the classical and the geometric Hamilton--Jacobi theories
is established through the equivalence of complete solutions
and canonical transformations (see [300, 340]).

\begin{teor}
A complete solution $\{ \alpha_\lambda; \lambda\in\Lambda\}$
to the Hamilton--Jacobi problem provides a canonical transformation
$\Phi\colon \Tan^*Q\to \Tan^*Q$ leading the system to equilibrium,
and conversely.
\end{teor}
\begin{proof}
Let $\{ \alpha_\lambda; \lambda\in\Lambda\}$ be a complete solution, and
let ${\cal S}$ be a generating function of it
in a neighbourhood of every point of $\Tan^*Q$.
As ${\cal S}={\cal S}(q^i,\lambda^i)$, the set $\lambda^i$ can be identified
with a subset  of coordinates $\lambda^i\equiv\tilde q^i$ in $\Tan^*Q\times\Tan^*Q$,
and therefore ${\cal S}={\cal S}(q^i,\tilde q^i)$ can be thought as
the local expression of a generating function
of a  local canonical transformation $\Phi$, and hence
of an open set $W$ of the Lagrangian submanifold
$graph\,\Phi\hookrightarrow \Tan^*Q\times\Tan^*Q$.
When this construction is done in every chart, we obtain the transformation $\Phi$
and the submanifold $graph\,\Phi$.
Finally, since (\ref{tres}) holds for every particular solution $S_\lambda$, we have that
E={\rm h}\left(q^i(\tilde q,\tilde p),\derpar{{\cal S}}{q^i}(q(\tilde q,\tilde p),\tilde q)\right)=
{\rm h}(\tilde q^i,\tilde p_i) \ .

Conversely, starting from a canonical transformation $\Phi$ and a
generating function ${\cal S}={\cal S}(q^i,\tilde q^i)$;
if we take $\tilde q\equiv (\tilde q^i)=(\lambda^i)\equiv\lambda$, we obtain
a family of functions $\{ S_\lambda\}$ and then we get a
local complete solution $\{\alpha_\lambda=\d S_\lambda; \lambda\in\Lambda\}$
to the Hamiltonian Hamilton--Jacobi problem.
Doing this construction in every chart, we have the complete solution.
This means that, on each local chart of $\Tan^*Q$,
fixing the coordinates $\tilde q^i=\lambda^i$ of a point,
we obtain a local submanifold of $\Tan^*Q$ whose image by $\Phi^{-1}$ is
the image of a local section $\alpha_\lambda\colon Q\to \Tan^*Q$
which constitutes a particular solution to the Hamiltonian Hamilton--Jacobi problem.
\\ \qed \end{proof}

\section{Skinner-Rusk unified Lagrangian-Hamiltonian formalism}
\label{SRuf}

In their seminal articles of 1983 [311, 312],
{\it R. Skinner} and {\it R. Rusk} proposed a new geometric framework
in order to unify the Lagrangian and the Hamiltonian formalisms
of first-order autonomous mechanical systems
into a single one formulation.
This is a simpler and elegant framework
which is particularly suitable for the treatment of singular systems.
Later, this nice formalism was generalized to many other types of physical systems;
such as nonautonomous dynamical systems [21, 47, 187],
vakonomic and nonholonomic mechanics [93]
control systems [20, 88],
higher-order mechanics [285, 286],
dissipative systems (first and higher-order contact mechanics)  [106, 107],
and first-order and higher-order classical field theories
[44, 51, 119, 147, 288, 294, 295, 336].

In this section, we describe the main features of this so-called {\sl Skinner-Rusk}
or {\sl unified Lagrangian-Hamiltonian formalism} for autonomous dynamical systems.

\subsection{Unified bundle. Unified formalism}

This formalism is developed in the following bundle:

\begin{definition}
The  \textbf{unified bundle} or  \textbf{Pontryagin bundle}
is ${\cal W}=\Tan Q\times_Q\Tan^*Q$
and has natural projections
\varrho_1\colon{\cal W}\to\Tan Q \ ,\
\varrho_2\colon{\cal W}\to\Tan^*Q \ ,\
\varrho_0\colon{\cal W}\to Q \ ,
\end{definition}

Natural coordinates in ${\cal W}$ are $(q^i,v^i,p_i)$.

\begin{definition}
A curve $c\colon\Real\rightarrow{\cal W}$
is \textbf{holonomic} in ${\cal W}$ if
$\varrho_1\circ c\colon\Real\to\Tan Q$ is holonomic.

A vector field $\Gamma \in\vf({\cal W})$  is a \textbf{holonomic vector field} in ${\cal W}$
if its integral curves  are holonomic in ${\cal W}$.
\end{definition}

The coordinate expressions of holonomic curves and vector fields in  ${\cal W}$ are the following
\beann
c(t)&=&\Big(q^i(t),\frac{dq^i}{d t}(t),p_i(t),\Big) \ , \\
\Gamma&=& v^i\derpar{}{q^i}+F^i\derpar{}{v^i}+G_i\derpar{}{p_i}  \ .
\eeann

The unified bundle ${\cal W}$ is endowed with the following canonical structures:

\begin{definition}
\ben
\item
The {\sl \textbf{coupling function}} is the
map ${\cal C}\colon{\cal W}\to\Real$  defined by
\begin{array}{rclcc}
{\cal C} &\colon& \Tan Q \times_Q\Tan^*Q & \longrightarrow & \Real \\
& &(q,v_q,\xi_q)=(q^i,v^i,p_i)& \longmapsto & \langle v_q \mid \xi_q\ \rangle=v^ip_i
\end{array} \ .
\item
If $\Theta\in\df^1(\Tan^*Q)$ and $\Omega=-\d\Theta\in\df^2(\Tan^*Q)$
are the canonical forms in $\Tan^*Q$,
the \textbf{canonical forms} in ${\cal W}$ are
\Theta_{\cal W}:=\varrho_2^*\,\Theta\in\df^1({\cal W}) \quad , \quad
\Omega_{\cal W}:=-\d\Theta_{\cal W}=\varrho_2^*\,\Omega\in\df^2({\cal W}) \ .
\een
\end{definition}

And using the coupling function, we introduce:

\begin{definition}
Given a Lagrangian function $\Lag\in\Cinfty(\Tan Q)$, if
${\mathfrak L}=\varrho_1^*\Lag\in\Cinfty({\cal W})$, the \textbf{Hamiltonian function} is defined as
{\cal H}:={\cal C}-{\mathfrak L}\in\Cinfty({\cal W}) \ .
\end{definition}

The coordinate expressions of these elements are
\Theta_{\cal W}=p_i\d q^i \quad , \quad
\Omega_{\cal W}=\d q^i\wedge\d p_i\quad , \quad
{\cal H}=v^ip_i-{\mathfrak L}(q^i,v^i) \ .

The triple $({\cal W},\Omega_{\cal W},{\cal H})$
is a presymplectic Hamiltonian system since
$\dst\ker\Omega_{\cal W}=\left\langle\derpar{}{v^i}\right\rangle$.
Then, the {\sl\textbf{dynamical problem}} for this system consists in finding $X_{\cal H}\in\vf({\cal W})$
which is a solution to the Hamiltonian equations
\begin{equation}
\label{Whamilton-contact-eqs0}
\inn(X_{\cal H})\Omega_{\cal W}=\d{\cal H} \ ,
\end{equation}
and then the integral curves $c\colon\Real\to{\cal W}$
of $X_{\cal H}$ are solutions to the equations
\begin{equation}
\label{Whamilton-contact-eqs0b}
\inn(\widetilde c)(\Omega_{\cal W}\circ c)=\d{\cal H}\circ c \ .
\end{equation}

As $({\cal W},\Omega_{\cal W},{\cal H})$ is a presymplectic Hamiltonian system,
these equations are not compatible in ${\cal W}$.
In fact, for an arbitrary vector field in $\vf({\cal W})$,
X_{\cal H} =  f^i\derpar{}{q^i}+F^i\derpar{}{v^i}+G_i\derpar{}{p_i} \ ,
equations \eqref{Whamilton-contact-eqs0} give
\beq
f^i= v^i \quad , \quad
G_i= \displaystyle \derpar{\Lag}{q^i} \quad ,  \quad
p_i= \derpar{\Lag}{v^i}  \ .
\label{firstuni}
\eeq
\begin{itemize}
\item
The first equations assure that $X_{\cal H}$ is a holonomic vector field in ${\cal W}$
(regardless of the regularity of the Lagrangian function).
\item
The second equations allow us to determine the component functions $G_i$.
\item
The third equations are compatibility conditions;
that is, {\sl compatibility constraints} defining a submanifold
${\cal W}_0\hookrightarrow{\cal W}$
where vector fields $X_{\cal H}$ solution to \eqref{Whamilton-contact-eqs0} are defined.
Observe that these constraints give the Legendre map and hence ${\cal W}_0={\rm graph}({\Leg})$.
\end{itemize}
Thus, we have that
X_{\cal H} \vert_{{\cal W}_0}= v^i\derpar{}{q^i}+F^i\derpar{}{v^i}+
\derpar{\Lag}{q^i}\derpar{}{p_i}\ ,
where the functions $F^i$ are still undetermined.
Nevertheless, the constraint algorithm for presymplectic systems continues by demanding that
$X_{\cal H}$ is tangent to ${\cal W}_0$; that is, we have
$\dst{X_{\cal H}\Big(p_i- \derpar{\Lag}{v^i}\Big)}\Big\vert_{_{{\cal W}_0}} = 0,$
which gives the equations for the remaining coefficients $F^i$,
\beq
\frac{\partial^2L}{\partial v^i\partial v^j}F^j+ \ \frac{\partial^2L}{\partial q^j\partial v^i}v^j- \derpar{\Lag}{q^i}=0 \quad (\text{on } \mathcal{W}_0)  \ .
\label{eluni}
\eeq

If $\Lag$ is regular, these equations are compatible and define a unique vector field $X_{\cal H}$ solution to \eqref{Whamilton-contact-eqs0} on ${\cal W}_0$,
and the last system of equations give the dynamical trajectories.
If $\Lag$ is singular, equations \eqref{eluni} can be compatible or not.
and, eventually, new compatibility constraints can appear
that define a new submanifold ${\cal W}_1\hookrightarrow{\cal W}_0$.
In that case, the constraint algorithm continues by demanding the tangency of solutions to the new constraint submanifold ${\cal W}_1$ and so on.
In the most favorable cases,
there is a submanifold ${\cal W}_f \hookrightarrow {\cal W}_0$ (it could be ${\cal W}_f = {\cal W}_0$)
such that there exist holonomic vector fields $X_{\cal H}\in\vf({\cal W})$ defined on ${\cal W}_0$ and tangent to ${\cal W}_f$,
which are solutions to equations \eqref{Whamilton-contact-eqs0}
at support on ${\cal W}_f$.

\subsection{Recovering the Lagrangian and Hamiltonian formalisms}

Next, we study the equivalence of the unified formalism
with the Lagrangian and the Hamiltonian formalisms.
We restrict our analysis to the hyperregular case
(the regular case is the same, at least locally).

Denoting by  $\jmath_0\colon{\cal W}_0\hookrightarrow{\cal W}$
the natural embedding, we have that
(\varrho_1\circ\jmath_0)({\cal W}_0)=\Tan Q
\quad , \quad
(\varrho_2\circ\jmath_0)({\cal W}_0)=\Tan^*Q \ ,
and being ${\cal W}_0$ the graph of the Legendre map,
the restricted projection $\varrho_1\circ\jmath_0$
is a diffeomorphism between
${\cal W}_0$ and $\Tan Q$.
The following diagram summarizes the situation:
\xymatrix{
\ & \ & {\cal W}<EMAIL_ADDRESS><EMAIL_ADDRESS>& \ & \ \\
\ & \ & {\cal W}_0={\rm graph}\,(\Leg) \ar[dll]_{\varrho_1\circ\jmath_0} \ar[drr]^{\varrho_2\circ\jmath_0} \ar@{^{(}->}[u]^{\jmath_0} & \ & \ \\
\Tan Q\ar[rrrr]^<(0.45){\Leg}
& \ & \ & \ & \Tan^*Q  \\
Therefore, functions, differential forms, and vector fields in ${\cal W}$ tangent to ${\cal W}_0$
can be restricted to ${\cal W}_0$, and then
they can be translated to the Lagrangian side
by using this diffeomorphism, and to the Hamiltonian side
using the Legendre map and the projection $\varrho_2$.

In particular, if $c(t)=(q^i(t),v^i(t),p_i(t))$ is a solution to equation \eqref{Whamilton-contact-eqs0}
(or, what is equivalent, $c(t)$ is an integral curve of the vector field
$\,X_{\cal H}$ solution to the dynamical equations \eqref{Whamilton-contact-eqs0})
then equation \eqref{eluni} leads to
\beq
\frac{d}{dt}\Big(\derpar{\Lag}{v^i}\circ c\Big)= \derpar{\Lag}{q^i}\circ c \ ,
\label{recuEL}
\eeq
and from equations \eqref{firstuni} we obtain
\beq
\frac{dq^i}{dt}= v^i \quad , \quad
\frac{dp_i}{dt}= \derpar{\Lag}{q^i}\circ c= -\derpar{{\cal H}}{q^i}\circ c \quad ,  \quad
p_i= \derpar{\Lag}{v^i}\circ c  \ .
\label{recuH}
\eeq
From the first group of equations \eqref{recuH}, together with \eqref{recuEL},
we recover the Euler--Lagrange equations for the curves $c_\Lag(t)=(q^i(t),v^i(t))$.
Furthermore, bearing in mind the local expression of ${\cal H}$,
we have that $\dst \derpar{\Lag}{q^i}=-\derpar{{\cal H}}{q^i}$ and hence
the second group of equations \eqref{recuH} reads
\frac{dp_i}{dt}= -\derpar{{\cal H}}{q^i}\circ c
and, using again the local expression of ${\cal H}$ and the first group of equations \eqref{recuH}, we get
\derpar{{\cal H}}{q^i}\circ c=v^i=\frac{dq^i}{dt} \ ;
finally, using the third group of equations \eqref{firstuni}(that is, the Legendre map)
we have that ${\cal H}=\Leg^*{\rm h}$, and these last equations become the {\sl Hamilton equations}
for the curves $c_{\rm h}(t)=(q^i(t),p_i(t))$.

In this way, for the dynamical trajectories, we can state.

\begin{teor}
\label{eqW}
Every curve $c\colon \Real\to{\cal W}$,
taking values in ${\cal W}_0$ can be viewed as
$c=(c_\Lag,c_{\rm h})$, where
$c_\Lag=\varrho_1\circ c\colon \Real \to\Tan Q$
and $c_{\rm h}=
\Leg\circ c_\Lag\colon\Real\to\Tan^*Q$.

If $c\colon\Real\to{\cal W}$,
with  ${\rm Im}\,c\subset{\cal W}_0$,
is a curve fulfilling equation \eqref{Whamilton-contact-eqs0b}, then
$c_\Lag$ is the lift to
$\Tan Q$ of the projected curve
$c_o=\varrho_0\circ c\colon\Real\to Q$
(that is, $c_\Lag$ is a holonomic curve),
and it is a solution to equation \eqref{Lcurv},
where $E_\Lag\in\Cinfty(\Tan Q)$ is such that ${\cal H}=\varrho_1^*E_\Lag$.
Moreover, the curve
$c_{\rm h}=\varrho_2\circ c=\Leg\circ c_\Lag$
is a solution to equation \eqref{elmh2},
where ${\rm h}\in\Cinfty(\Tan^*Q)$ is such that
${\cal H}=\varrho_1^*{\rm h}$.

Conversely, if $c_o\colon\Real\to Q$ is a curve such that
$\widetilde c_o\equiv c_\Lag$ is a solution to equation \eqref{Lcurv}, then the curve
$c=(c_\Lag,\Leg\circ c_\Lag)$
is a solution to equation \eqref{Whamilton-contact-eqs0b}
and $\Leg\circ c_\Lag$
is a solution to equation \eqref{elmh2}
\label{mainteor1}.
\end{teor}

Now, the curves $c\colon\Real\to{\cal W}$ which are
solution to equation \eqref{Whamilton-contact-eqs0b}
are the integral curves of a holonomic vector field $X_{\cal H}\in\vf({\cal W})$
which is the solution to \eqref{Whamilton-contact-eqs0},
the curves $c_\Lag\colon\Real\to\Tan Q$
are the integral curves of the holonomic vector field $X_\Lag\in\vf(\Tan Q)$ which is the
solution to  \eqref{elm}, and  the curves $c_{\rm h}\colon\Real\to\Tan^*Q$
are the integral curves of the vector field $X_{\rm h}\in\vf(\Tan^*Q)$
which is the solution to  \eqref{elmh}.
Then, as a corollary of the above theorem,
for the dynamical vector fields we have:

\begin{teor}
\label{eqL1}
Let $X_{\cal H}\in\vf({\cal W})$ be the solution to equations \eqref{Whamilton-contact-eqs0} (on ${\cal W}_0$),
which is tangent to  ${\cal W}_0$.  Then:

The vector field $X_\Lag\in\vf(\Tan Q)$, defined by
$X_\Lag\circ\varrho_1=\Tan\varrho_1\circ X_{\cal H}$,
is the solution to equations \eqref{elm} and \eqref{edso},
where $E_\Lag\in\Cinfty(\Tan Q)$ is such that ${\cal H}=\varrho_1^*E_\Lag$.

The vector field $X_{\rm h}\in\vf(\Tan^*Q)$, defined by
$X_{\rm h}\circ\varrho_2=\Tan\varrho_2\circ X_{\cal H}$,
is the solution to equations \eqref{elmh},
where ${\rm h}\in\Cinfty(\Tan^*Q)$ is such that
${\cal H}=\varrho_1^*{\rm h}$.
Furthermore $\Leg_*X_\Lag=X_{\rm h}$.
\end{teor}

Summarizing, the main features of the unified formalism are:
\bit
\item
It assures holonomy (even in the non-regular case).
\item
It provides the Legendre map.
\item
It gives the Euler--Lagrange and the Hamilton equations.
\eit

\section{Symmetries of regular Lagrangian systems}

In the case of Lagrangian dynamical systems,
the phase space of the system is either
$M=\Tan Q$ in the Lagrangian formalism, or $M=\Tan^* Q$,
in the canonical Hamiltonian formalism.
In these cases, there exist distinguished symplectic potentials:
the Lagrangian $1$-form $\Theta_\Lag\in\df^1(\Tan Q)$ and the
canonical $1$-form $\Theta\in\df^1(\Tan^*Q)$.
Furthermore, the symmetries of the
dynamical systems use to be canonical lifts
of diffeomorphisms or vector fields on the base manifold $Q$.
All of this lead to introduce new kinds of symmetries in that cases,
whose properties are studied next.

\subsection{Symmetries in the canonical Hamiltonian formalism}

Consider a (regular) canonical Hamiltonian system $(\Tan^*Q,\Omega,\d{\rm h})$,
and let $X_{\rm h}\in\vf_{lh}(\Tan^*Q)$ be the Hamiltonian vector field of the system.

Obviously, all we have stated for Hamiltonian dynamical systems
in Section \ref{secsym} holds for this particular case.
Nevertheless, new kinds of symmetry can be introduced for this situation.
Thus, in addition to the previous symmetries already defined,
we can consider the following particular cases:

\begin{definition}
A dynamical symmetry $\Phi\in {\rm Diff}\, (\Tan^*Q)$ of the canonical Hamiltonian system
is a \textbf{natural dynamical symmetry} if there exists $\varphi\in{\rm Diff}\, (Q)$
such that $\Phi=\Tan^*\varphi$ (that is,  $\Phi$ is the canonical lift
of a diffeomorphism in $Q$).
\end{definition}

\begin{definition}
An infinitesimal dynamical symmetry $Y\in\vf (Q)$ of the canonical Hamiltonian system
is a \textbf{natural infinitesimal dynamical symmetry} if there exists $Z\in\vf (Q)$
such that $Y=Z^*$ (that is, $Y$ is the canonical lift of a vector field in $Q$
\footnote{
The terminology ``natural symmetries'' refers both to the diffeomorphism $\varphi$
or the vector field $Z$.}).
\label{gsdef2}
\end{definition}

Remember that $(\Tan^*Q,\Omega)$ is an exact
symplectic manifold and a symplectic  potential of $\Omega$
is the canonical $1$-form $\Theta\in\df^1(\Tan^*Q)$.
Furthermore, for every $\varphi\in{\rm Diff}\,(Q)$,
we have that $(\Tan^*\varphi)^*\Theta=\Theta$, and hence
In the same way, for every $Z\in\vf(Q)$,
we have that  $\Lie(Z^*)\Theta=0$, and then  $\Lie(Z^*)\Omega=0$;
therefore, if $Z^*$ is an infinitesimal natural dynamical symmetry,
then $Z^*\in\vf_H(\Tan^*Q)$ and, as we saw in Proposition \ref{hamlev},
the global Hamiltonian function of $Z^*$ is $f_Z=\inn (Z^*)\Theta$ (up to constants).
This leads to introduce the following particular type of Noether symmetries
for the canonical Hamiltonian system $(\Tan^*Q,\Omega,\d h)$:
Then, for Noether symmetries, we can define:

\begin{definition}
A diffeomorphism $\Phi\in {\rm Diff}\, (\Tan^*Q)$ is a
\textbf{natural Noether symmetry} if:
\ben
\item
There exists a diffeomorphism $\varphi\in{\rm Diff}\, (Q)$ such that
\item
$\Phi^*{\rm h}=(\Tan^*\varphi)^*{\rm h}={\rm h}$.
\een
\label{nCs}
\end{definition}

\begin{definition}
A vector field $Y\in\vf(\Tan^*Q)$ is an
\textbf{infinitesimal natural Noether symmetry } if:
\ben
\item
There exists a vector field $Z\in\vf (Q)$ such that $Y=Z^*$.
\item
$\Lie(Y){\rm h}=\Lie(Z^*){\rm h}=0$.
\een
\label{nCsinf}
\end{definition}

In addition, as particular cases of Noether symmetries in this formalism, we have:

\begin{definition}
A  Noether symmetry is \textbf{exact} if $\Phi^*\Theta=\Theta$.
\label{eCs}
\end{definition}

\begin{definition}
An infinitesimal Noether symmetry is \textbf{exact} if $\Lie(Y)\Theta=0$.
\label{eCsinf}
\end{definition}

Notice that, for  infinitesimal exact Noether symmetries,
we have also that their local Hamiltonian functions can be expressed as
$f_Y=\inn(Y)\Theta$ (see Proposition \ref{structure}) .

Obviously, every (infinitesimal) natural  Noether symmetry  is a
(infinitesimal) natural  dynamical  symmetry.
Moreover, as every canonical lift preserves the canonical forms
$\Theta\in\df^1(\Tan^*Q)$ and $\Omega\in\df^2(\Tan^*Q)$
(Propositions \ref{levdif} and \ref{inf}), we have that:

\begin{prop}
Every (infinitesimal) natural Noether symmetry is an
(infinitesimal) exact  Noether symmetry.
\end{prop}

At this point, it is possible to state the Noether Theorem as in Theorem \ref{Nth}.
In particular, for infinitesimal exact Noether symmetries,
the associated conserved quantities are
$f_Y=\inn(Y)\Theta$ (up to constants).

Summarizing, the following table recovers the relations among
the several types
of symmetries of the canonical Hamiltonian systems:
\begin{array}{ccc}
\left\{ \begin{array}{c}
\mbox{\rm Natural Noether symmetries}
\end{array}\right\}
& \subset &
\left\{ \begin{array}{c}
\mbox{\rm Natural dynamical symmetries}
\end{array}\right\}
\\ \cap & &  \\
\left\{ \begin{array}{c}
\mbox{\rm Exact Noether symmetries}
\end{array}\right\}
&  & \cap
\\ \cap &  &  \\
\{ \mbox{\rm Noether symmetries}\}
& \subset &
\{ \mbox{\rm Dynamical symmetries} \}
\end{array}

\subsection{Lagrangian formalism: Lagrangian symmetries and Noether's Theorem}

Let $(\Tan Q,\Omega_\Lag,\d E_\Lag)$ be a regular Lagrangian systems
and $X_\Lag\in\vf(\Tan Q)$ the Euler--Lagrange vector field solution of the system.

Also in this situation all the concepts and results about symmetries
established in Section \ref{secsym} are true and,
in this way, we can also introduce the concepts of
{\sl  (infinitesimal) Lagrangian dynamical symmetry},
{\sl  (infinitesimal) Lagrangian Noether symmetry}
and  {\sl (infinitesimal) exact  Lagrangian Noether symmetry},
and their properties and relations, including Noether's Theorem.
But, in addition, the study of symmetries en the Lagrangian formalism
presents some nuances that should be highlighted.

First, we define:

\begin{definition}
A diffeomorphism $\Phi\colon\Tan Q\to \Tan Q$ is a
\textbf{natural Lagrangian dynamical symmetry} if:
\ben
\item
There exists a diffeomorphism $\varphi\colon Q\to Q$ such that $\Phi=\Tan\varphi$.
\item
\een
\label{dls}
\end{definition}

\begin{definition}
A vector field $Y\in\vf(\Tan Q)$ is an
\textbf{ infinitesimal natural Lagrangian dynamical symmetry} if
\ben
\item
There exists $Z\in\vf (Q)$ such that $Y=Z^{C}$.
\item
\footnote{
Or, more generically,
$[Y,X_\Lag]=[Z^{C},X_\Lag]=gX_\Lag$, for some function $g\in\Cinfty(\Tan Q)$).}.
\een
\label{dlsinf}
\end{definition}

As in the canonical Hamiltonian formalism,
the canonical lifts of diffeomorphisms and vector fields
preserve  the canonical structures of $\Tan Q$ (Proposition \ref{lema2}).
A consequence of this is the following:

\begin{prop}
\label{lema3}
\ben
\item
Let $\varphi\colon Q\to Q$ be a diffeomorphism and
$\Phi=\Tan\varphi$ its canonical lift to $\Tan Q$. Then
\Phi^*\Theta_\Lag=\Theta_{\Phi^*\Lag} \quad ,\quad
\Phi^*\Omega_\Lag=\Omega_{\Phi^*\Lag} \quad ,\quad
\Phi^*E_\Lag=E_{\Phi^*\Lag} \ .
\item
Let $Z\in\vf (Q)$ and its canonical lift $Z^C$ to $\Tan Q$. Then
\Lie(Z^C)\Theta_\Lag=0 \quad , \quad
\Lie(Z^C)\Omega_\Lag=0 \quad , \quad
\Lie(Z^C)E_\Lag=0 \ .
\een
\end{prop}
\begin{proof}
It is a straightforward consequence of Proposition \ref{lema2} and the
definitions of  $\Theta_\Lag$, $\Omega_\Lag$, and $E_\Lag$.
In fact:
\ben
\item
For $\Phi=\Tan\varphi$, we obtain
\beann
\Phi^*\Theta_\Lag&=& \Phi^*(\d \Lag\circ J)=\d (\Phi^*\Lag)\circ J)=\Theta_{\Phi^*\Lag} \ ,
\\
\Phi^*\Omega_\Lag&=&\Phi^*(-\d\Theta_\Lag)=-\d\Phi^*\Theta_\Lag=\Omega_{\Phi^*\Lag} \ ,
\\
\Phi^*E_\Lag&=&\Phi^*(\Delta(\Lag)-\Lag)=\Delta(\Phi^*\Lag)-\Phi^*\Lag=E_{\Phi^*\Lag} \ .
\eeann
\item
They are proved using the uniparametric groups of diffeomorphisms generated by
the fluxes of $Z$ and $Z^C$, and the above item.
\een
\qed \end{proof}

Nevertheless, the Lagrangian forms $\Theta_\Lag$ and $\Omega_\Lag$
are not canonical structures of $\Tan Q$,
since they depend on the choice of a Lagrangian function $\Lag$
and hence they are not  invariant by these lifts, necessarily.
Thus,  for Lagrangian Noether symmetries, we can state the following definitions:

\begin{definition}
A diffeomorphism $\Phi\colon\Tan Q\to \Tan Q$ is a
\textbf{natural Lagrangian Noether symmetry}
if there exist a diffeomorphism $\varphi\colon Q\to Q$ such that
$\Phi=\Tan\varphi$ and it satisfies:
\ben
\item
\item
$\Phi^*E_\Lag=(\Tan\varphi)^*E_\Lag=E_\Lag+c$ ($c\in\Real$)
\footnote{
It is usual to write simply that $\Phi^*E_\Lag =E_\Lag$.
\een
\label{nls}
\end{definition}

\begin{definition}
A vector field $Y\in\vf(\Tan Q)$ is an
\textbf{infinitesimal natural Lagrangian Noether symmetry}
if there exists $Z\in\vf (Q)$ such that $Y=Z^{C}$ and it satisfies:
\ben
\item
\item
\een
\label{nlsinf}
\end{definition}

Obviously, every (infinitesimal) natural Lagrangian Noether symmetry
is a (infinitesimal) natural Lagrangian dynamical symmetry.

Finally, as a particular case, we have:

\begin{definition}
A  Lagrangian Noether symmetry is \textbf{exact} if $\Phi^*\Theta_\Lag=\Theta_\Lag$.
\label{eCls}
\end{definition}

\begin{definition}
An infinitesimal  Lagrangian Noether symmetry is \textbf{exact}
if $\Lie(Y)\Theta_\Lag=0$.
\label{eClsinf}
\end{definition}

In these circumstances, it is possible to state the Lagrangian geometric version
of the Noether Theorem.
First, observe that, if $Y\in\vf(\Tan Q)$ is a
infinitesimal natural Lagrangian Noether symmetry, then
Proposition \ref{structure} holds for these kinds of symmetries.
Thus, for every ${\rm p}\in \Tan Q$, there exists an open set $U_{\rm p}\ni{\rm p}$ and
$f_Y\in\Cinfty(U_{\rm p})$, which is unique up to the sum constant functions, such that
\beq
\inn(Z^C)\Omega_\Lag=\d f_Y \qquad \mbox{\rm (in $U_{\rm p}$)} \ .
\label{fA}
\eeq
Furthermore, there exists $\zeta_Y\in\Cinfty(U_{\rm p})$, defined as
$\Lie(Z^C)\Theta_\Lag=\d\zeta_Y$, in $U_{\rm p}$, and such that
\bea
f_Y&=&\zeta_Y-\inn(Z^C)\Theta_\Lag=\zeta_Y-\Theta_\Lag(Z^C)=\zeta_Y-\d\Lag\circ J(Z^C)
\nonumber \\ &=&
\zeta_Y-\d\Lag(Z^V)=\zeta_Y-\inn(Z^V)\d\Lag=\zeta_Y-Z^V(\Lag) \ ,
\label{CV}
\eea
(up to the sum of constant functions in $U_{\rm p}$). Then:

\begin{teor}
{\rm (Lagrangian Noether):}
If $Y=Z^C\in\vf (\Tan Q)$ (with $Z\in\vf(Q)$)
is an infinitesimal natural Lagrangian Noether symmetry,
then $f_Y=\zeta_Y-Z^V(\Lag)$
is a conserved quantity; that is, $\Lie (X_\Lag)f_Y=0$.
\label{NthL}
\end{teor}
\begin{proof}
The proof is the same as in Theorem \ref{Nth}, taking into account (\ref{fA}) and (\ref{CV}).
\\ \qed \end{proof}

If the infinitesimal  Noether symmetry is exact, then $Y=Z^C$ and
we can take $f_Y=\inn(Y)\Theta_\Lag=Z^V(\Lag)$.

\subsection{Equivalent Lagrangians and Noether's Theorem}
\protect\label{flsltn}

It is evident that, if $\Phi\in{\rm Diff}(\Tan Q)$ (resp. $Y\in\vf (\Tan Q)$)
is a canonical lift of a diffeomorphism (resp. of a
vector field) of $Q$ to $\Tan Q$ which, in addition,
lets the Lagrangian function of the system invariant,
then the symplectic form $\Omega_{\Lag}$, the
Lagrangian energy $E_{\Lag}$ and hence the Euler--Lagrange vector field
$X_\Lag$ (that is,  the Euler--Lagrange equations) are also invariant by $\Phi$.
All of this assures that the conditions of Definitions \ref{nls} and \ref{nlsinf} hold.
Nevertheless, this requirement is too strong
because there are Lagrangian functions that, being different,
give the same form $\Omega_{\Lag}$ and the same
Euler--Lagrange equations. This leads to the following:

\begin{definition}
Two Lagrangian functions $\Lag_1,\Lag_2\in\Cinfty (\Tan Q)$
are \textbf{equivalent} if
\Omega_{\Lag_1}=\Omega_{\Lag_2}
\quad {\rm and} \quad
X_{\Lag_1}= X_{\Lag_2} \ .
\end{definition}
For regular Lagrangians this definition is equivalent to the following:

\begin{prop}
Two regular Lagrangians $\Lag_1,\Lag_2\in\Cinfty (\Tan Q)$
are equivalent if
\Omega_{\Lag_1}=\Omega_{\Lag_2}
\quad {\rm and} \quad
E_{\Lag_1}= E_{\Lag_2}+c \ \mbox{\rm( $c\in\Real$)} \ .
\label{gaugecarac}
\end{prop}
\begin{proof}
We must prove that, if $\Omega_{\Lag_1}=\Omega_{\Lag_2}$,
then $X_{\Lag_1}= X_{\Lag_2}$ is equivalent to
$E_{\Lag_1}= E_{\Lag_2}+c$.

If $X_{\Lag_1}= X_{\Lag_2}$, then %$J(X_{\Lag_1})=J(X_{\Lag_2})=\Delta$, and
0=\inn(X_{\Lag_1})\Omega_{\Lag_1}-\d E_{\Lag_1}=\inn(X_{\Lag_2})\Omega_{\Lag_2}-\d E_{\Lag_1} \ ,
which implies that $\d E_{\Lag_1}= \d E_{\Lag_2}$ and, hence, $E_{\Lag_1}= E_{\Lag_2}+c$.

Conversely, if $E_{\Lag_1}= E_{\Lag_2}+c$, then
\inn(X_{\Lag_1})\Omega_{\Lag_1}=\d E_{\Lag_1}=\d E_{\Lag_2}=\inn(X_{\Lag_2})\Omega_{\Lag_2} \ ,
and, as $\Omega_{\Lag_1}=\Omega_{\Lag_2}$,
this implies that $X_{\Lag_1}= X_{\Lag_2}$, since
${\Lag_1}$ and ${\Lag_2}$ are regular Lagrangians and the solution is unique.
\\ \qed \end{proof}

Next, we specify how equivalent Lagrangians are (see also [1]).
First we find the form of Lagrangian functions leading to vanishing Cartan forms:

\begin{prop}
\label{omega=0}
A Lagrangian $\Lag\in\Cinfty(\Tan Q)$ satisfies that
$\Omega_\Lag=0$ if, and only if, there exists a closed $1$-form
$\alpha\in\df^1(Q)$ in $Q$ and a  function
$f\in \mathcal{C}^\infty(Q)$, such that
$\Lag=\widehat{\alpha}+\tau_Q^*f$ (up to a constant),
where $\widehat\alpha\in\Cinfty (\Tan Q)$ is the function defined by
\begin{array}{ccccc}
\widehat\alpha&\colon&\Tan Q&\longrightarrow&\Real
\\ & & (q,v) & \mapsto &\alpha_q(v)
\end{array}\ .
\end{prop}
\begin{proof}
Let $\Omega_\Lag=-\d\Theta_\Lag$; then $\Theta_\Lag=\d\Lag\circ J$
is a closed and semibasic form in $\Tan Q$ and, as a consequence,
it is a basic form. Then, there exists $\alpha\in\df^1(Q)$ such that
\begin{equation}
\label{stau}
\d\Lag\circ J=\tau_Q^*\alpha \ .
\end{equation}
Moreover, since $0=\d\Theta_\Lag=\d(\tau_Q^*\alpha)=\tau_Q^*(\d\alpha)$,
then $\d\alpha=0$; that is, $\alpha$ is a closed $1$-form in $Q$.
Furthermore, a simple computation in local coordinates shows that
$\d\widehat\alpha\circ J=\tau_Q^*\alpha$, and from (\ref{stau}) we have that
\d\widehat\alpha\circ J=\tau_Q^*\alpha = \d\Lag\circ J \ .
Then $\d(\Lag-\widehat\alpha)\circ J=0$, and therefore, the $1$-form
$\d(\Lag-\widehat\alpha)$ is closed and semi-basic.
As a consequence, $\d(\Lag-\widehat\alpha)$ is a basic $1$-form;
that is, there exists $f\in\Cinfty(Q)$ such that
\d(\Lag-\widehat\alpha)=\tau_Q^*\d f=\d(\tau_Q^*f) \ ,
and thus
$\Lag=\widehat\alpha+\tau_Q^*f$ (up to a constant).

Conversely, let us suppose that $\Lag=\widehat\alpha+\tau_Q^*f$
(up to a constant). We have
\Theta_\Lag=\d\Lag\circ J=\d(\widehat\alpha+\tau_Q^*f)\circ J=
\d\widehat\alpha\circ J=\tau_Q^*\alpha  \ ,
since $\d\tau_Q^*f$ vanishes on the vertical vector fields.
As $\alpha$ is closed, $\d\alpha=0$ and we obtain
\Omega_\Lag=-\d\Theta_\Lag=-\d(\tau_Q^*\alpha)=-\tau_Q^*(\d\alpha)=0 \ .
\qed \end{proof}

In a local chart of natural coordinates of $\Tan Q$,
the local expression of a closed $1$-form $\alpha$ is
\begin{displaymath}
\alpha =\alpha_i\d q^i=\derpar{g}{q^i}\d q^i \ ,
\end{displaymath}
for some local function $g$;
then the local expression of the function $\widehat\alpha$ is
\begin{displaymath}
\widehat\alpha=\derpar{g}{q^i}v^i \ .
\end{displaymath}

Now, from this result we obtain the explicit characterization of the equivalent Lagrangians:

\begin{prop}
\label{gaugeL}
Two regular Lagrangians $\Lag_1,\Lag_2\in\Cinfty (\Tan Q)$ are
equivalent if, and only if, $\Lag_1=\Lag_2+\widehat\alpha$  (up to a constant).
\end{prop}
\begin{proof}
Suppose that $\Lag_1,\Lag_2$ are equivalent.
As $\Omega_{\Lag_1}=\Omega_{\Lag_1}$, then
$\Omega_{\Lag_1-\Lag_2}=0$. Therefore, by Proposition \ref{omega=0},
there exist $\alpha\in Z^1(Q)$ and $f\in \mathcal{C}^\infty(Q)$ such that
$\Lag_1-\Lag_2=\widehat\alpha+\tau_Q^*f$ (up to a constant).
From Proposition \ref{gaugecarac} we know that
$E_{\Lag_1}= E_{\Lag_2}$,  (up to a constant), or equivalently,
$E_{\Lag_1}- E_{\Lag_2}=0$ (up to a constant). Then
\begin{array}{lcl}
0&=&E_{\Lag_1}- E_{\Lag_2}=\Delta(\Lag_1)-\Lag_1
-\Delta(\Lag_2)+\Lag_2=\Delta(\Lag_1-\Lag_2)-(\Lag_1-\Lag_2)  \\ &=&
\Delta(\widehat\alpha+\tau_Q^*f)-(\Lag_1-\Lag_2) =
\widehat\alpha-(\Lag_1-\Lag_2)\quad \makebox{(up to a constant)}  \ .
\end{array}

Conversely, suppose that $\Lag_1=\Lag_2+\widehat\alpha$  (up to a  constant).
First, a simple computation gives
\Omega_{\Lag_2}-\Omega_{\Lag_1}=
\d(\Theta_{\Lag_1}-\Theta_{\Lag_2})=\d(\d(\Lag_1-\Lag_2)\circ J)=
\d(\d\widehat\alpha\circ J)=\d(\tau_Q^*\alpha)=\tau_Q^*(\d\alpha)=0 \ .
Thus $\Omega_{\Lag_1}=\Omega_{\Lag_2}$. Furthermore,
as $\Delta(\widehat\alpha)=\widehat\alpha$, we have
\Delta(\Lag_2+\widehat\alpha)-(\Lag_2+\widehat\alpha)=
E_{\Lag_2} + \widehat\alpha - \widehat\alpha= E_{\Lag_2}\quad
\makebox{\rm (up to a constant)} \ .
As $\Omega_{\Lag_1}=\Omega_{\Lag_2}$ and
$ E_{\Lag_1}=E_{\Lag_2}$ (up to a constant),
then $\Lag_1$ and $\Lag_2$ are equivalent (Proposition \ref{gaugecarac}).
\\ \qed \end{proof}

Taking this into account, one can define:

\begin{definition}
A \textbf{symmetry of the Lagrangian} is
a diffeomorphism $\Phi\colon\Tan Q\to\Tan Q$ such that
$\Lag$ and $\Phi^*\Lag$ are equivalent Lagrangians; that is,
$\Phi^*\Lag=\Lag+\widehat\alpha$ (up to constants),
where $\widehat\alpha\in\Cinfty (\Tan Q)$ is the function defined in Proposition \ref{omega=0}.
\end{definition}

\begin{definition}
An \textbf{ infinitesimal symmetry of the Lagrangian} is
a vector field $Y\in\vf (\Tan Q)$ such that  the uniparametric groups of diffeomorphisms
generated by its flux are symmetries of the Lagrangian; that is,
\end{definition}

A special case of these kinds of symmetries are:

\begin{definition}
A \textbf{strict symmetry of the Lagrangian} is a diffeomorphism
$\Phi\colon\Tan Q\to\Tan Q$ such that $\Phi^*\Lag=\Lag$.
% ($c\in\Real$).
\end{definition}

\begin{definition}
An \textbf{ infinitesimal strict symmetry of the Lagrangian} is
a vector field $Y\in\vf (\Tan Q)$ such that  the uniparametric groups of diffeomorphisms
generated by its flux are strict symmetries of the Lagrangian; that is,
\end{definition}

And, in particular, we define:

\begin{definition}
A (strict) symmetry of the Lagrangian  $\Phi\colon\Tan Q\to\Tan Q$ is
said to be \textbf{natural} if there exists a diffeomorphism $\varphi\colon Q\to Q$ such that
\end{definition}

\begin{definition}
An infinitesimal (strict) symmetry of the Lagrangian $Y\in\vf (\Tan Q)$ is
said to be \textbf{natural} if there
exists a vector field $Z\in\vf (Q)$ such that $Y=Z^C$.
\end{definition}

\begin{remark}{\rm
A symmetry of the Lagrangian $\Phi\colon\Tan Q\to\Tan Q$
is not necessarily a Lagrangian Noether  symmetry since, in general,
$\Phi^*\Omega_\Lag\not=\Omega_{\Phi^*\Lag}$ and
$\Phi^* E_\Lag\not= E_{\Phi^*\Lag}$,
as a simple calculation in coordinates shows.
In addition, it is not a Lagrangian dynamical symmetry.
Nevertheless, the following relation holds:

\begin{prop}
A diffeomorphism $\Phi\colon T^1_kQ\to T^1_kQ$ is a natural Lagrangian Noether symmetry
if, and only if, it is a natural symmetry of the Lagrangian.
\end{prop}
\begin{proof}
If $\Phi=\Tan\varphi$, for some diffeomorphism $\varphi\colon Q\to Q$,
according to Lemma (\ref{lema3}) we have that
\Phi^*\Omega_\Lag=\Omega_{\Phi^*\Lag} \quad , \quad
\Phi^*E_\Lag=E_{\Phi^*\Lag} \ ,
and then
\left. \begin{array}{cccc}
\Phi^*\Omega_\Lag&=&\Omega_\Lag &  \\
\Phi^*E_\Lag&=&E_\Lag &  \mbox{\rm (up to constants)}
\end{array}\right\}
\ \Longleftrightarrow \
\left\{ \begin{array}{cccc}
\Omega_{\Phi^*\Lag}&=&\Omega_\Lag & \\
E_{\Phi^*\Lag}&=&E_\Lag &  \mbox{\rm (up to constants)}
\end{array}\right. \ ;
that is, $\Phi$ is a natural Lagrangian Noether symmetry
if, and only if, $\Lag$ and $\Phi^*\Lag$ are equivalent Lagrangians and hence
$\Phi$ is a natural symmetry of the Lagrangian.
\\ \qed \end{proof}

This result holds also for  infinitesimal symmetries,
as can be proved taking the flux of  the vector fields that generate them.
Thus, we have the following immediate corollary:

\begin{prop}
A vector field $Y\in\vf (\Tan Q)$ is an infinitesimal natural Lagrangian Noether symmetry
if, and only if, it is an infinitesimal natural symmetry of the Lagrangian.
\end{prop}

Finally, a version of Noether's Theorem
for infinitesimal natural strict symmetries of the Lagrangian can be established as follows:

\begin{teor}
{\rm (Classical Noether for Lagrangian systems}).
Let  $Y=Z^C\in\vf (\Tan Q)$  (with $Z\in\vf(Q)$)
be an infinitesimal natural strict symmetry of the Lagrangian.
Then $\widetilde  f:=Z^V(\Lag)$ is a conserved quantity; that is, $\Lie (X_\Lag)\widetilde  f=0$.
\label{NthLs}
\end{teor}
\begin{proof}
As every infinitesimal natural strict symmetries of the Lagrangian
is a natural symmetry of the Lagrangian and then,
it is a natural Noether Lagrangian symmetry, according to the above proposition;
then the result is a straightforward consequence of Theorem \ref{NthL},
since $\zeta_Y=\Lie(Y)\Theta_\Lag=\Lie(Z^C)\Theta_\Lag=0$.
\\ \qed \end{proof}

The following table summarizes the relation among  the different kinds
of symmetries in the Lagrangian formalism of  Lagrangian systems:
\begin{array}{ccccccc}
\left\{ \begin{array}{c}
\mbox{\rm  Strict} \\ \mbox{\rm Lagrangian} \\ \mbox{\rm symmetries}
\end{array}\right\}
& \supset &
\left\{ \begin{array}{c}
\mbox{\rm Strict} \\ \mbox{\rm  natural} \\ \mbox {\rm Lagrangian} \\ \mbox{\rm symmetries}
\end{array}\right\}
& & & &
\\ \cap & & \cap & &  & & \\
\left\{ \begin{array}{c}
\mbox {\rm symmetries} \\ \mbox{\rm  of the} \\ \mbox{\rm  Lagrangian}
\end{array}\right\}
& \supset &
\left\{ \begin{array}{c}
\mbox{\rm  Natural} \\ \mbox{\rm symmetries} \\ \mbox{\rm  of the} \\ \mbox{\rm Lagrangian}
\end{array}\right\}
& = &
\left\{ \begin{array}{c}
\mbox{\rm Natural} \\  \mbox{\rm Lagrangian} \\ \mbox{\rm Noether} \\ \mbox{\rm symmetries} \\

\end{array}\right\}
& \subset &
\left\{ \begin{array}{c}
\mbox{\rm  Natural} \\ \mbox{\rm Lagrangian}\\ \mbox{\rm  dynamical} \\ \mbox{\rm   symmetries}
\end{array}\right\}
\\  & &  & & \cap & & \\
& & & &
\left\{ \begin{array}{c}
\mbox{\rm  Exact} \\ \mbox{\rm Lagrangian} \\ \mbox{\rm Noether} \\ \mbox{\rm   symmetries}
\end{array}\right\}
&  & \cap
\\  & &  & &  \cap & &
\\  & &  & &
\left\{ \begin{array}{c}
\mbox{\rm  Lagrangian} \\ \mbox{\rm Noether} \\ \mbox{\rm  symmetries}
\end{array}\right\}
& \subset &
\left\{ \begin{array}{c}
\mbox{\rm Lagrangian} \\ \mbox{\rm  dynamical} \\ \mbox{\rm  symmetries}
\end{array}\right\}
\end{array}

\section{Variational formulation for Lagrangian systems}
\label{lagvariational}

One of the main characteristics of the Lagrangian systems is that
they are variational; that is, their dynamical equations can be obtained
from a variational principle, and the same happens for Hamiltonian systems
[29, 30, 86, 141, 154, 167, 206, 223, 225, 235, 268, 275].
Next, we present the variational formulation of Lagrangian systems.
In order to study this topic, we need to enlarge the phase space to include
the time coordinate, and so we have to consider the trivial bundle
$\Real\times\Tan Q$ (or $\Real\times\Tan^*Q$).

\subsection{Functional associated to a Lagrangian function}
\label{falf}

Let $(\Tan Q,\Lag )$ be a Lagrangian dynamical system.
We can associate to the Lagrangian function a functional defined on a suitable space of curves
which are taken to be possible trajectories of the system.

To get it,  consider the manifolds
$\Real\times\Tan Q$, $\Real\times Q$, and $\Real$
with the canonical projections
\rho\colon\Real\times Q\to \Real  \ , \
\tau_{(1,0)}=id\times\tau_Q\colon\Real\times\Tan Q \to\Real\times Q \ , \
\tau_1=\rho\circ\tau_{(1,0)}\colon\Real\times\Tan Q \to \Real \ .
The canonical projections $\rho$ and $\tau_1$ define a global coordinate in $\Real$
which is denoted $t$, and is physically identified with ``time''.
Then we can take the natural volume element $\d t$ in $\Real$ and its natural lift to
$\Real\times\Tan Q$, which is also denoted by $\d t$.

Now, let $\gamma \colon [a,b]\subset\Real \to Q$ be a curve,
and let $\widetilde\gamma \colon [a,b]\subset\Real \to \Tan Q$ be
its canonical lift of $\gamma$ from $Q$ to the tangent bundle $\Tan Q$.
We denote $\mbox{\boldmath$\gamma$}\colon[a,b]\subset\Real \to\Real\times Q$
the curve given by $\mbox{\boldmath$\gamma$}(t)=(t,\gamma(t))$,
and by $\widehat{\mbox{\boldmath$\gamma$}} \colon [a,b]\subset\Real  \to\Real\times \Tan Q$
the curve $\widehat{\mbox{\boldmath$\gamma$}}(t)=(t,\widetilde\gamma(t))$.

Now, let $\alpha$ be a $1$-form in $\Real\times\Tan Q$.
As $\widehat{\mbox{\boldmath$\gamma$}}^*\alpha$ is a $1$-form in $\Real$,
we can define
\int_{\widehat{\mbox{\boldmath$\gamma$}}} \alpha = \int_a^b\widehat{\mbox{\boldmath$\gamma$}}^*\alpha \ .

Finally, given a (time-dependent) Lagrangian function
$\Lag\colon\Real\times\Tan Q\to\Real$, consider the $1$-form
$\Lag\,\d t \in {\mit\Omega}^1(\Real\times\Tan Q)$.
Then we define

\begin{definition}
For every curve $\gamma \colon \Real \to Q$, the
\textbf{action} of $\Lag$ along $\gamma$ is the functional
{\mathbf L}(\gamma ) := \int_{\widehat{\mbox{\boldmath$\gamma$}}} \Lag\d t \ .
\end{definition}

\begin{remark}{\rm
Usually we take curves
$\gamma \colon \Real \to Q$ defined on a closed  interval
$I=[a,b]\subset\Real$, but we can extend the domain to the whole real numbers defining $\gamma$ out of the interval  as a constant function taking permanently the values on the two extreme points of the interval. Observe that, in this case, the extension may not be differentiable at the extreme points, but this is not a problem for the existence of the integral
\footnote{
From now on it is only necessary that the curve is of class $C^2$.}.

If the Lagrangian function is time-independent,
it is enough to extend it from $\Tan Q$ to $\Real\times\Tan Q$.

\subsection{Hamilton variational principle}

The {\sl variational problem} consists in optimizing the above functional;
that is, to choose the curves for which the functional takes the extremal value.
As this is a very complicated problem we restrict ourselves to look for the local extremal points of the functional:
so we look for curves $\gamma$ such that the value of
$L(\gamma)$ does not change for small variations of the curve,
but in first approximation. Next we are going to precise these ideas.

\begin{definition}
Let $\gamma \colon [a,b]\subset\Real \to Q$ be a curve with
$\gamma (a)=q_0$, $\gamma (b)=q_1$.
A \textbf{variation} of $\gamma$ is a map
\mu \colon (-\epsilon ,\epsilon )\times [a,b]\subset\Real^2 \to Q
such that
\begin{enumerate}
\item
$\mu (0,t)=\gamma (t)$, $t\in [a,b]$.
\item
$\mu (s,a)=q_0$, $\mu (s,b)=q_1$, for $s\in (-\epsilon ,\epsilon )$.
\end{enumerate}
We denote $\mu_s$ the curve defined by
$\mu_s \colon [a,b]\subset\Real \to Q$, with $\mu_s(t)=\mu (s,t)$.
\end{definition}

Observe that, given one of these curves  $\mu_s$, we can lift it to $\Tan Q$ and $\Real\times\Tan Q$ in the usual way.
We denote these lifts as $\widetilde \mu_s$ and $\widehat{\mbox{\boldmath$\mu$}}_s$, which are variations of $\widetilde\gamma$ and $\widehat{\mbox{\boldmath$\gamma$}}$ respectively.

There is a natural way to construct different variations of that type.
In fact, given $X \in \vf(Q)$ with
$X(q_0)=0$, $X(q_1)=0$; if $F_s$ is a local flux for $X$,
a variation of the curve $\gamma$ is obtained by
\beq
\label{variation}
\mu (s,t)=(F_s\circ\gamma)(t)=F_s(\gamma (t)) \ .
\eeq
We know that $F_s \colon Q \to Q$
is a diffeomorphism, and the corresponding lift
$\Tan F_s \colon \Tan Q \to \Tan Q$ is the local flux corresponding to the canonical lift $X^C\in \vf(\Tan Q)$ of $X$ to $\Tan Q$.
In the same way that \eqref{variation} is a variation of $\gamma$,
we have that
\widetilde{\mu} (s,t)=(\Tan F_s\circ\widetilde\gamma)(t)=\Tan F_s(\widetilde\gamma (t))
is a variation of $\widetilde\gamma$.
Observe that $X^C$ is naturally a vector field in $\Real\times\Tan Q$ acting as the identity on the component $\Real$.
It is vertical with respect to the projection $\tau_1\colon\Real\times\Tan Q\to\Real$.

Given $\gamma$ and $F_s$ as above, the following properties hold:
\begin{enumerate}
\item $\mu_s(t)=(F_s\circ\gamma)(t)=F_s(\gamma(t))$
\item $\widetilde{\mu}_s (t)=(\Tan F_s\circ\widetilde{\gamma})(t)=\Tan F_s(\widetilde{\gamma}(t))$
\item ${\mbox{\boldmath$\mu$}}_s(t)=(F_s\circ\mbox{\boldmath$\gamma$})(t)=F_s(\mbox{\boldmath$\gamma$})(t))=(t,F_s(\gamma(t))$
\item $\widehat{\mbox{\boldmath$\mu$}}_s(t)=(\Tan F_s\circ\widehat{\mbox{\boldmath$\gamma$}})(t)=\Tan F_s(\widehat{\mbox{\boldmath$\gamma$}}(t))=(t,\Tan F_s(\widetilde{\gamma}(t))$
\end{enumerate}

These kinds of variations obtained from specific vector fields on the manifold $Q$ are sufficient to obtain the local extreme of the functional ${\mathbf L}(\gamma)$ as we are going to see.

\begin{definition}
A curve $\gamma$ is a \textbf{local extreme} for the functional ${\mathbf L}$
if for every variation $\mu_s= F_s\circ\gamma$, with $F_s$ corresponding to a vector field $X$ as above, the following condition holds:
\frac{d}{d s}\Big\vert_{s=0}\int_{\widehat{\mbox{\boldmath$\mu$}}_s}\Lag\d t =0 \ .
This is the so-called \textbf{Hamilton variational principle}.
\end{definition}

To obtain a more useful way to manage with this definition, first we need the following results:

\begin{prop}
Let  $X\in\vf(Q)$ and $\mu_s$ be the corresponding variation of a curve $\gamma$. Then
\begin{enumerate}
\item
\(\dst \frac{d}{d s}\Big\vert_{s=0}\int_{\widehat{\mbox{\boldmath$\mu$}}_s}\Lag \d t=
\int_{\widehat{\mbox{\boldmath$\gamma$}}}(\Lie (X^C)\Lag)\,\d t\).
%=\int_{\widetilde  \gamma}\widetilde  X(\Lag )\d t\)~.
\item
If $\alpha \in {\mit\Omega}^1(\Tan Q)$, then \
$\displaystyle\frac{d}{d s}\Big\vert_{s=0}\int_{\widetilde{\mu}_s}\alpha =
\int_{\widetilde \gamma}\Lie (X^C)\alpha$.
\end{enumerate}
\end{prop}
\begin{proof}
Taking into account that
$\widetilde  \mu_s = \widetilde  F_s\circ\widetilde  \gamma$ and $\widehat{\mbox{\boldmath$\mu$}}_s=(\Tan F_s\circ\widehat{\mbox{\boldmath$\gamma$}})$,
we have:
\begin{enumerate}
\item
\begin{eqnarray*}
\frac{d}{d s}\Big\vert_{s=0}\int_{\widehat{\mbox{\boldmath$\mu$}}_s}\Lag \d t &=&
\lim_{s\to 0}\frac{1}{s}\left(\int_{\widehat{\mbox{\boldmath$\mu$}}_s}\Lag \d t-
\int_{\widehat{\mbox{\boldmath$\mu$}}_0}\Lag \d t\right)
\\ &=&
\lim_{s\to 0}\frac{1}{s}\left(\int_a^b\widetilde  {\widehat\mu}_s^*(\Lag\,\d t)-
\int_a^b\widetilde  {\widehat\mu}_0^*(\Lag\,\d t)\right)
\\ &=&
\int_a^b\lim_{s\to 0}\frac{\widetilde  {\widehat\mu}_s^*\Lag -\widetilde  {\widehat\mu}_0^*\Lag}{s}\d t
=\int_a^b\widehat{\mbox{\boldmath$\gamma$}}^{*}\lim_{s\to 0}\frac{\Tan  F_s^*\Lag -\Tan  F_0^*\Lag}{s}\d t
\\&=&
\int_a^b\widehat{\mbox{\boldmath$\gamma$}}^{*}(\Lie ( X^C)\Lag) \d t =
%\int_a^b \widetilde  X(\Lag )\d t =
\int_{\widehat{\mbox{\boldmath$\gamma$}}} (\Lie(X^C)\Lag )\d t \ ,
\end{eqnarray*}
$\widetilde  \mu_s^{*}\alpha = (\widetilde  \gamma^{*}\circ\Tan  F_s^{*})\alpha=\widetilde  \gamma^{*}(\Tan  F_s^{*}\alpha)$.
\item
\begin{eqnarray*}
\frac{d}{d s}\Big\vert_{s=0}\int_{\widetilde  \mu_s}\alpha &=&
\lim_{s\to 0}\frac{1}{s}\left(\int_{\widetilde  \mu_s}\alpha -
\int_{\widetilde  \mu_0}\alpha\right)
=\lim_{s\to 0}\frac{1}{s}\left(\int_a^b\widetilde  \mu_s^*\alpha -
\int_a^b\widetilde  \mu_0\alpha\right)
\\ &=&
\int_a^b\lim_{s\to 0}\frac{\widetilde  \mu_s^*\alpha -\widetilde  \mu_0^*\alpha}{s}
\int_a^b\widetilde\gamma^*\lim_{s\to 0}\frac{\Tan\widetilde  F_s^*\alpha -\Tan\widetilde  F_0^*\alpha}{s}
\\&=&
\int_a^b\widetilde\gamma^*\Lie (X^C)\alpha=
%\int_a^b\Lie (X^C)\alpha  =
\int_{\widetilde  \gamma} \Lie(X^C)\alpha \ .
\end{eqnarray*}
\end{enumerate}
\qed \end{proof}

Hence, the problem is to seek for the equation fulfilled by the curves
$\gamma \colon [a,b]\subset\Real \to Q$
satisfying that $\gamma (a)=q_0$, $\gamma (b)=q_1$,
and such that
\frac{d}{d s}\Big\vert_{s=0}\int_{\widetilde  \mu_s}\Lag \d t=
\int_{\widetilde  \gamma}\Lie (X^C)\d t = 0 \ ,
for every variation $\mu_s=F_s\circ\gamma$ of $\gamma$.
Then, we need the following:

\begin{lem}
For every curve $\gamma \colon [a,b]\subset\Real \to Q$ we have
\widetilde{\mbox{\boldmath$\gamma$}}^*(A_\Lag\,\d t)=
\widetilde{\mbox{\boldmath$\gamma$}}^*(\Lag\,\d t) + \widetilde{\mbox{\boldmath$\gamma$}}^*(E_\Lag\,\d t)=
\widetilde{\gamma}^*\Theta_\Lag
\ .
\end{lem}
\begin{proof}
If $t_0\in [a,b]$, let $(q^i,v^i)$ be
a canonical local coordinate system in a neighbourhood of
$\widetilde{\gamma} (t_0)$.
On the one hand,
\begin{eqnarray*}
\big(\widetilde{\gamma}^*(A_\Lag\,\d t)\big)_{t_0}\left(\frac{d}{d t}\Big\vert_{t_0}\right)
=A_\Lag(\widetilde  \gamma (t_0))
\\ &=&
\left(v^i\derpar{\Lag}{v^i}\right)(\widetilde  \gamma (t_0)) =
\left(v^i\derpar{\Lag}{v^i}\right)(\gamma (t_0),\dot\gamma (t_0))=
\dot\gamma (t_0)\derpar{\Lag}{v^i}\Big\vert_{\widetilde  \gamma (t_0)} \ ,
\end{eqnarray*}
and, on the other hand,
\begin{eqnarray*}
(\widetilde{\gamma}^*\Theta_\Lag)_{t_0}\left(\frac{d}{d t}\Big\vert_{t_0}\right)
(\Theta_\Lag)_{t_0}\left(\Tan_{t_0}\widetilde\gamma\left(\frac{d}{d t}\Big\vert_{t_0}\right)\right)=
(\d\Lag\circ J)_{\widetilde\gamma (t_0)}
\left(\Tan_{t_0}\widetilde{\gamma}\left(\frac{d}{d t}\Big\vert_{t_0}\right)\right)
\\ &=&
(\d\Lag\circ J)_{\widetilde\gamma (t_0)}
\left(\dot\gamma^i(t_0)\derpar{}{q^i}\Big\vert_{\widetilde  \gamma (t_0)}
+\ddot\gamma^i(t_0)\derpar{}{v^i}\Big\vert_{\widetilde  \gamma (t_0)}\right)
\\ &=&
(\d\Lag)_{\widetilde\gamma (t_0)}
\left(\dot\gamma^i(t_0)\derpar{}{v^i}\Big\vert_{\widetilde\gamma (t_0)}\right)
=\dot\gamma^i(t_0)\derpar{}{v^i}\Big\vert_{\widetilde\gamma (t_0)} \ .
\end{eqnarray*}
and the result follows.
\\ \qed \end{proof}

\subsection{Euler--Lagrange equations}

Now we can obtain the equation for the curve $\gamma$ solution to the variational problem.

\begin{teor}
The curves $\gamma$ which are local extremes for the functional ${\mathbf L}$
are the solutions to the Euler--Lagrange equations.
\label{hamprinc}
\end{teor}
\begin{proof}
We have that
\begin{eqnarray*}
0 &=&
\frac{d}{d s}\Big\vert_{s=0}\int_{\widehat{\mbox{\boldmath$\mu$}}_s}(\Lag \d t )
\frac{d}{d s}\Big\vert_{s=0}\int_a^b\widetilde  \mu_s^*\Lag \d t
\frac{d}{d s}\Big\vert_{s=0}
\int_a^b\widetilde{\mu}_s^*\Theta_\Lag -\widehat{\mbox{\boldmath$\mu$}}_s^*E_\Lag\d t
\\
\frac{d}{d s}\Big\vert_{s=0}\int_{\widehat{\mbox{\boldmath$\mu$}}_s}\Theta_\Lag -E_\Lag\d t =
\int_{\widetilde{\gamma}}\Lie (X^C)\Theta_\Lag -\Lie(X^C)(E_\Lag )\,\d t
\\
\int_{\widehat{\mbox{\boldmath$\gamma$}}}\d\inn (X^C)\Theta_\Lag +
\inn (X^C)\d\Theta_\Lag -\Lie(X^C)(E_\Lag )\d t \ .
\end{eqnarray*}
But, by Stokes Theorem, being
$X(q_0)=0=X(q_1)$ and $\Theta_\Lag$ a semibasic form, we have that
\(\dst \int_{\widetilde  \gamma}\d\inn (\widetilde  X)\d\Theta_\Lag =0 \); hence
\begin{eqnarray*}
0 &=&
\int_{\widetilde{\gamma}}\inn (X^C)\d\Theta_\Lag -\Lie(X^C)(E_\Lag )\d t
=\int_a^b\widetilde  \gamma^*(\inn (X^C)\d\Theta_\Lag ) -
\widetilde  \gamma^*(\Lie(X^C)(E_\Lag ))\d t
\\ &=&
\int_a^b\left[\d\Theta_\Lag (X^C,(\Tan_t\widetilde  \gamma)\frac{d}{d t})-
(\Lie(X^C)(E_\Lag ))(\widetilde\gamma (t)\right]\d t \ ,
\end{eqnarray*}
\left(\widetilde  \gamma^*(\inn (X^C)\d\Theta_\Lag \right)\frac{d}{d t}\Big\vert_t
=(\inn (X^C)\d\Theta_\Lag )\left(\Tan_t\widetilde  \gamma\frac{d}{d t}\right)
=(d\Theta_\Lag )_{\widetilde\gamma (t)}
\left(X^C,\Tan_t\gamma(\frac{d}{d t})\right) \ ,
and we have
0=\int_a^b\inn (X^C_{\widetilde\gamma (t)}
\left[ -\inn \left(\Tan_t\widetilde  \gamma\frac{d}{d t}\right)\d\Theta_\Lag -
\d E_\Lag\right]\d t \ .
But $X^C$ is an arbitrary vector field; then, observing that
\(\dst
\Tan_t\widetilde\gamma\left(\frac{d}{d t}\right)=(\widetilde  \gamma (t),\dot{\widetilde  \gamma} (t))\),
we have
-\inn (\widetilde  \gamma (t),\dot{\widetilde  \gamma} (t))\d\Theta_\Lag = \d E_\Lag \ ,
and, as $-\d\Theta_\Lag =\Omega_\Lag$, we obtain that
\inn (\widetilde  \gamma (t),\dot{\widetilde  \gamma} (t))\Omega_\Lag = \d E_\Lag \ .
(Recall that
$(\widetilde  \gamma (t),\dot{\widetilde  \gamma} (t))$
is the tangent vector to the curve $\widetilde  \gamma$ at the point $\gamma(t)$).

If we consider that the curves  $\widetilde  \gamma (t)$
which are the solutions to the problem are the integral curves of a vector field
$X_\Lag\in\vf(\Tan Q)$, observing that
the curve $\widetilde\gamma$ is a natural lift
to $\Tan Q$ of the curve $\gamma$ in $Q$, then this vector field must verify the following conditions:
\begin{enumerate}
\item
$\inn (X_\Lag )\Omega_\Lag =\d E_\Lag$.
\item
$X_\Lag$ is a {\sc sode} ($J(X_\Lag )=\Delta$).
\end{enumerate}
and, as we know, these are the geometrical expression of the Euler--Lagrange equations.
\\ \qed \end{proof}

As a final remark, observe that we have said that the vector field $X^C$ is arbitrary, and this is not exact. The real arbitrary vector field is $X$ instead of $X^C$. But the 1-form
\(\dst\inn\left(\Tan\widetilde\gamma\Big(\frac{d}{d t}\Big)\right)\d\Theta_\Lag +
\d E_\Lag\)
is semibasic and, hence, when we apply it to $X^C$ the obtained value depends only on $X$ and not on its canonical lift
$X^C$ from $Q$ to $\Tan Q$.

\subsection{Hamilton--Jacobi variational principle. Relation with the canonical Hamiltonian formalism}
\label{hamvariational}

When we studied the Hamiltonian formalism in the previous Sections,
we commented about the possibility of obtaining the dynamical equations from a variational principle.
Following the discussion on the equivalence between the Lagrangian and the Hamiltonian formalisms,
we can establish the relation between the corresponding variational formalisms.

We have studied above the variational approach to the Lagrangian formalism, then using the corresponding geometrical and dynamical elements we can relate it with the Hamiltonian one.
Thus, let $\Leg \colon \Tan Q \to \Tan^*Q$ be the Legendre map associated to the Lagrangian $\Lag$.
If $\gamma \colon [a,b]\subset\Real \to Q$ is a curve we have
\begin{eqnarray*}
{\mathbf L}(\gamma ) &=&
\int_{\widehat{\mbox{\boldmath$\gamma$}}}\Lag\d t=
\int_{\widehat{\mbox{\boldmath$\gamma$}}}\Theta_\Lag -E_\Lag\,\d t =
\int_{\widehat{\mbox{\boldmath$\gamma$}}}\Leg^*\Theta -\Leg^*{\rm h}\,\d t
\\ &=&
\int_{\widehat{\mbox{\boldmath$\gamma$}}}\Leg^*(\Theta -{\rm h}\,\d t) =
\int_{\Leg\circ\widehat{\mbox{\boldmath$\gamma$}}}\Theta - {\rm h}\,\d t \ ;
\end{eqnarray*}
where we have extended the Legendre transformation $\Leg \colon \Tan Q \to \Tan^*Q$, with the same notation, to
$\Leg \colon\Real\times \Tan Q \to \Real\times\Tan^*Q$,
as the identity on $\Real$
\footnote{
See Definition \ref{legmap}.}.
Note that, if $\gamma$ is a solution to the Hamilton variational problem, that is of the Lagrangian formalism, then
$\Leg\circ\widehat{\mbox{\boldmath$\gamma$}}$ is the solution to the following variational problem:

\begin{definition}