Second-order methods for the optimum synthesis of multibody systems