In the analysis of the Cheriton-Tarjan MST algortihm, there is a step that asks to optimize a quantity subject to a nonlinear constraint. Specifically, it's as follows:
Let $c_1, c_2, ..., c_p$ be positive real numbers. Maximize $$\sum_{i=1}^{p}{c_i}$$ subject to $$\sum_{i=1}^p{2^{c_i}} \le 2n$$
The claim is that this sum is maximized at $p (\log_2 \frac{n}{p} + 1)$ when each $c_i$ is $\log_2 \frac{n}{p} + 1$.
Intuitively, this makes sense, but I have no idea how I'd actually go about proving this. How might I approach proving this?
Thanks!