  We discuss an extension of the Hamilton-Jacobi theory to nonholonomic
mechanics with a particular interest in its application to exactly integrating
the equations of motion. We give an intrinsic proof of a nonholonomic analogue
of the Hamilton--Jacobi theorem. Our intrinsic proof clarifies the difference
from the conventional Hamilton-Jacobi theory for unconstrained systems. The
proof also helps us identify a geometric meaning of the conditions on the
solutions of the Hamilton-Jacobi equation that arise from nonholonomic
constraints. The major advantage of our result is that it provides us with a
method of integrating the equations of motion just as the unconstrained
Hamilton--Jacobi theory does. In particular, we build on the work by
Iglesias-Ponte, de Leon, and Martin de Diego so that the conventional method of
separation of variables applies to some nonholonomic mechanical systems. We
also show a way to apply our result to systems to which separation of variables
does not apply.
