Largest set in which $(x, y)\mapsto \sqrt{xe^y - ye^x}$ is defined I have to find the biggest $\mathbb{R}^2$ subset in which the function 
$g(x,y) = \sqrt{xe^y - ye^x}$
is defined. In order to do it I have to study 
$xe^y - ye^x \ge 0$
but I can't find out a solution. Can someone help me? 

Note that $x e^y - y e^x \ge 0$ iff $x e^{-x} - y e^{-y} \ge 0$.
Let $f(x) = x e^{-x}$. We will look for pairs $(x,y)$ such that $f(y) \le f(x)$, so first look at some properties of $f$.
Let $E= \{(x,y) | f(x) = f(y) \}$, $L= \{(x,y) | f(x) \ge f(y) \}$. We are interested in a description of $L$.

Note that $f$ is smooth, $f(0)=0$, $f$ has a $\max$ of ${1 \over e}$ at $x=1$, and is strictly increasing on $x<1$, strictly decreasing on $x>1$, strictly positive
for $x>0$ and strictly negative for $x<0$.
(This shows that $(1,y) \in L$ for all $y$.)
Note that $f^{-1} (\{\alpha\})$ is empty for $\alpha > {1 \over e}$, has exactly two points for $\alpha \in (0,{1 \over e})$ and has one point otherwise.
Hence the set $f^{-1} ( \{ f(x) \} )$ contains one point (which must be $x$) for $x \le 0$ and two points (one of which must be $x$) for $x >0$, $x \neq 1$. Let $\phi(x)$ denote the other point for $x >0$, $x \neq 1$. We see that $\phi$ is continuous, strictly decreasing, $\lim_{x \downarrow 0} \phi(x) = \infty$, $\lim_{x \to \infty} \phi(x) = 0$ and $\lim_{x \to 1} \phi(x) = 1$. Note that the inverse function theorem shows that $\phi$ is smooth for $x >0$, $x \neq 1$. To simplify life, let $\phi(1) = 1$.
Now note that $E = \{ (x,x) \} \cup \{ (x,\phi(x)) | x > 0 \}$.
From this we see that
$L= \{ (x,y) |x \le 0, y \le x \} \cup \{ (x,y) |0<x \le 1, y \le x  \text{ or } y \ge \phi(x) \} \cup \{ (x,y) |1 < x, y \le \phi(x)  \text{ or } y \ge x \}$.
Note: The graph of $\phi$ is symmetric around the $y=x$ line.
Note: The function $\phi$ is differentiable at $x=1$ with derivative $-1$, but is rather tedious to show.
First we establish a Lipschitz bound on $\theta$.
We have $f(x) = f(1) + {1 \over 2} f''(\xi) (x-1)^2$ for some $\xi \in [1,x]$ (the interval is understood to be $[x,1]$ if $x <1$).
Since $f(\theta(x)) = f(1) + {1 \over 2} f''(\xi_1) (\theta(x)-1)^2 = f(x)$ and $(1-x), (1-\theta(x))$ have opposite sign we get
$\theta(x) -1 = \sqrt{f(x)-f(1) \over 2 f''(\xi_1)}$ and expanding
$f(x)$ yields $\theta(x) -1= \sqrt{f''(\xi_2) \over f''(\xi_1)} (1-x)$.
In particular, for $x$ close to $1$ there is some $L$ such that
$|\theta(x)-1| \le L |x-1|$.
Since $f$ is smooth, for $x$ close to $1$ there is some $K$ such that
$|f(x)-f(1)-{1 \over 2} f'(1)(x-1)^2| \le K(x-1)^3$.
Then $f(\theta(x)) -f(x) = 0$ gives
${1 \over 2}|f''(1)((\theta(x)-1)^2 + (x-1)^2) | \le K(|\theta(x)-1|^3 + |x-1|^3) \le (1+KL^3)|x-1|^3$.
Rearranging gives
$|\theta(x)-x| |(\theta(x)-1) -(-1)(x-1)| \le {2 \over f''(1)}(1+KL^3) |x-1|^3$, and since
$|\theta(x)-x| \ge |x-1$, we have
$|(\theta(x)-1) -(-1)(x-1)| \le {2 \over f''(1)}(1+KL^3) |x-1|^2$
from which it follows that $\theta$ is differentiable at $x=1$ with
derivative $-1$.
Whew! A lot of work for little gain :-).
