How to improve the accuracy of the discrete gradient method in the one-dimensional case