# Is there a way to check whether $f(x)=o(g(x))$ for given $f$ and $g$?

I would like a way to check, for two arbitrary but specified real analytic functions $$f(x)$$ and $$g(x)$$, whether $$f(x)=o(g(x))$$.

I am using "little-o notation," where $$f(x)=o(g(x))$$ is true if and only if for every $$\epsilon > 0, \,\,\, f(x) \leqslant \epsilon \cdot g(x)$$ for sufficiently large $$x$$.

Is there a way to do this?

• Do you have an example for $f(x)$ and $g(x)$ where this condition applies? Oct 14 '18 at 16:51
• Look up AsymptoticEqual Oct 14 '18 at 16:55
• @ Carl Woll thanks, actually it looks like that will handle big-O notation, and AsymptoticLess can handle little-o. Oct 14 '18 at 18:06
• @eyorble $f(x)=x$ and $g(x)=x^2$ implies $f(x)=o(g(x))$ Oct 14 '18 at 18:06

Another pre V11.3 method is to use the limit definition:

littleO[f_, g_, x_, x0_:Infinity] := PossibleZeroQ[Limit[f/g, x -> x0]]

littleO[x, x^2, x]

True


AsymptoticLess has already been mentioned, but for people using versions before 11.3 or for those who are generally interested in alternative methodologies, it seems Mathematica can solve this directly from the definition in simple cases:

f[x_] := x;
g[x_] := x^2;
Resolve[ForAll[ε, ε > 0, Exists[x0, ForAll[x, x > x0, f[x] <= ε g[x]]]]]


True