  In this paper we investigate a variational discretization for the class of
mechanical systems in presence of symmetries described by the action of a Lie
group which reduces the phase space to a (non-trivial) principal bundle. By
introducing a discrete connection we are able to obtain the discrete
constrained higher-order Lagrange-Poincar\'e equations. These equations
describe the dynamics of a constrained Lagrangian system when the Lagrangian
function and the constraints depend on higher-order derivatives such as the
acceleration, jerk or jounces. The equations, under some mild regularity
conditions, determine a well defined (local) flow which can be used to define a
numerical scheme to integrate the constrained higher-order Lagrange-Poincar\'e
equations.
  Optimal control problems for underactuated mechanical systems can be viewed
as higher-order constrained variational problems. We study how a variational
discretization can be used in the construction of variational integrators for
optimal control of underactuated mechanical systems where control inputs act
soley on the base manifold of a principal bundle (the shape space). Examples
include the energy minimum control of an electron in a magnetic field and two
coupled rigid bodies attached at a common center of mass.
