What is the big-$O$ notation of a summation of logs where the arguments add to $n$?

For: $$\sum^{k}_{i=1} \log(x_i)$$ where: $$\sum^{k}_{i=1} x_i = n$$ Is there any big-$$O$$ result in terms of $$n$$ ?

I found this, but is not what I'm looking for.

It is easy to show that $$\prod_{i = 1}^{n}x_i$$ is maximized when all $$x_i$$'s are equal, i.e., $$x_i = n/k$$ for every $$i \in \{1,\dotsc,k\}$$.
Therefore, $$\sum_{i = 1}^{k} \log x_i = \log \left( \prod_{i = 1}^{k} x_i \right) \leq \log \left( \prod_{i = 1}^{k} \frac{n}{k} \right) = k \log (n/k) \leq n = O(n)$$
Thanks to @JohnL. for pointing out that $$k\log_{e}(n/k) \leq n$$.
• Yes, since $k\log(n/k)\le \frac ne$, for $n\ge e$. Nov 25 '21 at 18:41
• @JohnL. Thanks! Can we also say that $k \log (n/k) \leq n$ for any value of $n$? I think so. Nov 25 '21 at 18:51
• Of course, since $\log(n/k)\lt0$ if $n\lt e$. (The base for $\log$ here and above is $e$). Nov 25 '21 at 18:55
• @DaniMesejo Take a look at Jensen's inequality. If you want to prove it from scratch take two factors $a$ and $b$ such that $a<b$ and compare the product $a \cdot b$ with the product $(a+\varepsilon) \cdot (b-\varepsilon)$ for some sufficiently small $\varepsilon > 0$ (notice that the sum of the factors stays the same). Nov 25 '21 at 20:22