This paper considers the equations of motion of mechanical systems subject to inequality constraints, which can be obtained by looking for the stationary value of the action integral. Two different methods are used to take into account the inequality constraints in the computation of the stationary value of the action integral: the method of the Valentine variables and the method of the penalty functions. The equations of motion resulting from the application of the method of the Valentine variables, which introduces the concept of "nonsmooth" impacts, constitute the exact model of the constrained mechanical system; such a model is suitable to be employed when the impacting parts of the actual mechanical system are very stiff. The equations...