Disclaimer: this question has been previously posted on Math StackExchange. I reposted it here since I did not receive any satisfactory answer there and a user suggested to re-post it here.
Let $x\in\mathbb{R}^n$ be an optimization variable and $\alpha\in\mathbb{R}^n$ be a given $n$-dimensional vector. The standard water-filling problem is formulated as
\begin{equation} \begin{array}{ll} \underset{x}{\operatorname{minimize}} & -\displaystyle\sum_{i=1}^{n} \log \left(\alpha_{i}+x_{i}\right) \\ \text { subject to } & x \succeq 0, \quad \mathbf{1}^{T} x=1, \end{array} \end{equation}
and it has a well-known solution (see Boyd & Vandenberghe page 245).
I was thinking about the case in which we have continuous communication channel slots. Intuitively this may be thought of as the case when the sizes of the communication channels approach zero. How is it possible to generalize this optimization problem to this case?
I believe that $\alpha$ and $x$, which from now on we will denote by $\alpha(x)$ and $f(x)$ respectively, would in this case be continuous real function and the problem would be:
\begin{equation} \begin{array}{ll} \underset{f \in \mathcal{F}}{\operatorname{minimize}} & -\displaystyle\int_{x} \log \left(\alpha(x)+f(x)\right)dx \\ \text { subject to } & f(x) \geq 0\; \forall x, \quad \int_x f(x)dx=1 \end{array} \end{equation}
where $\mathcal{F}$ is a given class of functions (e.g. Hölder continuous, Lipschitz, etc). We can also assume that the domain of the functions $f(x)$ and $\alpha(x)$ is compact, i.e. $x\in\mathcal{X}\subseteq \mathbb{R}$, with $\mathcal{X}$ a compact subspace of $\mathbb{R}$.
Am I following the right path?
Do you have any idea on how to solve these types of problems? It looks it is related to the calculus of variations, but I have never seen these types of problems and I have no idea how to solve them.