C. Park et al. proved the stability of homomorphisms and derivations in Banach algebras, Banach ternary algebras, C*-algebras, Lie C*-algebras and C*-ternary algebras. In this paper, we improve and generalize some results concerning derivations. We first introduce the following generalized Jensen functional equation
and using fixed point methods, we prove the stability of n-ary derivations and n-ary Jordan derivations in n-ary Banach algebras. Secondly, we study this functional equation with *-n-ary derivations in C*-n-ary algebras.