Suppose $\displaystyle f_1(x) \sim g_1(x)$ and $\displaystyle f_2(x) \sim g_2(x)$ as $\displaystyle x \rightarrow \infty$ for some functions $\displaystyle f_1,f_2,g_1,g_2$. Then I know that $\displaystyle f_1(x) + f_2(x) \sim g_1(x) + g_2(x)$ as $\displaystyle x \rightarrow \infty$, and that more generally we have $\displaystyle \sum_{i=1}^k f_i(x) \sim \sum_{i=1}^k g_i(x)$ as $\displaystyle x \rightarrow \infty$ for any fixed $\displaystyle k \in \mathbb{N}$ if each $\displaystyle f_i(x) \sim g_i(x)$.

But what if $\displaystyle k$ is not fixed, and actually depends on $\displaystyle x$? For example, is it true that $\displaystyle \sum_{0 \leq k \leq x} f_i(x) \sim \sum_{0 \leq k \leq x} g_i(x)$?