I encounter an optimization problem like this:
$\min_{w(x)}{\int {w(x)f(x|e)dx}}$ subject to $\int {v(w(x))f(x|e)dx} - g(e)=u$
$w(x)$ is a function and suppose it has desirable differentiability. $f(x|e)$ is the density function of x conditional on a variable $e$.
The book I have says that the first-order condition is $-f(x|e)+\lambda v'(w(x))f(x|e)=0$. I understand that this is analogous to the Lagrangian multiplier, but I am wondering what is the mathematical foundation of this? Is there a rigorous theory for this kind of optimization problem?