The number K is fixed. By Big O notation, for each i there are constants Ci>0 and Ni such that fi(n)≤Cig(n) when n≥Ni. Take N=maxiNi. For n≥N, positivity gives
The constants in parentheses are independent of n, proving h=O(g),l=O(g2). If K=1, the secondsum is empty and l=0, which satisfies the same upper bound.