For a smooth incompressible direct trajectory with total velocity field and active scalar , the negative-constraint Lagrangian function in constrained optimization convention gives
The transpose term is the formal adjoint of ; the two couplings transpose scalar transport by advection and buoyancy. For terminal cost , the terminal data are , . They are integrated backward along the stored direct trajectory. No-slip boundary conditions and Dirichlet boundary conditions for the adjoint velocity and homogeneous Neumann boundary conditions for the adjoint scalar remove the spatial boundary terms.
For a vector equality constraint, take the Lagrangian function in constrained optimization
The sign of the multiplier is a convention; equality multipliers are unrestricted. The Lagrange sufficiency theorem says that if is feasible and, for some , globally minimizes over , then globally minimizes the constrained objective.
Indeed for any feasible , . Thus . The theorem requires a global Lagrangian minimum, not merely a stationary point. It needs neither differentiability nor convexity when stated in this form; those hypotheses can be used separately to establish the required minimum.
The Lagrange sufficiency theorem says that if a feasible point and nonnegative multipliers satisfy complementary slackness and globally maximizes the Lagrangian function in constrained optimization, then globally solves the constrained maximization problem. Indeed, for every feasible , the signs of the constraints give . Concavity and the Karush-Kuhn-Tucker conditions are a common way to verify the global Lagrangian maximum.
For fixed , A maximizes
subject to and . This is a concave function of . On every active coordinate, the multiplier equation is
Thus A's optimal allocation is given by the water-filling algorithm:
where is chosen so that . Coordinates with zero expression receive no resource. This is a water-filling algorithm. The formula gives the optimum when every . If , any already gives A the whole market in that region, so A assigns such coordinates arbitrarily small positive amounts and applies water filling to the remaining budget; without a convention for , the resulting value can be a supremum rather than an attained maximum.
The Lagrange sufficiency theorem for maximizing subject to and states that if a feasible point and multipliers satisfy complementary slackness and globally maximizes the Lagrangian function in constrained optimization
then globally maximizes on the feasible set.
For the equality constraint, take
The Lagrange multiplier equations give
so positivity and the constraint imply
For this multiplier, is a strictly concave function on the positive octant and its stationary point is its unique global maximum. The sufficiency theorem therefore proves that the constrained maximum is
For , use . The same point and multiplier satisfy feasibility, stationarity, , and complementary slackness, and they again globally maximize the Lagrangian. Hence the answer is unchanged. Equivalently, any point with strict inequality can be radially scaled outward, increasing all three positive coordinates and therefore increasing .
Use
Stationarity gives
Putting , this becomes
and the constraint requires
The left side is strictly increasing, and solves the equation. Hence
The objective is convex and the constraint is affine. Its tangent-plane inequality at gives, for every feasible ,
so the Lagrange point is globally optimal. Moreover, at the dual value , the infimum of the Lagrangian function in constrained optimization is attained at the same point and equals three. The primal and dual values coincide, so strong duality holds.
For the value function, the multiplier convention above gives the derivative of a constrained value function
At , therefore,
Use the sign convention
for the Lagrangian function in constrained optimization. The Lagrangian dual problem is
where is the convex conjugate. For this convex problem with affine equality constraints, the stationarity and feasibility parts of the Karush-Kuhn-Tucker conditions are
They say exactly that the displayed operator satisfies
Thus its zeros are precisely the primal-dual optimal points, subject to the usual attainment assumptions.
For and , the Euclidean inner product gives
The last two terms cancel by the defining property of the matrix transpose, and the first is nonnegative by part a. Hence is a monotone operator.