On the problem of the stabilization of a mechanical system