Optimize monotonic function in calculus of variations I'm interested in the variational problem 
$$\min_{y} \int_a^b F(x,y(x),y'(x))dx \qquad \text{subject to} \quad -y'(x)\leq 0 \quad \forall x    \tag{1}$$     
i.e. $y(x)$ has to be monotonic.
I already know how to solve the unconstrained problem using the Euler-Lagrange equation and I have a vague idea of solving non-variational inequality-constrained optimization problems (Lagrange multipliers, Karush-Kuhn-Tucker conditions), but how should I go about solving an inequality-constrained variational problem?
Maybe use the Euler-Lagrange equations on the following:
$$\int_a^b F(x,y(x),y'(x)) - \lambda(x) y'(x) dx$$
and then check if $\lambda(x)$ is negative anywhere, but then how do I proceed?
 A: Yes, you can use the Euler-Lagrange equations on the functional that you have written. You can then look for a pair of functions (y,λ(x)) such that y solves the Euler-Lagrange equations for the given λ(x) and at each point x one of the following is true: −y′(x)<0 and λ(x)=0 or −y′(x)=0 and λ(x)$\geq$0
Here is some intuition: If λ(x) is positive then this "creates an incentive to make y′ large at the point x". We search for a function λ(x) that creates "just enough incentives to make y small so as to achieve that the constraint −y′(x)≤0∀x is satisfied by the optimum to the problem P obtained by incorporating the −λ(x)y′(x) in the way you did and then forgetting about the constraint −y′(x)≤0∀x". In other words: we want that the solution y(x) to the problem P is such that for each x either −y′(x)<0 and λ(x)=0 (no incentive is introduced at that point x and constraint is still satisfied) or −y′(x)=0 and λ(x)$\geq$0 (an incentive is introduced just enough so that the constraint is satisfied). We would never want −y′(x)<0 and λ(x)>0 since this would mean that incentives have been introduced beyond what is necessary to have the constraint respected or λ(x)<0 since this would mean that incentives have been introduced in the wrong direction.
Suppose we have found such a function λ(x) such that the modified problem P has a soluction y satisfying the constraint −y′(x)≤0∀x. Then any other function y* will either have a higher ∫F(x,y*(x),y*′(x))dx or a higher ∫-λ(x)y*′(x)dx. Let us look at the second case, i.e. ∫-λ(x)y*′(x)dx>∫-λ(x)y′(x)dx, meaning that ∫λ(x)(-y*′(x)+y(x))dx>0 so that since λ(x) is nonnegative for some x where λ(x)>0 we have -y*′(x)+y(x)>0. But by assumption λ(x)>0 implies y(x)=0, so we obtain -y*′(x)>0, establishing that y*(x) does not satisfy the constraint.
