In this paper we propose a numerical approach to solve the relativistic Dirac equation suitable for computational calculations of one-electron systems. A variational procedure is carried out similar to the well-known Hylleraas computational method. An application of the method to hydrogen isoelectronic atoms is presented, showing its consistency and high accuracy, relative to the exact analytical eigenvalues.