# How to prove $f(n) \in O(h(n))$ and $g(n) \in O(i(n))$, then $f(n)+g(n) \in O(max(h(n),i(n)))$

Prove with formal proof that if $$f(n) \in O(h(n))$$ and $$g(n) \in O(i(n))$$, then $$f(n)+g(n) \in O(max(h(n),i(n)))$$

What I have so far:

By definition of Big-Oh

$$\exists c_1 \exists n_1 \forall n \geq n_1 ( f(n) \leq c_1 \cdot h(n))$$

$$\exists c_2 \exists n_2 \forall n \geq n_2 ( f(n) \leq c_2 \cdot i(n))$$

Let $$n_0= max(n_1,n_2)$$.

Then $$f(n)+g(n) ≤ c_1 \cdot h(n) + c_2 \cdot i(n) = (c_1 \cdot h + c_2 \cdot i)(n)$$, for all $$n ≥ n_0$$.

I get what the statement is trying to prove, I don’t know how to get $$f(n)+g(n) ≤ c\cdot max(h(n),i(n))$$, or equivalent, which implies $$f(n)+g(n) \in O(max(h(n),i(n)))$$