In my Analysis textbook, the author writes $f(x)=\mathcal{O}(g(x))$
But in a video the person said $f(x)\in\mathcal{O}(g(x))$ is the correct interpretation, and even said, the other notation doesnt make any sense.
Is one considered better? Or is one really wrong? Does $f(x)=\mathcal{O}(g(x))$ still imply that $f(x)$ is an element of a given set?
I would say $f(x) \in \mathcal O(g(x))$ is technically more correct, but $f(x) = \mathcal O(g(x))$ is used a lot in literature. The problem with the notation is that the = sign is not symmetric here, that is, $f(x) = \mathcal O(g(x))$ does not mean that $\mathcal O(g(x)) = f(x)$; the latter does not even make sense.