  The construction of exactly solvable refractive indices allowing guided TE
modes in optical waveguides is investigated within the formalism of
Darboux-Crum transformations. We apply the finite-difference algorithm for
higher-order supersymmetric quantum mechanics to obtain complex-valued
refractive indices admitting all-real eigenvalues in their point spectrum. The
new refractive indices are such that their imaginary part gives zero if it is
integrated over the entire domain of definition. This property, called
condition of zero total area, ensures the conservation of optical power so the
refractive index shows balanced gain and loss. Consequently, the complex-valued
refractive indices reported in this work include but are not limited to the
parity-time invariant case.
