Two methods for solving the Dirac equation without variational collapse