Get AI summaries of any video or article — Sign up free
Multivariable Calculus 28 | Extreme Values With Constraints thumbnail

Multivariable Calculus 28 | Extreme Values With Constraints

4 min read

Based on The Bright Side of Mathematics's video on YouTube. If you like this content, support the original creators by watching, liking and subscribing to their content.

TL;DR

Unconstrained local extrema for C1 functions on open sets require ∇f=0, but this does not apply on constrained sets like curves.

Briefing

Local maxima and minima of multivariable functions usually come from where the gradient vanishes. That rule breaks down once the search is restricted to a constraint set—like a curve on a surface—because the function can still have nonzero gradient everywhere along the allowed points. The key fix is the method of Lagrange multipliers: at a constrained local extremum, the gradient of the objective function must align with the gradient of the constraint.

The discussion starts with a standard setup: for a C1 function f on an open subset of R2, local extrema can only occur at points where ∇f = 0. Geometrically, contour lines of f show where f is constant, and ∇f is perpendicular to those contours. If ∇f is not zero, moving in the gradient direction increases f, so an interior local extremum cannot happen.

Next comes the constrained version. Suppose the constraint is given by a C1 function G(x, y) = 0, which defines a curve in R2. Instead of optimizing f over all of R2, the goal is to optimize the restriction of f to the set G = {x ∈ R2 : G(x) = 0}. On this curve, the earlier “∇f = 0” condition becomes useless: the gradient of f can be nonzero at every point on the curve, even though the constrained maximum still exists. The geometric reason is that allowed moves are only along the constraint curve; the gradient direction may point off the curve, so it no longer guarantees an increase within the feasible set.

At a constrained local maximum, the contour of f must be tangent to the constraint curve. In gradient language, this means the direction perpendicular to the f-contours (∇f) must match the direction perpendicular to the constraint curve (∇G). Since ∇G is perpendicular to the contour line G = 0, the constrained extremum occurs precisely when ∇f and ∇G lie in the same one-dimensional subspace—equivalently, when ∇f is parallel to ∇G.

Formally, for a point x̃ on the constraint (so G(x̃) = 0), a necessary condition for f to have a local extremum subject to the constraint is that there exists a real number λ such that ∇f(x̃) = λ ∇G(x̃).

A second requirement is included to keep the constraint well-behaved: ∇G(x̃) must not be the zero vector, so the constraint curve has a meaningful tangent direction (it spans a one-dimensional subspace). The resulting implication is necessary but not sufficient: solving for points x̃ and multipliers λ that satisfy the equation identifies the only candidates for constrained extrema, but additional checks are still needed to confirm which candidates are actual maxima or minima.

The takeaway is practical and geometric at once: constrained extrema happen where the objective’s gradient lines up with the constraint’s gradient, with the scalar λ measuring how strongly the constraint “scales” that alignment.

Cornell Notes

For an unconstrained C1 function f on an open set in R2, local extrema can only occur where ∇f = 0. When optimization is restricted to a constraint curve defined by a C1 equation G(x, y) = 0, the condition ∇f = 0 no longer applies because feasible directions are limited to the curve. Along the constraint, ∇G is perpendicular to the contour line G = 0, while ∇f is perpendicular to the contour lines of f. A constrained local extremum occurs where these perpendicular directions match, meaning ∇f(x̃) is parallel to ∇G(x̃). This yields the Lagrange multiplier condition ∇f(x̃) = λ∇G(x̃) with G(x̃) = 0 and ∇G(x̃) ≠ 0. The condition is necessary, not sufficient.

Why does the usual unconstrained rule “∇f = 0” fail for constrained extrema on a curve G(x, y)=0?

On the constraint curve, the only allowed perturbations are those that stay on G=0. Even if ∇f is nonzero at every point of the curve, moving in the gradient direction may leave the feasible set. The earlier argument—“move along ∇f to increase f”—doesn’t guarantee an increase within the constraint, so constrained maxima/minima can occur where ∇f ≠ 0.

What geometric relationship must hold between the contour lines of f and the constraint curve at a constrained local maximum?

At a constrained local maximum, the contour of f must be tangent to the constraint curve. Since ∇f is perpendicular to f’s contour lines and ∇G is perpendicular to the constraint contour line G=0, tangency translates to the statement that ∇f and ∇G point in the same direction (up to a scalar).

What is the exact Lagrange multiplier condition in this R2 setup?

For a candidate point x̃, the constraint must be satisfied: G(x̃)=0. Then the necessary condition is that there exists a real number λ such that ∇f(x̃) = λ∇G(x̃). This expresses that ∇f and ∇G are parallel, i.e., they lie in the same one-dimensional subspace.

Why must ∇G(x̃) not be the zero vector?

If ∇G(x̃)=0, then it cannot define a meaningful perpendicular direction to the constraint contour line. The method relies on ∇G spanning a one-dimensional subspace (so the constraint has a well-defined tangent/normal structure at x̃). Without that, the parallelism condition becomes degenerate.

Does solving ∇f(x̃)=λ∇G(x̃) guarantee a maximum or minimum?

No. The condition is necessary but not sufficient. It identifies only candidate points x̃ (and corresponding λ values) where constrained extrema could occur; additional reasoning or tests are needed to determine whether each candidate is actually a maximum, minimum, or neither.

Review Questions

  1. In the constrained setting, what replaces the condition ∇f=0, and why is it different?
  2. Explain how perpendicularity of gradients to contour lines leads to the equation ∇f(x̃)=λ∇G(x̃).
  3. What role does the requirement ∇G(x̃)≠0 play in the validity of the Lagrange multiplier condition?

Key Points

  1. 1

    Unconstrained local extrema for C1 functions on open sets require ∇f=0, but this does not apply on constrained sets like curves.

  2. 2

    A constraint curve can be written as G(x,y)=0, and the feasible domain is the set of points satisfying that equation.

  3. 3

    Along the constraint, ∇f being nonzero does not automatically allow an increase because feasible moves are restricted to the curve.

  4. 4

    At a constrained local extremum, the contour of f is tangent to the constraint curve, which forces ∇f to be parallel to ∇G.

  5. 5

    The Lagrange multiplier necessary condition is: find x̃ and λ such that G(x̃)=0 and ∇f(x̃)=λ∇G(x̃).

  6. 6

    The condition also requires ∇G(x̃)≠0 so the constraint is well-behaved at the candidate point.

  7. 7

    The Lagrange multiplier equation is necessary but not sufficient; it yields candidates that must be checked further.

Highlights

Constrained extrema can occur even when ∇f is never zero on the allowed curve.
The tangency condition becomes a gradient-parallelism condition: ∇f(x̃) ∥ ∇G(x̃).
The method of Lagrange multipliers produces the equation ∇f(x̃)=λ∇G(x̃) together with G(x̃)=0.
A nonzero ∇G(x̃) is required to avoid a degenerate constraint at the candidate point.

Topics

Mentioned

  • C1