Hamilton-Jacobi Potential from a Closed Hilbert Form