Free and Constrained Optimization
Interior extrema need . Classify with : with is a MIN, with a MAX, and a SADDLE — the genuinely new 2-variable phenomenon, downhill one way and uphill another.
Why these conditions: at an interior extremum every slice through the point has a horizontal tangent, so both partials vanish. Near such a point is governed by its quadratic part . means this quadratic keeps one sign in every direction — a bowl or a dome, and the sign of says which — while means it takes both signs. The test can overrule the slices you happen to look at: curves upward along both axes, yet , and . The origin is a saddle, and along the line , curves down.
To optimize subject to , solve : at the best point the level curve of is TANGENT to the constraint, so the gradients are parallel. Maximizing on gives — AM–GM, rediscovered by calculus.
Why tangency: at the best point, moving along the constraint cannot change to first order, so the constraint curve runs along a level curve of there. Two curves that touch have parallel normals, and the normals are and . For on : and , so , and the constraint gives , . The maximum is , and the level curve touches the line at .
Maximize on : Lagrange forces , giving and the maximum . In general on a radius- circle peaks at — Cauchy–Schwarz with a geometric proof.
Why : and , so parallel gradients mean is a multiple of . On the circle the only multiples are ; the plus sign gives the maximum and the minus sign the minimum . The general bound is here .
Prices in economics, shapes of soap films, maximum-likelihood estimates in statistics, minimum-energy configurations in chemistry — all sit where a gradient vanishes, usually subject to constraints. Lagrange multipliers even carry meaning: is the "shadow price," how much the optimum improves per unit of loosened constraint.
A rectangular field lies along a straight river, so only three sides need fencing: two sides of length and one of length , with metres of fence. What is the largest area ?
Show the answerHide the answer
Substitute the constraint: , so gives , then and the area is m. Lagrange gives the same point without substituting: reads and , so , and gives . The side along the river's far edge gets half of the fence and the two ends share the other half.
Absolute Extrema on a Closed Region
A continuous on a closed, bounded region attains an absolute maximum and minimum. They occur either at critical points inside the region or on its boundary. So: (1) find the interior critical points; (2) find the extremes of along each piece of the boundary (a one-variable problem, or Lagrange); (3) include the corners; (4) compare all the candidate values.
Why the boundary needs its own search: at an edge point, may still be increasing toward the outside, where the region does not allow you to go, so the gradient does not have to vanish there. The interior test cannot see such points. Both conditions on the region matter: on the open disk , gets arbitrarily close to but never reaches a maximum.
Find the absolute extremes of on the disk . Inside, and vanish only at , where . On the boundary circle , so there with .
On the edge, is largest at , giving at , and smallest at , giving at . Comparing the candidates , , : the absolute minimum is at and the absolute maximum is at . A geometric check: is the squared distance from , minus . The disk's nearest point to is itself, and its farthest is , at distance : .
Find the absolute extremes of on the rectangle , . Inside, and give , with . Along the edges: on , runs from to ; on , runs from to ; on , is smallest at (value ), and equals at and at .
The candidate values are inside and on the edges. The maximum, , occurs at the two corners ; the minimum, , at . Notice that the maximum is at points where no derivative of any kind vanishes: along the edge , is still increasing when it hits the corner. Without the corners, the maximum would be missed.
Stopping at the interior. In the disk example, only at . Someone who stops there reports the minimum and no maximum at all, but the maximum sits on the boundary at , where . The gradient points out of the disk there: would keep growing if the region let it.
Find the absolute extremes of on the rectangle , .
Show the answerHide the answer
Inside, and vanish at , where . Completing the square, is the squared distance from minus , so the maximum is at the points of the rectangle farthest from : the corners , at squared distance , giving . The edges confirm it: on , reaches at ; on , stays between and ; on , stays between and . Maximum at , minimum at .
Lagrange Multipliers in Practice
To extremize subject to , solve together with — for two variables, three equations in , , . Evaluate at every solution; when the constraint set is closed and bounded, the largest and smallest of these values are the constrained maximum and minimum. The multiplier has a meaning: if is the optimal value, then .
Why is a rate: at the optimum, . Raise the constraint level by and the optimal point moves by a small step that keeps it on the new constraint, so . The optimal value then changes by . Economists call the shadow price of the constraint: what one more unit of budget is worth.
Minimize subject to . The Lagrange condition says the point is a multiple of the normal: .
Put this into the constraint: , so and the point is , with . Check with the distance formula: the plane is from the origin, and . Check the meaning of : for the constraint the minimum is , whose derivative at is .
Find the extremes of on the ellipse . The condition gives and .
Substitute one equation into the other: . If then , which is not on the ellipse, so and . For , , and the constraint gives , : the points and , where . For , : the points and , where . The maximum is and the minimum . At , and .
Dividing by a variable that might be zero. Extremize on : the equations are and . Dividing the first by gives ; then forces , so and , and the search seems finished. But was never ruled out: then , and , which is the maximum. Write and follow both cases instead of dividing.
Find the maximum of on the sphere .
Show the answerHide the answer
The condition gives (here , since the left side is not zero). The constraint becomes , so . The point gives and gives , so the maximum is , with . Cauchy–Schwarz confirms it: .
Proofs & Why It Matters
Near a critical point, Taylor gives — a quadratic form . Complete the square: with .
If both terms share the sign of (a definite bowl: min or max); if the two terms disagree, so takes both signs — a saddle.
Let be any curve inside the constraint surface through the extremum at . Then has an extremum at , so .
Thus is orthogonal to EVERY tangent direction of the constraint — but the vectors orthogonal to that whole tangent plane are exactly the multiples of . Hence .
Going Deeper: Explanations & Worked Problems
At an interior maximum or minimum, every slice through the point is a one-variable function with an extremum there, so every directional derivative vanishes — hence .
But the converse fails in a way one variable never shows: at a SADDLE, the surface rises along one line and falls along another, with all the same ( at the origin is the model: uphill along the -axis, downhill along the -axis). That is why the -test exists: near a critical point, is governed by its quadratic part , and decides whether that quadratic keeps one sign (a genuine bowl or dome) or changes sign (a saddle). And remember the boundary: on a closed region, extrema can sit on the edge with — that is precisely the situation Lagrange multipliers handle.
Step 1 — set the gradient to zero: gives ; gives . Critical points: and .
Step 2 — second partials: , , , so .
Step 3 — test : and — both slice curvatures upward: a LOCAL MIN, value .
Step 4 — test : — a SADDLE, no extremum, even though the gradient vanishes.
Step 5 — global view: as , drags , so the local min at is NOT global — a reminder that the -test speaks only about a neighborhood.
Step 1 — set up : , , so , giving and .
Step 2 — eliminate : divide the equations: , so .
Step 3 — enforce the constraint: gives , , hence the candidates and .
Step 4 — evaluate at each: and . The constraint circle is closed and bounded, so these are the global max and min: maximum .
Step 5 — see it geometrically: the level lines are parallel lines sliding outward as grows; the largest still touching the circle touches it TANGENTLY, at the point where the radius is parallel to — which is exactly what Step 1 said.