A finite-element estimate with trigonometric hat functions for Sturm-Liouville eigenvalues