Geometric Numerical Integration of Nonholonomic Systems and Optimal Control Problems

A geometric derivation of numerical integrators for nonholonomic systems and optimal control problems is obtained. It is based on the classical technique of generating functions adapted to the special features of nonholonomic systems and optimal control problems.