HOMEWORK QUESTION Prove that Θ(n) + O(n^2) ⊆ O(n^2). Note that for this problem, you are proving that the set of functions on the left hand side (LHS) is a subset of the set of functions on the right hand side (RHS). The set on the LHS is the algebraic sum of two sets (not the union): an element of the LHS has the form f(n) = f1(n) + f2(n), where f1(n) ∈ Θ(n) and f2(n) ∈ O(n2).
I conceptually understand O/Theta/Omega notations fairly well I'd say, I'm just having a problem knowing how to start this proof, or how to go about showing it. I think having the '⊆' instead of '∈' is confusing me as well. Any help is appreciated.
Hint: You goal is to prove the statement $f(n) \in \Theta(n) + O(n^2) \implies f(n) \in O(n^2)$. This is what the statement $\Theta(n) + O(n^2) \subseteq O(n^2)$ means.
To start, use the triangle inequality on $|f(n)| = |f_1(n) + f_2(n)|$.