This paper presents an efficient symbolic-numerical approach for generating and solving the Boundary Value Problem - Differential Algebraic Equation (BVP-DAE) originating from the variational form of the Optimal Control Problem (OCP). This paper presents the Method for the symbolic derivation, by means of symbolic manipulation software (Maple), of the equations of the OCP applied to a generic multibody system. The constrained problem is transformed into a non-constrained problem, by means of the Lagrange multipliers and penalty functions. From the first variation of the nonconstrained problem a BVP-DAE is obtained, and the finite difference discretization yields a non-linear systems. For the numerical solution of the non-linear system a damped Newton scheme is used. The sparse and structured jacobians is quickly inverted by exploiting the sparsity pattern in the solution strategy. The proposed method is implemented in an object oriented fashion, and coded in C++ language. Efficiency is ensured in core routines by using Lapack and Blas for linear algebra