Study of a Lyapunov-based discretization method using the midpoint approach