# Quick question about comparing functions.

Suppose I have functions f and g; is there any theorem or technique that I can use to know if $f(x) \leq g(x)$ or if $f(x) \geq g(x)$ or neither in a given interval?

-
Equivalently, you're asking for ways to prove if $h(x)$ is nonnegative or nonpositive within a given interval, where $h(x)=f(x)-g(x)$... – J. M. Jul 7 '12 at 14:17
I can sure have $h(x)=f(x)-g(x)$ but the problems is, I wouldn't know in what interval would it be nonnegative or nonpositive. It's more interesting and convenient if I'd know if it is nonnegative or nonpositive when I $\underline{already}$ have an interval. – Dystopian Jul 7 '12 at 14:49

I don't know if this is helpful and it doesn't solve your general problem, but as an example: if you have sat two real valued (differentiable) functions $f$ and $g$ defined on the same say closed interval $[a, b]$ of the real numbers, you could for example note that say $f(a) > g(a)$ for the left endpoint of the interval and then note that the derivative of $f$ is greater than or equal to the derivative of $g$ on the whole interval. If this is all so, then you would be able to conclude that $f(x) > g(x)$ for all x in the interval. But again, this approach would only apply to a small set of functions.
Another idea could be to (as above) first note that $f$ is greater than $g$ at some point in the interval and then show that $f(x) = g(x)$ does not have any solutions. Then $f$ clearly would be greater than $g$ on the whole interval.
Almost. You also need that $f(a) > g(a)$ for a left endpoint of the interval. If you don't have $f$ being greater than $g$ at a point, then it isn't true. – Thomas Jul 7 '12 at 14:34