Optimization and Lagrange Multipliers
Extrema of a two-variable function sit at critical points where the gradient vanishes; the Second Derivatives Test sorts them into peaks, valleys, and saddles by the sign of a discriminant. Absolute extrema on a closed region also need the boundary.
╌╌╌╌
The high and low points of a surface are the two-variable version of the maxima and minima of single-variable calculus. Finding them repeats the familiar structure (locate where the derivative vanishes, then classify), but with two new features: the derivative is now a pair of partials, and a critical point can be neither a max nor a min but a saddle, rising in one direction and falling in another.
Local extrema and critical points
At a smooth local extremum the surface must be flat, because each axis-trace has an ordinary extremum there.
The proof fixes one variable and applies single-variable Fermat to the trace. Geometrically, makes the tangent plane horizontal.
The converse fails: a critical point need not be an extremum. The standard counterexample is the saddle at the origin, where , yet rises along the -axis and falls along the -axis, so the origin is neither a peak nor a valley.
Flattened onto one plane, the two principal cross-sections give the sign pattern that the Second Derivatives Test below detects algebraically:
The Second Derivatives Test
Which kind of critical point is at hand is decided by the second partials, combined into a discriminant.
The discriminant is the determinant of the matrix of second partials (the Hessian). Its sign captures whether the surface curves the same way in every direction (, a bowl or dome) or opposite ways along different axes (, a saddle). When the sign of then says which.
| Point | Conclusion | ||
|---|---|---|---|
| — | saddle point | ||
| local minimum, value | |||
| local minimum, value |
Absolute extrema on a closed region
The single-variable Extreme Value Theorem guarantees a max and a min on a closed interval, found among the critical numbers and the two endpoints. The plane version replaces the interval by a closed, bounded region and the endpoints by the boundary curve.
An extreme value sits either at an interior critical point or on the boundary, so the search is a three-step procedure.
- 1find every critical point of in the interior of , and list there
- 2parametrize each boundary piece, reducing to one variable
- 3find that reduced function's extrema, including the corner endpoints
- 4compare all listed values
- 5the largest is the absolute maximum; the smallest is the absolute minimum
The boundary step turns each edge into a single-variable optimization: substitute the edge's parametrization into , differentiate in the one remaining parameter, and include the corners where edges meet. The absolute extrema are then the largest and smallest of every candidate collected.
Constrained optimization
Boundary optimization is a special case of a broader problem: extremize not over a region but along a curve . Substitution works when the constraint solves cleanly for one variable; when it does not, Lagrange's method does the job without solving the constraint at all.
The reasoning is geometric. To maximize along is to find the largest value for which the level curve still meets the constraint curve . At that extreme value the two curves cannot cross — a crossing would let increase further — so they are tangent, sharing a tangent line. Tangent curves have parallel normals, and the normal to a level curve is its gradient. Therefore and are parallel at the optimum.
In components the vector equation is , , , giving one equation per variable plus the constraint — as many equations as unknowns.
Two constraints
A point can be pinned to the intersection of two surfaces and , which is generally a curve. At an extremum along that curve, lies in the plane spanned by and (both normal to the curve), so
There are now two multipliers, and , and five equations in the five unknowns . The same logic extends the method to any number of constraints, one multiplier apiece.
The stationarity condition appears across constrained optimization, from utility maximization in economics to regularized training objectives. Extrema over regions rather than curves return with integration, in double integrals.
╌╌ END ╌╌