In order to derive the necessary conditions of optimality and to apply the general numerical methods, a formal transformation of the second order system to a first order one has to be performed. First the notation
is introduced. The resulting system of first order differential equations is
For convenience, the functionals and
, resp.,
are transformed into a Mayer type functional by defining
an additional state variable