Suppose x is a vector of size N with positive real elements sorted in decreasing order. Is it possible to find the analytical solution (no iterative solution) to the optimum value of M (1<= M <= N) wheatherwhether $$M log (1+\frac{M}{\sum_{i=1}^M \frac{1}{x_i}})$$$$M \log \left(1+\frac{M}{\sum_{i=1}^M \frac{1}{x_i}}\right)$$ is maximized?
using full-size parens makes for easier reading of expression.