8

Find the minimum value, in terms of $k$ of $\frac{1}{x_1}+…+\frac{1}{x_n}$ if $x_1^2+x_2^2+…+x_n^2=n$ and $x_1+x_2+…+x_n=k$, where $\sqrt{n} < k \leq n$.

I tried the am-hm, but how to relate with the sum of squares?

  • 3
    If I didn't make any mistake, $$\sum_{i=1}^n \frac{1}{x_i} \ge \frac{n^2}{k}\left[1 + \frac{\nu^2}{1-\nu^2+\lambda \nu}\right] \quad\text{ where }\quad \begin{cases} \nu &= \sqrt{1-\frac{k^2}{n^2}},\ \lambda &= \sqrt{n-1}-\frac{1}{\sqrt{n-1}} \end{cases} $$ The minimum is achieved when one and only one of $x_i$ equal to $\frac{k}{n} + \nu\sqrt{n-1}$ and the remaining $x_i$ equal to $\frac{k}{n} - \frac{\nu}{\sqrt{n-1}}$. – achille hui Dec 29 '14 at 20:06
  • 1
    @mvw It reproduce your formula for $n=2$. The equation we get from Lagrange multipliers tell us all $x_i$ are roots of an equation of the form $$\frac{1}{x^2} = A - Bx \quad\iff\quad (A-Bx)x^2 = 1$$ Since RHS is a cubic equation, it has at most 3 real roots. Since the coefficient for the $x$ term is zero, we cannot have 3 positive real roots. This means the list of $x_i$ takes at most 2 values. – achille hui Dec 29 '14 at 21:09
  • 1
    @mvw I've tried solving the cubic equation too but that is hopeless. At the end, I treat the number of $x_i$ equal to the larger of the root as a parameter and deduce the two roots we need from the two original constraint. What's remain is to figure out how many $x_i$ I should assign to the larger root to minimize the target sum of reciprocals. – achille hui Dec 29 '14 at 21:24
  • @TheMathTroll Can you give some background info where this showed up? – mvw Dec 30 '14 at 16:15
  • that's original –  Dec 30 '14 at 18:50

3 Answers3

10

Given that $\sum\limits_{j=1}^nx_j^2=n$ and $\sum\limits_{j=1}^nx_j=k$ we want to minimize $\sum\limits_{j=1}^n\dfrac1{x_j}$.

That is, we need to find $x_j$ so that for all $\delta x_j$ where $\sum\limits_{j=1}^nx_j\,\delta x_j=0$ and $\sum\limits_{j=1}^n\delta x_j=0$, we also have $\sum\limits_{j=1}^n\dfrac{\delta x_j}{x_j^2}=0$.

Orthogonality implies that there exist $a$ and $b$ so that for all $j$, $ax_j+b=x_j^{-2}$. Thus, $$ ax_j^3+bx_j^2-1=0\tag{1} $$ This implies there are only $3$ distinct values for $x_j$, say $v_1$, $v_2$, and $v_3$.

The equations $\sum\limits_{j=1}^nx_j^2=n$ and $\sum\limits_{j=1}^nx_j=k$ imply that $$ \begin{bmatrix} v_1^2&v_2^2&v_3^2\\ v_1&v_2&v_3\\ 1&1&1 \end{bmatrix} \begin{bmatrix} m_1\\m_2\\m_3 \end{bmatrix} = \begin{bmatrix} n\\k\\n \end{bmatrix}\tag{2} $$ where $m_1$, $m_2$, and $m_3$ are the counts of each value.

Since the coefficient of $x_j$ in $(1)$ is $0$ (and the constant term is not $0$), Vieta's Formulas say that $$ \frac1{v_1}+\frac1{v_2}+\frac1{v_3}=0\tag{3} $$ This means that, for an interior critical point, one of the $v_j$ must be negative. Thus, the critical point must be on an edge. Let's consider the edge where $m_3=0$. In that case, we have $$ \begin{bmatrix} v_1^2&v_2^2\\ v_1&v_2\\ 1&1 \end{bmatrix} \begin{bmatrix} m_1\\m_2 \end{bmatrix} = \begin{bmatrix} n\\k\\n \end{bmatrix}\tag{4} $$ Let $m_1=m$, then the bottom equation implies $m_2=n-m$.

Let $v_1=v$, then the middle equation implies $v_2=\frac{k-mv}{n-m}$.

The top equation implies $$ \begin{align} &mv^2+(n-m)\left(\frac{k-mv}{n-m}\right)^2=n\\ &\implies mnv^2-2kmv+(mn+k^2-n^2)=0\tag{5} \end{align} $$ We can solve $(5)$ for $v$: $$ v=\frac{km\pm\sqrt{m(n-m)(n^2-k^2)}}{mn}\tag{6} $$ Using $(6)$, we get $$ \begin{align} &\frac mv+\frac{(n-m)^2}{k-mv}\\ &=\frac{nm^2}{km\pm\sqrt{m(n-m)(n^2-k^2)}}+\frac{n(n-m)^2}{k(n-m)\mp\sqrt{m(n-m)(n^2-k^2)}}\tag{7} \end{align} $$ Note that $(7)$ gives the same result if we use the upper choice of $\pm$ and $\mp$ as when we use the lower choice and substitute $m\mapsto n-m$. Thus, we can choose the $+$ in each $\pm$ and the $-$ in each $\mp$.

Taking the derivative of $(7)$ yields $$ \frac{n^4(n^2-k^2)\sqrt{m(n-m)(n^2-k^2)}}{2\left(km+\sqrt{m(n-m)(n^2-k^2)}\right)^2\left(k(n-m)-\sqrt{m(n-m)(n^2-k^2)}\right)^2}\tag{8} $$ Since $(8)$ is always positive, $(7)$ must be increasing. Thus, there is no internal critical point, so the critical point must be an edge. Because of a division by $0$, the "solution" for $m=0$, which is $x_j=\frac kn$, fails to satisfy $(4)$. Thus, we choose the closest we can, which is $m=1$. This gives the minimum to be $$ \frac{n(n-1)}{k-\sqrt{\frac{n^2-k^2}{n-1}}}+\frac{n}{k+\sqrt{(n-1)(n^2-k^2)}}\tag{9} $$ attained with $x_1=\dfrac kn+\sqrt{(n-1)\left(1-\frac{k^2}{n^2}\right)}$ and $x_j=\dfrac kn-\sqrt{\frac1{n-1}\left(1-\frac{k^2}{n^2}\right)}$ for $2\le j\le n$.

robjohn
  • 345,667
  • 1
    We are looking for the minimum of a smooth function over a sphere: I think that in order to find the value of the actual minimum, Lagrange multipliers are the way to go. Just my opinion, obviously. – Jack D'Aurizio Dec 28 '14 at 18:50
  • This bound can be improved using $\sum x_i \sum \frac{1}{x_j} \geq n^2$ to $\sum \frac{1}{x_j} \geq \frac{n^2}{k} \geq \frac{k^3}{n^2}$. – Winther Dec 28 '14 at 18:50
  • 2
    A lower bound in not the minimal value – Leox Dec 28 '14 at 19:57
  • 1
    @JackD'Aurizio: I was planning to improve the answer using variational methods, but I got called away and now I only have mobile access. I will do so when I get back if no one else has. – robjohn Dec 28 '14 at 20:34
  • @Leox: I know, but I got called away before I could finish. I will get a sharp bound when I get back to my regular keyboard. – robjohn Dec 28 '14 at 20:36
  • @Winther: I have just finished the calculation, and it appears that $\frac{n^2}{k}$ is the minimum. – robjohn Dec 30 '14 at 14:28
  • Nice, but there is one problem: $x_j = \frac{k}{n}$ satisfy $\sum x_j = k$, but $\sum x_j^2 = n$ is not satisfied unless $n=k$. – Winther Dec 30 '14 at 14:45
  • @Winther: yes, I just noticed that... I have to fix this up, so I am reverting until I can get back to it. – robjohn Dec 30 '14 at 14:46
  • OK, hope you solve it, I really want to see the solution:) – Winther Dec 30 '14 at 14:48
  • 1
    @Winther: the other solution failed because $m=0$ is the limit of a sequence of solutions that don't converge. We need to take the closest solution, which is $m=1$. – robjohn Dec 30 '14 at 17:32
  • Very good, I'm glad it got solved! @mvw If $\sum \delta x$ does not vanish then we violate the $\sum x_i = k$ condition. btw this is exactly the same as one does in the 'standard' way of doing the Lagrange method, though there its hidden in the 'machinery' of the method (the constraint equations). – Winther Dec 30 '14 at 17:58
  • 1
    Or is it from $0 = \delta n = \delta\sum_i x_i^2 = 2 \sum_i x_i \delta x_i$ and $0 = \delta k = \delta\sum_i x_i = \sum_i \delta x_i$, for differential like small displacements. The last one is $0 = \delta f = \mbox{grad } f \cdot \delta x$. – mvw Dec 30 '14 at 18:00
  • (2) and the counts $m_i$ is about assigning the (up to) three solutions $v_i$ to the $n$ different variables $x_j$. – mvw Dec 30 '14 at 18:15
  • @achillehui: I just now saw your comment to the question. I'm glad we are in agreement. Was your method similar, or did you have a different approach? – robjohn Dec 30 '14 at 20:16
  • @robjohn it is similar except in the part showing $(7)$ is increasing. I do that algebraically. – achille hui Dec 30 '14 at 20:23
  • @mvw: I've added a link to Vieta's Formulas, which imply that the negative of the sum of the reciprocals of the roots of $P(x)$ is the ratio of the coefficient of $x$ divided by the coefficient of $1$. – robjohn Dec 31 '14 at 15:14
  • Found it in the example: $x_1 x_2 x_3 (1/x_1 + 1/x_2 + 1/x_3) = x_1 x_2 + x_1 x_3 + x_2 x_3 = \frac{c}{a}$ – mvw Dec 31 '14 at 15:27
  • +1. Vieta's is the turning point. Otherwise, it will be cumbersome. – Felix Marin Jan 01 '15 at 04:00
  • Strictly speaking, we don't need Vieta's formula. We can use Descartes rules of sign (or Laguerre's generalization of that) to conclude $(1)$ has at most 2 positive real roots. In fact, same argument applies to the minimization problem of $\sum_{i=1}^n \frac{1}{x_i^\alpha}$ for other $\alpha > 0$. – achille hui Jan 02 '15 at 15:05
  • @robjohn, take $n=3$ and $k=2$. From your results, $x_1 \approx 1.7208, x_2=x_3 \approx 0.1396$ give a value close to $14.9078$. However, the solution $x_1 \approx−0.01, x_2 \approx 1.70495, x_3 \approx 0.305054$ gives a value of cost function close to $−96.1354$. Actually, if $\sqrt{n}<k<n$ and $n≥3$, there is no global minimal on $\mathbb{R}^n$. See my answer bellow. – Alex Silva Jan 02 '15 at 19:29
  • @robjohn, can you explain the notation $\delta x_j$ for me, please. i do not understand. but i want to understand your solution. – SKMohammadi Oct 28 '15 at 13:57
  • @MathMan: $\delta x_j$ is an infinitesimal change in $x_j$. Think of it as $\frac{\partial x_j}{\partial t}$ for some parameterization of $x_j$ with respect to some parameter $t$. – robjohn Oct 28 '15 at 18:50
2

Checking the case $n = 2$

First condition: $$ g(x,y) = x + y = k \iff y = - x + k $$

Second condition: $$ h(x,y) = x^2 + y^2 = 2 \iff y = \pm \sqrt{2 - x^2} $$

This gives \begin{align} 2 &= x^2 + (-x + k)^2=2 x^2 -2kx + k^2 \iff \\ 1 &= x^2 - kx + k^2/2 = (x - k/2)^2 + k^2/4 \iff \\ x &= \frac{k\pm\sqrt{4-k^2}}{2} \quad \wedge \\ y &= \frac{-k\mp\sqrt{4-k^2}}{2} + k = \frac{k\mp\sqrt{4-k^2}}{2} \end{align} We got 2 points or 1 point ($k=2$) which satisfy the conditions, which agrees with an intersection of a line ($g=k$) and a circle ($h=2$). Their coordinates were expressed in terms of $k$. Inserting those points into $f$ we get: \begin{align} f(x,y) &= \frac{1}{x} + \frac{1}{y} \\ &= \frac{2}{k\pm\sqrt{4-k^2}} + \frac{2}{k\mp\sqrt{4-k^2}} \\ &= \frac{4k}{k^2 - (4 - k^2)} \\ &= \frac{2k}{k^2 - 2} \\ &= F(k) \end{align} This function is constant regarding $x$ and $y$, which includes the minimum.

(in progress)

The Lagrange function is $$ L(x,\lambda, \mu) = f(x) + \lambda \left( g(x) - k \right) + \mu \left( h(x) - n \right) $$ Gradient components are \begin{align} \frac{\partial L}{\partial x_j} &= -\frac{1}{x_j^2} + \lambda + 2 \mu x_j \quad (j\in\{1,\ldots,n\}) \\ \frac{\partial L}{\partial\lambda} &= g(x) - k \\ \frac{\partial L}{\partial\mu} &= h(x) - n \end{align} At critical points $x^*$ the above components vanish. So $$ f(x^*) = \sum_i \frac{1}{x^*_i} = \sum_i \lambda x^*_i + 2 \mu (x^*_i)^2 = \lambda k + 2 \mu n $$ The question is how to calculate $\lambda$ and $\mu$. We have $n+2$ equations with $n+2$ unknowns, so there is a chance for a unique solution $(x, \lambda, \mu)$, but so far I found no way to extract it.

mvw
  • 34,562
  • 1
    For the last part: the question (if I have understood it correctly) ask for the minimum value as a function of $k$ not to minimize over $k$. – Winther Dec 29 '14 at 00:55
  • 1
    In fact, minimizing over $k$ makes it almost trivial. If $x_i>0$ then we have $\sum x_i^{-1} \geq n^2/\sum x_i = n^2/k$ and since $x_i = 1$ is a solution attaining $\sum x_i^{-1} = n$ it follows that $k=n$ gives the smallest minimum (that is if we can assume $x_i > 0$). – Winther Dec 29 '14 at 01:10
  • @mvw: the Langrange function is... and so? – Jack D'Aurizio Dec 29 '14 at 12:29
0

The question does not constrain $x_i, i=1,\ldots,n$ under any subset of $\mathbb{R}^n$. Thus, I will solve it for $\mathbf{x} \in \mathbb{R}^n$.

Let $f_n(\mathbf{x}) = \frac{1}{x_1}+…+\frac{1}{x_n}$ be the cost function. Consider $n > 1$ because $n=1$ is meaningless (there is no $k$).

Case $n=2$:

The straight line $x_1 + x_2 = k$ intercepts the circle $x_1^2+x_2^2 = 2$ at most two points, says

$$(x_1,x_2) = \left(\frac{k}{2} \pm \frac{\sqrt{4-k^2}}{2}, \frac{k}{2} \mp \frac{\sqrt{4-k^2}}{2}\right).$$Hence, the minimal value is given by

$$ f_2(x_1^{\star},x_2^{\star}) = \frac{2k}{k^2-2}.$$

Case $n\geq 3$:

Notice that if $k=n$, the hyperplane $x_1 + x_2 + \cdots + x_n = n$ is tangent to the hypersphere $x_1^2 + x_2^2 + \cdots + x_n^2 = n$ at the point $x_1 = \cdots =x_n= 1$, which is the only solution to the problem in that case.

If $\sqrt{n} < k < n$, the hyperplane $x_1 + x_2 + \cdots + x_n = k$ intercepts the hypersphere at infinitely many points.

Now, let $x_i = \epsilon, $ for some $i \in \{1,\ldots , n\}$ and $ \epsilon < 0$. For $|\epsilon|$ small enough, there always exists $x_1, \ldots, x_{i-1},x_{i+1}, \ldots x_{n}$ finite satisfying both constraints $$\sum \limits_{j\neq i}x_j^2 =n-\epsilon^2 $$ $$ \sum \limits_{j\neq i}x_j =k-\epsilon. $$

If $\epsilon \rightarrow 0$, then $f_n(\mathbf{x}) \rightarrow -\infty$. Thus, no global minimum is reached in that case.

Conclusions:

(1) The problem has at most two global minimum only for $n=2$;

(2) The problem has a single global minimum if and only if $k = n \geq 2$. In this case, we have a hyperplane tangent to the hypersphere and $f_n(\mathbf{x}^{\star}) = n$.

Alex Silva
  • 3,557
  • 3
    There is no global minimum unless we constrain $x_j$ so that $x_j\gt0$. If we allow $x_j\lt0$, then there is no minimum. – robjohn Jan 02 '15 at 19:21