Given $n$ positive values. $x_i \ge 1 (1\le i \le n)$. Their sum is $k$. $$ \sum_{i=1}^{n}x_i = k $$ Define the following value: $$ \sum_{i=1}^{n}x_i(x_i-1) $$

Now use Lagrange multipliers to find when this value is minimum.

Define $J = \sum_{i=1}^{n}x_i(x_i-1) + \lambda ((\sum_{i=1}^{n}x_i)-k)$. Then $\frac{\partial J}{\partial x_i}=0$ implies that $x_{i} = -\frac{(\lambda-1)}{2}$. Substituting this back into the constraint give $-\frac{\lambda -1}{2} = k/n$. Thus we have $x_i=k/n$.

  • 2
    $\begingroup$ Note that minimizing $\sum_{i=1}^{n}x_i(x_i-1) = \sum_{i=1}^{n}x_i^2 - \sum_{i=1}^{n}x_i = \sum_{i=1}^{n}x_i^2 - k$ is equivalent to minimizing $\sum_{i=1}^{n}x_i^2$, so obviously the answer will be the same as the answer to your earlier question. $\endgroup$ – TMM Sep 24 '11 at 15:55
  • $\begingroup$ No (number-theory) here. Cancelled the tag. $\endgroup$ – Did Sep 24 '11 at 16:38
  • $\begingroup$ Thijs, thanks again. $\endgroup$ – Jingguo Yao Sep 25 '11 at 14:39
  • $\begingroup$ Yes, your usage of the Lagrange multipliers rule is correct. $\endgroup$ – Dominique Oct 27 '11 at 19:39

Your Answer

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

Browse other questions tagged or ask your own question.