optimization of coefficients with constant sum of inverses Does anybody knows if there is an easy solution to the following problem:
Given $A = [a_1, a_2, ... a_n]$ and K, find B = $[b_1, b_2,...b_n]$ that minimizes $AB^T$ such that $\sum_{i}^{n}\frac{1}{b_i} = K$?
 A: As copper.hat suggests: Lagrange multipliers!
We want to minimize $f(B) = AB^T$ subject to the constraint $g(B) = \sum_{i}^{n}\frac{1}{b_i} = K$.  We can find all critical points by solving the system
$$
\nabla f = -\lambda \nabla g\\
g(B) = K
$$
Where
$$
\nabla f = A = [a_1,\dots,a_n]\\
\nabla g = -\left[\frac{1}{b_1^2}, \dots, \frac{1}{b_n^2}\right]
$$
So, we have the system of equations
$$
a_1 = \frac{\lambda}{b_1^2}\\
\vdots\\
a_n = \frac{\lambda}{b_n^2}\\
\frac{1}{b_1} + \cdots + \frac{1}{b_n} = K
$$
Solving the first $n$ lines for $\lambda$ yields
$$
\lambda = a_1 b_1^2 = \cdots = a_n b_n^2
$$
So that the sign of $\lambda$ must match the sign of $a_i$ for each $i$.  Assume, without loss of generality then, that all $a_i > 0$ (if any $a_i$ have signs that don't match, then there can be no critical points).
$$
b_i = 
\pm\sqrt{\lambda/a_i}
$$
So, plugging into $g(B) = K$, we have
$$
\frac{\pm\sqrt{a_1} \pm \cdots \pm \sqrt{a_n}}{\sqrt{\lambda}} = K \implies\\
\lambda = \frac{(\pm\sqrt{a_1} \pm \cdots \pm \sqrt{a_n})^2}{K^2}
$$
That is, we have $2^n$ possibilities to check for $\lambda$.  It suffices to take each of these $\lambda$, compute $b_i = \pm\sqrt{\lambda/a_i}$, compute $AB^T$ for each such choice, and select the vector $B$ that produced the minimal $AB^T$.
This process could probably be shortened with a second derivative test.  I'll think about that...
A: When $A\ne0$ and $n\ge2$, no minimum exists, because $AB^T$ is unbounded below. More specifically, suppose $a_1\ne0$. Let $b_1=-ca_1$ and $b_2=b_3=\ldots=b_n=(n-1)/(K+\frac1{ca_1})$ for some nonnegative $c$ that is greater than some large positive number (so that $K+\frac1{ca_1}\ne0$). Then $\sum_i\frac1b_i=K$ and $b_2,\ldots,b_n$ are bounded. Hence $AB^T$ is equal to $-c|a_1|^2$ plus a bounded quantity, and it approaches $-\infty$ when $c\to+\infty$.
A: It turns out that if $a\neq 0$ and $n>1$, there is no solution to the problem in that it can have arbitrarily small values.
If $n=1$ the answer is given by the constraint so there is nothing to be done, so suppose $n>1$.
If $a=0$, any $b$ will do, so suppose $a \neq 0$.
So, suppose $a_1 \neq 0$. Then choose $x_2=\cdots = x_{n-1} = \beta$ such that
$K'=K-(n-1)\beta \neq 0$. Then an upper bound for the problem is
$\inf_{{1 \over x_1} + {1 \over x_n} = K'} (a_1 x_1+a_n x_n  )$.
Now choose $x_n = {1 \over K' - {1 \over x_1}} $ to get the upper bound
$\inf_{x \neq {1 \over K'} } (a_1 x + a_n {1 \over K' - {1 \over x}} )$. Now let $x \to (-\operatorname{sgn} a_1) \infty$, and notice that the problem is unbounded below.
A: If we assume all $a_i>0$ and all $b_i>0$, then there is the following nice application of the AM/HM inequality:
\begin{align*}
\sum_i a_i b_i
&= \Bigg(\sum_j \sqrt{a_j}\Bigg) \left(\sum_i \frac{\sqrt{a_i}}{\sum_j \sqrt{a_j}} \cdot \sqrt{a_i} b_i \right) \\
&\ge \Bigg(\sum_j \sqrt{a_j}\Bigg) \left/ \left(\sum_i \frac{\sqrt{a_i}}{\sum_j \sqrt{a_j}} \cdot \frac1{\sqrt{a_i} b_i} \right) \right. \\
&= \frac1K \Bigg(\sum_j \sqrt{a_j}\Bigg)^2
\end{align*}
with equality when all $\sqrt{a_i} b_i$ are equal, that is, when
$$ \frac1{b_i} = \frac{K\sqrt{a_i}}{\sum_j \sqrt{a_j}} $$
for each $i$.
