I have a function $f$ such that is the sum of big O terms, such as
$$f=\left[\sum_{i=1}^x \frac{1}{i}\right] +O\left(\frac{\ln^4 x}{x}\right)+O\left(\frac{\ln^4 x-1}{x-1}\right)+O\left(\frac{\ln^4 x-2}{x-2}\right)+\ldots$$
where $x$ is a positive integer. Am I correct in that I can simply write
$$f=\left[\sum_{i=1}^x \frac{1}{i}\right] + O\left(\frac{\ln^4 x}{x}\right)$$
because I just need to write the bigger value for the big O, in this case being $\frac{\ln^4 x}{x}$?
Any intuitive, even informal answer would be welcome.