The Wikipedia page for Big-$O$ states that we write $f(x)=O(g(x))$ as $x\rightarrow\infty$ iff
$$\limsup_{x\rightarrow\infty}{\left|\frac{f(x)}{g(x)}\right|}<\infty.$$
But does this not imply that $f$ is $O$ of multiple functions? For instance, $f(x)=2x^3+x$ is $O(x^3)$ since $\limsup_{x\rightarrow\infty}{\left|\frac{2x^3+x}{x^3}\right|}=2<\infty$. But we must also have that $f$ is $O(e^x)$, since $\limsup_{x\rightarrow\infty}{\left|\frac{2x^3+x}{e^x}\right|}=0<\infty$. Am I missing something here?
Does a function have multiple Big-$O$’s
asymptoticsdefinitionlimits
Related Question
- Show which function grows faster
- Mathematical vs. Computer Science Definition Big $O$
- Does $\lim_{n \to \infty} \frac 1n \cdot f^{-1}\Big( \big[n f(n) \big]^{1/2} \Big) = \infty$ if $\lim_{x \to \infty}f(x) = \infty$ and $f(x) = o(x)$
- Understanding big O for multiple variables in the context of optimization theory.
Best Answer
You are right.
More over it holds $$f \in O(g), g \in O(h) \Rightarrow f\in O(h)$$
As you can see I prefer to write $f \in O(g)$ instead of $f = O(g)$ to make it clear that $f$ is only one of many functions which is in $O(g)$