We present a general approach to solve the (1+1) and (2+1)-dimensional Dirac
equation in the presence of static scalar, pseudoscalar and gauge potentials,
for the case in which the potentials have the same functional form and thus the
factorization method can be applied. We show that the presence of electric
potentials in the Dirac equation leads to a two Klein-Gordon equations
including an energy-dependent potential. We then generalize the factorization
method for the case of energy-dependent Hamiltonians. Additionally, the shape
invariance is generalized for a specific class of energy-dependent
Hamiltonians. We also present a condition for the absence of the Klein's
paradox (stability of the Dirac sea), showing how Dirac particles in low
dimensions can be confined for a wide family of potentials.Comment: 24 pages, 4 references added, types correcte