  If $k\geq 2$ is a positive integer, $\Omega \subset \mathbb{R}^{N}$ is a
domain then by the well-known properties of the Laplacian and the gradient, we
have \[
  \Delta(f\cdot g)=g \Delta f+f \Delta g+2\langle \nabla f, \nabla g\rangle \]
for all $f, g\in \mathscr{C}^{k}(\Omega, \mathbb{R})$. Due to the results of
K\"onig--Milman \cite{KonMil18}, the converse is also true under some
assumptions. Thus the main aim is this paper is to provide an extension of this
result and to study the corresponding equation \[
  T(f\cdot g)= fT(g)+T(f)g+2B(A(f), A(g))
  \qquad
  \left(f, g\in P\right), \] where $Q$ and $R$ are commutative rings and $P$ is
a subring of $Q$, further $T\colon P\to Q$ and $A\colon P\to R$ are additive
mappings, while $B\colon R\times R\to Q$ is a symmetric and bi-additive
mapping. Related identities with one function will also be considered which
turn also suitable for characterizing second-order differential operators.
