Definitivamente, usted puede usar el método utilizado para probar O(f(n)) + O(g(n)) = O(f(n) + g(n)) para mostrar lo que usted desea. Pero, también hay que añadir la condición de que f(n) y g(n) es mayor que cero. Voy a probar esto para usted y deje que ver cómo se aplican al problema que presenta.
Deje que las secuencias de $\left(f_{n}\right)$ $\left(g_{n}\right)$
satisfacer $f_{n}>0$ $g_{n}>0$ todos los $n\in\mathbb{N}$. Entonces
$\mathcal{O}\left(f_{n}\right)+\mathcal{O}\left(g_{n}\right)=\mathcal{O}\left(f_{n}+g_{n}\right)$.
Prueba.Supongamos que
$$
\varphi_{n}=\mathcal{S}\left(f_{n}\right)\quad\text{y}\quad\psi_{n}=\mathcal{S}\left(g_{n}\right).
$$
Entonces, por definición, no existen índices de estas secuencias $n^{\prime}\in\mathcal{\mathbb{N}}$
y $n^{\prime\prime}\in\mathbb{N}$, así como constantes $M_{1}>0$
y $M_{2}>0$ tal que $\left|\varphi_{n}\right|\leq M_{1}f_{n}$
siempre que $n>n^{\prime}$$\left|\psi_{n}\right|\leq M_{2}g_{n}$siempre
$n>n^{\prime\prime}$. Así, tomando los $n_{0}:=\max\left\{ n^{\prime},n^{\prime\prime}\right\} $,
de ello se sigue que
$$
\left|\varphi_{n}+\psi_{n}\right|\leq\left|\varphi_{n}\right|+\left|\psi_{n}\right|\leq M_{1}f_{n}+M_{2}g_{n}
$$
para $n>n_{0}$. Ahora, tomando el máximo de estas dos constantes, es decir,
$M:=\max\left\{ M_{1},M_{2}\right\} $, se deduce que
$$
\left|\varphi_{n}+\psi_{n}\right|\leq M\left(f_{n}+g_{n}\right)
$$
Lo que implica que los $\varphi_{n}+\psi_{n}=\mathcal{O}\left(f_{n}\right)+\mathcal{O}\left(g_{n}\right)=\mathcal{O}\left(f_{n}+g_{n}\right)$.