  In this paper we consider dynamical systems generated by a diffeomorphism F
defined on U an open subset of R^n, and give conditions over F which imply that
their dynamics can be understood by studying the flow of an associated
differential equation, $\dot x=X(x),$ also defined on U. In particular the case
where F has n-1 functionally independent first integrals is considered. In this
case X is constructed by imposing that it shares with $F$ the same set of first
integrals and that the functional equation $\mu(F(x))=\det((DF(x))\mu(x),$ for
x in U has some non-zero solution. Several examples for n=2,3 are presented,
most of them coming from several well-known difference equations.
