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$?

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...
