constrained optimization in calculus of variations Consider the problem
\begin{align*}
\max_{X\in\mathcal{F}} \int_{0}^1 X(t) \phi(t)dt \\
\int_{0}^1 X(t) \psi(t) dt= 0
\end{align*}
where $\mathcal{F}$ is a  "well-behaving" set of functions. (In my application, $\mathcal{F}$ is defined as the set of CDFs  that are second-order stochastically dominated by some given CDF $F_0$.) I am looking for a formal reference/argument that relates this problem to the one obtained from writing the Lagrangian
$$\max_{X\in\mathcal{F}} \int_{0}^1 X(t) (\phi(t)-\lambda \psi(t))dt, $$
and in particular,  formally showing that the optimal solution in the first problem corresponds to a local maxima of the second problem. Any ideas/references would be helpful!
 A: The argument is really not any different from optimizing over $\mathbb R^n$. I will prove that the statement you want holds assuming a form of Slater's condition: $\mathcal F$ is convex, and $0$ is an interior point of $\left\{\int_{0}^1 X(t) \psi(t) dt : X \in \mathcal F\right\}$.
For convenience, let
\begin{align}
f(X) &= \int_{0}^1 X(t) \phi(t)dt \\
g(X) &= \int_{0}^1 X(t) \psi(t) dt \\
h(\lambda) &= \sup_{X \in \mathcal F} \Big\{f(X) - \lambda g(X)\Big\}
\end{align}
Let $M(z)$ be the maximum value (or maybe the supremum) of $f(X)$ over all $X \in \mathcal F$ such that $g(X) =z$. Its domain is the set $\{g(X) : X \in \mathcal F\}$. We allow $M(z) = +\infty$ when things work out that way; nothing special happens in this case. We have $M(0) = f(X^*)$, where $X^*$ is the optimal solution to our problem.
Assuming $\mathcal F$ is a convex domain, $M$ is a concave function of $z$. To see this, first suppose for simplicity that $M(z_1) = f(X_1)$ and $M(z_2) = f(X_2)$ with $g(X_i) = z_i$. Then for any $t \in [0,1]$, if $z = tz_1 + (1-t)z_2$, let $X = tX_1 + (1-t)X_2$; we get $g(X) = z$, so
$$
 M(z) \ge f(X) = t f(X_1) + (1-t) f(X_2) = t M(z_1) + (1-t) M(z_2)
$$
proving that $M$ is concave. When $M(z_i)$ can be approached by not reached by any $X$ with $g(X) = z_i$, we consider a sequence of $X$'s approaching it and the same thing falls out eventually.
By concavity of $M$, there is a slope $\lambda^*$ such that $M(z) \le M(0) + \lambda^* z = f(X^*) + \lambda^* z$... assuming $0$ is an interior point of the domain of $M$. To see that this condition is necessary, imagine a case where $M(z) = \sqrt{z}$; then the tangent line at $0$ is vertical. We can set $\lambda^* = M'(0)$ when that derivative exists; if $0$ is a corner point of $M$, there are many valid choices of $\lambda^*$.
For any $X \in \mathcal F$, we have $M(g(X)) \ge f(X)$, because $X$ is feasible for the optimization problem defining $M(g(X))$. Therefore $f(X) \le f(X^*) + \lambda^* g(X)$, or $f(X^*) \ge f(X) - \lambda^* g(X)$.
Since $g(X^*) = 0$, we have $f(X^*) - \lambda^* g(X^*) \ge f(X) - \lambda^* g(X)$. In other words:

*

*$f(X) - \lambda^* g(X)$ is maximized at $X^*$.

*$f(X^*) = h(\lambda^*)$, and it is easy to see that for all $x \in \mathcal F$ satisfying $g(X) = 0$ and for all $\lambda \in \mathbb R$, $f(X) \le h(\lambda)$. Therefore strong duality holds between the original problem and the problem of minimizing $h(\lambda)$ over $\lambda \in \mathbb R$, and $\lambda^*$ is the optimal dual solution.

