We obtain the inequalities of the form \(\int _{\Omega }|\nabla u(x)|^2h(u(x))\,d x\le C\int _{\Omega } \left( \sqrt{ |P u(x)||{\mathcal {T}}_{H}(u(x))|}\right) ^{2}h(u(x))\,d x +\Theta ,\) where \(\Omega \subset {\textbf{R}^{n}}\) is a bounded Lipschitz domain, \(u\in W^{2,1}_{\textrm{loc}}(\Omega )\) is non-negative, P is a uniformly elliptic operator in non-divergent form, \({\mathcal {T}}_{H}(\cdot )\) is certain transformation of the monotone \(C^1\) function \(H(\cdot )\) , which is the primitive of the weight \(h(\cdot )\) , and \(\Theta \) is the boundary term which depends on boundary values of u and \(\nabla u\) , which hold under some additional assumptions. Our results are linked to some results from probability and potential theories, e.g. to some variants of the Douglas formulae.