4

How to maximize this? $$ \sum\limits_{i=1}^n u_iln(x_i), $$ where $u_i,x_i$ are real numbers, $n$ is a positive integer, $0 \leq u_i \leq 1, 0 < x_i < 1, \sum\limits_{i=1}^n u_i = 1, \sum\limits_{i=1}^n x_i = 1$, and only $x_i$ are variables, others are given numbers.

Daniel
  • 569

1 Answers1

3

Hint: Use Lagrange multipliers: http://en.wikipedia.org/wiki/Lagrange_multiplier

In this case, you have to work with

$\Lambda(x_1,...,x_n,\lambda)=\sum u_i \log(x_i)-\lambda(x_1+...+x_n-1)$

and follow the method described in Wikipedia.

In fact we have

$\dfrac{\partial \Lambda}{\partial x_i}=\dfrac{u_i}{x_i}-\lambda$ for all $i$, so all the $\dfrac{u_i}{x_i}$ are equal (to $\lambda$). So the solution is to take $x_i=u_i$.

  • If there was no condition for the $u_i$, the solution would correspond to $x_i=\frac{u_i}{\sum_{i=1}^n u_i}$ – Claude Leibovici Apr 22 '15 at 08:16
  • @ClaudeLeibovici Exactly! – mathifold.org Apr 22 '15 at 08:22
  • @mathifold.org But you can't take $x_i = u_i$ if $u_i = 0$. So what's the problem using Lagrange multipliers? – Daniel Apr 22 '15 at 08:32
  • @thuzhf If $u_i=0$, the term does not longer exist, so taking $x_i=0$ should not be a problem, even when we take its logarithm. If $a=u_i=x_i$, then $\lim_{a\longrightarrow 0}a\log(a)=0$ – mathifold.org Apr 22 '15 at 08:38
  • @mathifold.org But if $u_i = 0$, how can you solve $\frac {\partial \Lambda} {\partial x_i} = \frac {u_i} {x_i} - \lambda = 0$, and finally get $x_i = u_i$? – Daniel Apr 22 '15 at 08:47
  • @thuzhf The cases in which some $u_i=0$ are somewhat degenerated, so they should not be taken into account very carefully. Instead think that the optimal combination of $x_i$ is in continuous dependence of $u_i$. They are equal when $u_i\neq 0$, so we should expect that the same remains true when some $u_i=0$. – mathifold.org Apr 22 '15 at 08:52