This is a problem I saw in a stat mech textbook, and I think it is a fairly common problem.
Given the entropy function: $$S = - \sum_{i=1}^N p_i \log p_i$$ Maximize $S$ subject to constraints:
$$ \sum_{i=1}^N p_i = 1 \\ \sum_{i=1}^N p_i e_i = c$$
It was suggested to solve this problem using Lagrange multipliers. So this is how I went about it: $$L(p,\lambda, \mu) = - \sum_{i=1}^N p_i \log p_i - (\lambda \sum_{i=1}^N p_i -1)- (\mu \sum_{i=1}^N p_i e_i - c) $$
$$\frac{\partial L}{\partial p_k} = -(\log p_i +1) - \lambda - \mu e_i = 0$$ A little arithmetic gives:
$$p_i = e^{-\lambda - \mu e_i -1}$$
Then I used the above constraints to solve for $p_i$.
$$\sum_{i=1}^N p_i = \frac{\sum e^{-\mu e_i}}{e^{\lambda+1}} = 1 \implies e^{\lambda +1} = \sum e^{-\mu e_i} $$
And
$$\sum_{i=1}^N e_i p_i = \frac{\sum_{i=1}^N e_i e^{-\mu e_i}}{e^{\lambda +1}} = c$$
Since I am not sure how to solve this final constraint and get a value for $\mu$, I said
$$p_i = \frac{e^{-\mu e_i}}{\sum_i e^{-\mu e_i}}$$
My question is, how do I solve for $\mu$?