In this paper we are going to show that derivations satisfying some identity carry a certain form. To prove this, we assume \(\mathcal {R}\) is a prime ring with \(char(\mathcal {R})\ne 2\) , \(\mathcal {I}\) is a nonzero ideal of \(\mathcal {R}\) , \(\mathcal {U}\) is the Utumi quotient ring of \(\mathcal {R}\) with extended centroid \(\mathcal {C}=\mathcal {Z}(\mathcal {U})\) and \(f(x_1,\ldots ,x_n)\) is any noncentral valued multilinear polynomial over \(\mathcal {C}\) . Suppose that \(\mathcal {F}\) and \(\mathcal {G}\) are two generalized derivations and d is any non-zero derivation of \(\mathcal {R}\) . If \(\begin{aligned}\mathcal {F}^2(f(\zeta ))d(f(\zeta ))-\mathcal {G}(f(\zeta )^2) \in \mathcal {C}\end{aligned}\) for all \(\zeta =(\zeta _1,\ldots ,\zeta _n)\in \mathcal {I}^n\) , then \(\mathcal {F}(x)=ax\) or \(\mathcal {F}(x)=xa\) for any \(x\in \mathcal {R}\) , for some \(a\in \mathcal {U}\) along with \(a^2 =0\) and following one conclusion holds: (1) \(\mathcal {G}=0\) ;
(2) there exists \(\lambda \in \mathcal {C}\) and a derivation h of \(\mathcal {R}\) such that \(\mathcal {G}(x)= \lambda x+h(x)\) for all \(x\in \mathcal {R}\) with \(f(\zeta _1,\ldots ,\zeta _n)^2\) is central valued on \(\mathcal {R}\) ;
(3) \(\mathcal {R}\) satisfies \(s_4\) .