  This article develops variational integrators for a class of underactuated
mechanical systems using the theory of discrete mechanics. Further, a discrete
optimal control problem is formulated for the considered class of systems and
subsequently solved using variational principles again, to obtain necessary
conditions that characterize optimal trajectories. The proposed approach is
demonstrated on benchmark underactuated systems and accompanied by numerical
simulations.
