Respuesta :

[tex]f(n)\in\mathcal O(g(n))[/tex] is to say

[tex]|f(n)|\le M_1|g(n)|[/tex]

for all [tex]n[/tex] beyond some fixed [tex]n_1[/tex].

Similarly, [tex]d(n)\in\mathcal O(h(n))[/tex] is to say

[tex]|d(n)|\le M_2|h(n)|[/tex]

for all [tex]n\ge n_2[/tex].

From this we can gather that

[tex]|f(n)+d(n)|\le|f(n)|+|d(n)|\le M_1|g(n)|+M_2|h(n)|\le M(|g(n)|+|h(n)|)[/tex]

where [tex]M[/tex] is the larger of the two values [tex]M_1[/tex] and [tex]M_2[/tex], or [tex]M=\max\{M_1,M_2\}[/tex]. Then the last term is bounded above by

[tex]M(|g(n)|+|h(n)|)\le2M\max\{|g(n)|,|h(n)|\}[/tex]

from which it follows that

[tex]f(n)+d(n)\in\mathcal O(\max\{g(n),h(n)\})[/tex]