I am working in data science and I have to deal with the following problem for which I would like to find a simplification:


We call a function almost positive if $f(x\_1,y\_1)f(x\_2,y\_2)-f(x\_1,y\_2)f(x\_2,y\_1) \ge 0$ for all $0< x\_1\le x\_2 < \infty$ and $0 < y\_1\le y\_2 < \infty.$


**I would like to know:** Are there any sufficient and necessary criteria for a function $f$ to be almost positive? 


**Background:** The problem is that I often have a positive smooth function $f$ which I need to check for almost positivity. Those functions $f$ are usually cumbersome expressions such that checking 


$f(x\_1,y\_1)f(x\_2,y\_2)-f(x\_1,y\_2)f(x\_2,y\_1) \ge 0$
is almost impossible analytically, because one has to compare infinitely many variables which each other and unless one can simplify the expression in a clever way, checking this condition is hopeless. 


I am therefore asking whether there is an equivalent criterion to the almost positivity condition which I can check in a more direct way? Ideally there would exist an "intrinsic" criterion for functions $f$ which implies this property.


If there is nothing equivalent to almost positivity, perhaps there exist rather general sufficient conditions which imply almost positivity? 



Checking $f(x_1,y_1)f(x_2,y_2)-f(x_1,y_2)f(x_2,y_1) \ge 0$
You say your function is smooth, so letting $x\_1 = x, y\_1 = y, x\_2 = x + \Delta x, y\_2 = y+\Delta y,$ we get in the limit as the deltas go to zero, if we ignore the second order terms, then 


$$ \dfrac{\partial f}{\partial x} \dfrac{\partial f} {\partial x} d x d y < 0.$$ This indicates that we cannot ignore the second order terms, and when the smoke clears, we seem to get 


$$f\dfrac{\partial^2 f}{\partial x \partial y} - \dfrac{\partial f}{\partial x} \dfrac{\partial f} {\partial x} \geq 0,$$ which is nonlinear and hyperbolic. Changing it to an equation may or may not be enlightening.


