Abstract:The direct defferentiation method and adjoint variable method for dynamics of multibody systems were presented,based on the generic formulation of implicit defferential/algebraic equations with implicit initial conditions and generic end time conditions.The computation of the objective functions and their derivatives ware another contributions of this paper,which transformed the integral type of objective functions to integration ones in order to improve computational efficiency.Finally the method was verified by a numerical example of a planar manipulator with two links.