Let N, k be positive integers with \(k\ge 2\) , and \(\Omega \subset {\mathbb {R}}^{N}\) be a domain. By the well-known properties of the Laplacian and the gradient, we have \(\begin{aligned} \nabla ^2(f\cdot g)=g \nabla ^2 f+f \nabla ^2 g+2\langle \nabla f, \nabla g\rangle \end{aligned}\) for all \(f, g\in {\mathscr {C}}^{k}(\Omega , {\mathbb {R}})\) . H. König and V. Milman showed that the converse is also true, i.e. this operator equation characterizes the Laplacian and the gradient under some assumptions. Thus the main aim of this paper is to provide an extension of this result and to study the corresponding equation \(\begin{aligned} T(f\cdot g)= fT(g)+T(f)g+2B(A(f), A(g)) \qquad \left( f, g\in P\right) , \end{aligned}\) where Q and R are commutative rings, P is a subring of Q and \(T:P\rightarrow Q\) and \(A:P\rightarrow R\) are additive, while \(B:R\times R\rightarrow Q\) is a symmetric and bi-additive. Related identities with one function will also be considered.