A comparative study on some different formulations of the dynamic equations of constrained mechanical systems