Lagrange multiplier for quadratic cost

ID: lagrange-multiplier-for-quadratic-cost

Suppose two adjustable inputs must deliver a prescribed total , and their combined cost is the quadratic form . These are chosen, dimensionless quantities; the coefficient makes concentrating an input in more expensive. Initially allow all real numbers , with the equality optimization constraint . The optimization Lagrangian with our chosen sign is
The stationary point equations give , , and . Consequently
For , the unique global minimum is at , with cost and Lagrange multiplier . Equal allocation would cost ; assigning everything to would cost . At the optimum, the two marginal costs agree: . Moving a little input from one component to the other therefore has zero first-order effect on cost. When , this solution also meets the extra nonnegativity optimization constraints , so it remains optimal with those added.
Figure 1.
The first attainable cost ellipse touches at
. Original chosen quadratic form . Left: level sets, the equality feasible set, and the parallel gradients at the optimum. The blue arrow is so both arrows fit; it is not the full gradient of . Right: substituting makes the unique global minimum visible on the entire feasible line, not just near its stationary point. Details.
Here the Lagrange multiplier equations locate a candidate, and a short independent check certifies it. On the entire feasible set, substitute and use completing the square:
The squared term is nonnegative and vanishes only at . Thus the candidate is the unique global minimum; there is no global maximum on this unbounded feasible set, a line. This separates finding a stationary point from proving optimality. The geometric beauty is that equal marginal costs, parallel gradients, tangency of level sets, and completing the square identify the same allocation.

New to topics? Read the docs here!