I've been trying to think of a function $f(x,y)$ that is only positive in the $+x, +y$ quadrant, but I'm stumped.
To be more precise, I'm looking for a function that satisfies these conditions:
- $f$ is continuous and differentiable
- $f(x,y) > 0 \iff x > 0 \land y > 0$ otherwise $f(x,y) \le 0$.
A function like $f(x,y) = x + y$ comes close, but is not strictly $\le 0$ in the $-x, +y$ or $+x, -y$ quadrants.
Such a function cannot be a polynomial, or locally approximated by polynomials. To see why, we observe that at $(0,0)$, if $f$ were locally aproximable by a polynomial, we would have $$ f(x,y) \approx \prod_{k=0}^n (a_k x + b_k y) $$ for some constants $a_k,b_k$. We have $f(-x,-y) \approx (-1)^n f(x,y)$. Thus if $f(x,y)$ is positive in the 1st quadrant and negative in the 3rd, it must also have opposite signs on the 4th and 2nd quadrants.
If we do a piece-wise defined function, it's easy: $$ f(x,y) = \begin{cases}x^2y^2 & x>0\text{ and }y>0\\-x^2y^2 & \text{otherwise}\end{cases} $$