Given $L^1$ functional space $V=L^1([a,b])$ and a positive real number $B$. Let $\varphi$ and $g$ be continuous functions defined on $[a,b]$ such that $\varphi(x)\geq 0$ and $g(x)\geq 0$ for all $x\in [a,b]$. Consider the following optimization problem: $$ \min_{f \in V} \hspace{0.5cm} \left\{ \int_a^b \varphi(x) f(x)dx : \int_a^b f(x)dx=B \text{ and } 0\leq f(x)\leq g(x) \forall x\in [a,b] \right\}. $$ (this problem can be considered as a variant of Knapsack Problem with respect to functional space)
I am looking for solution or name of above problem. Any solution methods for similar problems are also welcome!