TITLE: Can any function be upper bounded by a separable function?
QUESTION [9 upvotes]: Given a function $f(x,y)$, can we always find functions $h(x), g(y)$ such that $$f(x,y) \leq h(x) + g(y)$$ for all $x,y, \geq 0$?
Note that I have placed no restrictions on the functions $f(x,y), g(x), h(y)$ above. 
Now perhaps this will fall out automatically from of the answer, but I would also be interested to know if it makes any difference whether $f(x,y)$ is continuous or smooth, and if the answer is yes in that case, whether $h(x)$ and $g(y)$ can then be taken to be continuous/smooth as well.

REPLY [2 votes]: Choose $h(x) = \sup_{|y|\leq|x|}|f(x,y)|$ and $g(y) = \sup_{|x|\leq |y|} |f(x,y)|$.  Then we have $h(x)\geq 0$ and $g(y)\geq 0$ everywhere; what's more, if $|x|\geq |y|$ then $h(x)\geq f(x,y)$ by definition, whereas if $|y|\geq |x|$ then $g(y)\geq f(x,y)$ also by definition.  In either case, we have $h(x)+g(y)\geq f(x,y)$.
This solution requires the assumption that $f(x,y)$ is bounded on compact domains, but not that it's continuous.  If $f(x,y)$ isn't bounded then I'm fairly certain it's impossible: consider e.g. $f(x,y) = \frac{1}{|1-xy|}$ on $(\mathbb{R}^{+})^2$ (and arbitrarily defined on the hyperbola; e.g., $f(x,y)=0$ if $x=\frac1y$).  Then if $h(x)$ is bounded on any interval $[a,b]$, we can choose a $y$ from the interval $[\frac1b, \frac1a]$ and obtain a contradiction by looking at neighborhoods of the point $(\frac1y, y)$.