In this paper we study the preservation of Lyapunov functions in the numerical integration of ordinary differential equations. By means of a continuous extension and a projection technique we extend the technique proposed by Grimm and Quispel (BIT 45, 2005), so that it can be applied to other families Runge—Kutta methods such as the well known Dormand and Prince 5(4) pair. [ABSTRACT FROM AUTHOR]