A Method of Eliminating Lagrangian Multipliers from the Equation of Motion of Interconnected Mechanical Systems