# How to solve an optimization problem with a sum constraint?

I am currently working on an optimization problem that can be mathematically represented as:

\begin{aligned} \min_{\{f_{k}\}} & \sum_{k=1}^{K} \frac{q_{k}}{f_{k}} \\ \text{s.t.} & \sum_{k=1}^{K} f_{k} = F \end{aligned} In this formulation, $$\{f_{k}\}$$ are positive decision variables that I need to optimize, $$\{q_{k}\}$$ are known positive constants, $$F$$ is a positive integer, and $$K$$ is the number of variables.

I am looking for guidance on how to approach solving this optimization problem. Specifically, I would like to know:

What type of optimization problem is this, and what methods can be used to solve it? Are there any analytical solutions available for this type of problem? How can I handle the sum constraint effectively in the optimization process? Any insights, suggestions, or references to relevant literature would be greatly appreciated. Thank you in advance for your help!

I'm assuming that the $$f_k$$ are positive. This can be done in an elementary way using the Cauchy-Schwarz inequality, which gives
$$\left( \sum \frac{q_k}{f_k} \right) \left( \sum f_k \right) \ge \left( \sum \sqrt{q_k} \right)^2.$$
This gives that the minimum is $$\boxed{ \frac{(\sum \sqrt{q_k})^2}{F} }$$ and occurs (using the known equality case of Cauchy-Schwarz) exactly when $$\frac{q_k}{f_k}$$ is proportional to $$f_k$$, or equivalently when $$q_k$$ is proportional to $$f_k^2$$, which gives $$f_k = c \sqrt{q_k}$$ for some suitable constant $$c$$ (which we can compute is $$\frac{F}{\sum \sqrt{q_k}}$$).