Comparison of Kane's and Lagrange's methods in analysis of constrained dynamical systems