# Given two functions, how to find range of values for which first function has values greater than second?

Given two functions $$f(x)$$ and $$g(x)$$, how do I find the range $$[a,b]$$, such that $$\forall{x} \in [a,b], f(x) > g(x)$$.

Is/are there any standard way of solving such problems. Do they apply to different possibilities of functions, such as,

• continuous functions $$f(x) = x^3 + x^2$$ and $$g(x) = x^4$$
• non continuous functions $$f(x) = \left \lceil x^ \frac 3 5 \right \rceil$$ and $$g(x) = \left \lfloor x ^ \frac 2 3 \right \rfloor$$
• Some other possible cases I can't think of.

Also, what when x itself is restricted, say to only integers?

The above question came out of curiosity of finding the value for number of inputs, for which some algorithm works, or for which it works better than some alternative.

Trying to search the web turned to be futile, as I don't even know what these kind of problems are called.

I am not necessarily looking for the direct solutions, even pointers to what the solutions might be would suffice.

• Notice in general you are merely looking at where $f(x) - g(x) \gt 0$. And there can be more than one interval, it is possible to have infinitely many intervals. Example, $f(x) = \sin (x)$ and $g(x) = 0$ – WaveX Oct 19 '18 at 16:20