f ∈ O(n^2)
If you write this, it's a shorthand for f ∈ O(g) where g : n ↦ n^2. But f(x) ∈ O(g(x)) is nonsensical because f(x) isn't a thing. f is a function; f(5) is a number, "f(x) = 3x" is a shorthand for f = {... (-1, -3), (0,0), (1,3), ...}. But f(x) itself is literally not anything.