Identities with Generalized Derivations on Prime Rings and Banach Algebras