I am trying to solve an optimization problem of this form with Calculus of variations: $$ minimize \space J[f(t)]=\int_a^bf(t)\cdot g(t)dt $$
$$ subject \space to \int_a^bf(t)dt=K, $$ which is written as: (using Lagrange multipliers) $$ J[f(t),\lambda]=\int_a^bf(t)\cdot g(t)- \lambda \cdot (f(t)-\frac {K}{(b-a)})dt. $$ But when I use Euler-Lagrange equation, both $f(t)$s are omitted and I have only: $$ g(t)- \lambda =0 $$ I know that $g(t)$ is an increasing function and so $f(t)$ should be decreasing to minimize the integral. But I want to find the optimal answer. Can anybody help me on solving this problem?