Does a function have multiple Big-$O$'s?

357 Views Asked by At

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?

2

There are 2 best solutions below

2
On 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)$

0
On

Yes for course, and it is also true for the little-o as for example

$$\sin x-x=o(x)$$

but also

$$\sin x-x=o(1), \quad \sin x-x=o(x^2)$$

and in general

$$\sin x-x=o(x^\alpha)$$

with $\alpha\in(-\infty,3)$.