Constrained Optimisation and Lagrange Multipliers
Module 3 optimised with the variables free to take any value. Real problems are rarely so generous: a budget is fixed, a length of fencing is given, a probability must sum to one.
Method 1 — elimination
Use the constraint to remove a variable, then optimise what is left with ordinary single-variable calculus.
Minimise subject to .
From the constraint, . Substitute:
Now a one-variable problem:
Second derivative is , so it is a minimum.
When it works: when the constraint can be rearranged cleanly. Often it cannot — try eliminating a variable from and the square roots make a mess.
Method 2 — Lagrange multipliers
Build one function combining objective and constraint:
Set all three partial derivatives to zero:
The third simply returns the constraint, so nothing is lost. The first two are equivalent to
What that condition means
At a constrained optimum the two gradients are parallel.
Picture the contours of and the curve . Walking along the constraint curve, you cross contours of and its value changes. You can keep improving until the constraint curve is tangent to a contour of — at that point moving either way along the constraint no longer improves anything.
Tangent curves have parallel normals. The gradient is normal to its own level curve, so and point the same way, differing only by the scale factor .
That is the entire geometric content of the method, and stating it earns marks that reciting the recipe does not.
The same problem by Lagrange
The first two give . With that forces , and .
Identical to elimination, as it must be. Two correct methods on one problem cannot disagree, which makes each a check on the other.
What means
The multiplier is not a bookkeeping device to be discarded. It measures the sensitivity of the optimum to the constraint: relax the constraint by one unit and the optimal value changes by approximately .
In economics this is the shadow price — what one more unit of a scarce resource is worth. Here : raising the constraint from to would change the minimum by roughly 1. (Exactly: the new minimum is , an increase of — approximate because is a derivative, accurate for small changes.)
Choosing a method
| Elimination | Lagrange | |
|---|---|---|
| Constraint easy to rearrange | Simpler | Works, more steps |
| Constraint implicit or messy | Often impossible | Works |
| Several constraints | Impractical | One multiplier each |
| Gives sensitivity information | No | Yes, via |