  Optimal control problems for underactuated mechanical systems can be seen as
a higher-order variational problem subject to higher-order constraints (that
is, when the Lagrangian function and the constraints depend on higher-order
derivatives such as the acceleration, jerk or jounces). In this paper we
discuss the variational formalism for the class of underactuated mechanical
control systems when the configuration space is a trivial principal bundle and
the construction of variational integrators for such mechanical control
systems.
  An interesting family of geometric integrators can be defined using
discretizations of the Hamilton's principle of critical action. This family of
geometric integrators is called variational integrators, being one of their
main properties the preservation of geometric features as the symplecticity,
momentum preservation and good behavior of the energy. We construct variational
integrators for higher-order mechanical systems on trivial principal bundles
and their extension for higher-order constrained systems and we devote special
attention to the particular case of underactuated mechanical systems
