3
$\begingroup$

I am wondering what is the easiest/best way to find the values of $x_i$ that maximize the expression $\sum_{i=1}^N a_i \ln (x_i)$ under the constraints $\sum_{i=1}^Nx_i = 1$ and $ 0\leq x_i \leq 1$

Do I have to use Lagrange multipliers? Is there an easier way?

By using the Lagrange multiplier and setting the derivative of the Lagrangian $\sum_i a_i\ln x_i + \lambda(1-\sum_i x_i)$ to 0 I arrive at the following conclusion:

\begin{align} x_i=\frac{a_i}{\lambda} \forall i \in \{1, \ldots, N \} \end{align}

How would I proceed from that?

Update: solution

By enforcing $\sum_i x_i = 1$ it follows that $\sum_i \frac{a_i}{\lambda} = 1$ which leads to $\lambda = \sum_i a_i$ and $x_i = \frac{a_i}{\sum_j a_j}$

$\endgroup$
  • 1
    $\begingroup$ Lagrange multipliers is very easy for this question, so there probably isn't an easier way. $\endgroup$ – Empy2 Nov 24 '15 at 14:30
  • $\begingroup$ I am trying to solve it with the Lagrange multipliers but, being quite inexperienced, I am stuck. $\endgroup$ – fstab Nov 24 '15 at 15:39
  • $\begingroup$ Read your notes carefully, and try to apply them here. $\endgroup$ – Empy2 Nov 24 '15 at 15:40
  • $\begingroup$ I added my progress to the post. I will be very grateful if you respond with some contribution $\endgroup$ – fstab Nov 24 '15 at 15:54
  • $\begingroup$ Good. You are nearly there. You need to find $\lambda$, then you will know $x_i$. Try $\sum_{i=1}^Nx_i=1$ $\endgroup$ – Empy2 Nov 24 '15 at 15:57
0
$\begingroup$

Solution

By enforcing $\sum_i x_i = 1$ it follows that $\sum_i \frac{a_i}{\lambda} = 1$ which leads to $\lambda = \sum_i a_i$ and $x_i = \frac{a_i}{\sum_j a_j}$

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.