I was trying to study the function $f(x)=1-xe^{-x}$, and for studying the sign I came to the expression $1-xe^{-x} \geq 0$ which can be expressed as $\frac{1}{x} \geq e^{-x}$ or as $e^{x} \geq x$ . But these two inequalities return two different solutions because the first is true only when $x\gt0$ while the second is true $\forall x \in \mathbb{R}$, which is the correct solution. Why this happen?
Why is the expression: $\frac{1}{x} \geq e^{-x} $ is different then the expression: $e^{x} \geq x$ ?
Rearranging $1-xe^{-x}\ge 0$ gives the equivalent $xe^{-x}\le 1$. For $g\ge 0$, this implies $xe^{-x}g\le g$. The choice $g=e^x$ is non-negative as required, so we can deduce $x\le e^x$. But if you try to instead use $g=1/x$ to obtain $e^{-x}\le 1/x$, the problem is this $g$ isn't non-negative for all $x$.