Independent study guide

Constrained Optimization: Feasible Sets and Lagrange Multipliers

Compare substitution and Lagrange multipliers, check interior and boundary candidates, and justify global extrema or their absence.

Nablio · 35 minPublished

Stuck on a step? Text us Email us Request a lesson

For course topics and one-to-one help, see Concordia MAST 218 tutoring.

A solution needs more than a point where equations happen to vanish. State where you are allowed to move, find every relevant candidate and explain why your conclusion applies to the whole allowed set.

These original examples support the extrema and Lagrange-multiplier topics listed for Concordia MAST 218. They are later-course topic practice, not a course assessment or a prediction of an exam. Use your section outline to choose what to review. Throughout this lesson, all variables are real and dimensionless, and every objective is a dimensionless mathematical model.

Already comfortable with the method? Try the six guided constrained-optimization questions. If the gradient is unfamiliar, start with the existing gradient and directional-derivative explanation.

1. Write the allowed set before differentiating

For an objective f(x,y)f(x,y), the feasible set SS contains exactly the points satisfying every constraint and domain condition. A global minimum at p∈Sp\in S means f(p)≤f(q)f(p)\le f(q) for every q∈Sq\in S. A local minimum only compares feasible points sufficiently near pp. Reverse the inequality for a maximum. An extremum value and the point where it occurs are different parts of the answer.

Compare three sets:

  • x+y=5x+y=5 is an entire line, with no nonnegativity restriction.
  • x+y=5, x≥0, y≥0x+y=5,\ x\ge0,\ y\ge0 is a closed segment, including two endpoints.
  • x2+y2≤4x^2+y^2\le4 is a filled closed disk. The equation x2+y2=4x^2+y^2=4 describes only its boundary circle.

A continuous function on a nonempty closed and bounded subset of R2\mathbb R^2 attains both a global minimum and a global maximum. This is a useful sufficient condition, not a requirement for every extremum. An unbounded set may still have a minimum; an open set may still contain one. If the theorem does not apply, examine the actual function and whether a proposed bound is attained.

In the procedure below, objectives are differentiable on a neighbourhood of the feasible set, except where a limitation is explicitly discussed. A more general problem also needs separate attention at points where the objective is undefined or not differentiable.

2. A line constraint: solve, then prove the global claim

Find the global extrema of

f(x,y)=x2+4y2,x+y=5.\begin{gathered}f(x,y)=x^2+4y^2,\\x+y=5.\end{gathered}

The unconstrained stationary point (0,0)(0,0) is not feasible. Do not use it as a constrained candidate.

Substitute y=5−xy=5-x. Because the constraint is the entire line, xx ranges over all real numbers:

F(x)=f(x,5−x)=x2+4(5−x)2=5(x−4)2+20. \begin{aligned} F(x)&=f(x,5-x)\\ &=x^2+4(5-x)^2\\ &=5(x-4)^2+20. \end{aligned}

The square is nonnegative and equals zero only at x=4x=4. Therefore the unique global minimum is 2020, attained at (4,1)(4,1). Also, F(x)→+∞F(x)\to+\infty as ∣x∣→∞|x|\to\infty, so there is no global maximum. The same identity proves both conclusions. Merely finding F′(4)=0F'(4)=0 would not.

Change the allowed set

Add x≥0x\ge0 and y≥0y\ge0. Now 0≤x≤50\le x\le5. The interior candidate still gives 2020; the endpoint values are

f(0,5)=100,f(5,0)=25.\begin{gathered}f(0,5)=100,\\f(5,0)=25.\end{gathered}

The global minimum remains 2020 at (4,1)(4,1), while the global maximum is now 100100 at (0,5)(0,5). Check completeness: the reduced derivative F′(x)=10(x−4)F'(x)=10(x-4) vanishes only at 44, and both endpoints have been included. Adding restrictions changed the maximum question.

Level ellipses for x squared plus four y squared meet the line x plus y equals five first at (4,1). A second panel shows the reduced parabola and the restricted interval from zero to five, with minimum 20 and endpoint values 100 and 25.
On the whole line, the smallest attainable contour is f=20f=20 at (4,1)(4,1), and the objective has no maximum. Keeping only the nonnegative segment adds two endpoints; its maximum is f=100f=100 at (0,5)(0,5).

3. What Lagrange multipliers actually establish

Suppose ff and gg are continuously differentiable near a feasible point pp, and the equality constraint is g(x,y)=cg(x,y)=c. If ∇g(p)≠0\nabla g(p)\ne\mathbf0, every local extremum of ff along that regular constraint must satisfy

∇f(p)=λ∇g(p),g(p)=c\begin{gathered}\nabla f(p)=\lambda\nabla g(p),\\g(p)=c\end{gathered}

for some real number λ\lambda. These are necessary candidate equations. Solving them does not establish a minimum, maximum, existence or global conclusion by itself. A point with ∇f=0\nabla f=\mathbf0 is allowed: it can satisfy the equations with λ=0\lambda=0.

Why do parallel gradients appear? Along a differentiable feasible path r(t)\mathbf r(t), the chain rule gives ∇g⋅r′(t)=0\nabla g\cdot\mathbf r'(t)=0. At a constrained local extremum, the derivative of f(r(t))f(\mathbf r(t)) is also zero. On a regular plane curve, both gradients are perpendicular to the tangent direction. Thus the objective cannot increase to first order along that tangent. Higher-order change may still matter.

For the previous line, use g=x+yg=x+y, with ∇g=(1,1)≠0\nabla g=(1,1)\ne\mathbf0. The equations are

2x=λ,8y=λ,x+y=5.\begin{gathered}2x=\lambda,\\8y=\lambda,\\x+y=5.\end{gathered}

Thus x=4yx=4y, giving (4,1)(4,1) and λ=8\lambda=8. This agrees with substitution. The completed square, rather than the multiplier value, proves the global minimum and absence of a maximum.

For the nonnegative segment, this regular-curve calculation supplies the interior candidate. The endpoints still need a separate check. They are endpoints of the feasible segment even though the supporting line is smooth.

4. A compact constraint can have several candidates

Find the extrema of f(x,y)=xyf(x,y)=xy on the unit circle x2+y2=1x^2+y^2=1. The circle is nonempty, closed and bounded, and the polynomial objective is continuous, so both global extrema exist. Its constraint gradient (2x,2y)(2x,2y) never vanishes on the circle.

The candidate equations are

y=2λx,x=2λy,x2+y2=1.\begin{gathered}y=2\lambda x,\\x=2\lambda y,\\x^2+y^2=1.\end{gathered}

Avoid dividing by xx or yy before checking whether either can be zero. If x=0x=0, the first equation gives y=0y=0, contradicting the constraint. Likewise y=0y=0 is impossible for a candidate. Multiply the first equation by yy and the second by xx to obtain y2=x2y^2=x^2. The four candidates are

(12,12),(−12,−12),(12,−12),(−12,12).\begin{gathered}\left(\frac1{\sqrt2},\frac1{\sqrt2}\right),\\\left(-\frac1{\sqrt2},-\frac1{\sqrt2}\right),\\\left(\frac1{\sqrt2},-\frac1{\sqrt2}\right),\\\left(-\frac1{\sqrt2},\frac1{\sqrt2}\right).\end{gathered}

Same-sign coordinates give f=1/2f=1/2; opposite signs give f=−1/2f=-1/2. Every global extremum must occur among these candidates because the circle has no endpoints or singular constraint points. Therefore the global maximum is 1/21/2, attained at the two same-sign points, and the global minimum is −1/2-1/2, attained at the other two.

An independent check follows from (x−y)2≥0(x-y)^2\ge0 and (x+y)2≥0(x+y)^2\ge0: on the circle, −1/2≤xy≤1/2-1/2\le xy\le1/2. Equality occurs at exactly the listed points. Finding a positive candidate alone would miss the minimum and the second maximum point.

Unfilled unit circle with four candidates at coordinates plus or minus one over square root of two. Same-sign coordinates have xy equal to one half; opposite-sign coordinates have xy equal to minus one half.
The four Lagrange candidates on the unit circle split into two maxima and two minima. The maximum value 1/21/2 occurs where the coordinates have the same sign; the minimum −1/2-1/2 occurs where their signs differ.

5. A filled region needs interior and boundary checks

Find the extrema of

f(x,y)=(x−1)2+y2,S={(x,y):x2+y2≤4}.\begin{gathered}f(x,y)=(x-1)^2+y^2,\\S=\{(x,y):x^2+y^2\le4\}.\end{gathered}

Continuity and compactness guarantee both global extrema. Partition the search into the interior of the disk and its boundary. Here “interior” means interior in the plane. A point on a constraint circle is not an interior point of a filled disk merely because it is not an endpoint of the circle.

Interior candidates

At a differentiable local extremum in the interior, ∇f=0\nabla f=\mathbf0. Thus

2(x−1)=0,2y=0,\begin{gathered}2(x-1)=0,\\2y=0,\end{gathered}

giving (1,0)(1,0). It lies strictly inside the disk and has value 00.

Boundary candidates

On the circle x2+y2=4x^2+y^2=4,

f=x2+y2−2x+1=5−2x.\begin{aligned}f&=x^2+y^2-2x+1\\&=5-2x.\end{aligned}

Since −2≤x≤2-2\le x\le2, the boundary minimum is 11 at (2,0)(2,0), and its maximum is 99 at (−2,0)(-2,0).

The boundary multiplier equations give the same result:

2(x−1)=2λx,2y=2λy,x2+y2=4.\begin{gathered}2(x-1)=2\lambda x,\\2y=2\lambda y,\\x^2+y^2=4.\end{gathered}

If y≠0y\ne0, the second equation forces λ=1\lambda=1, and the first then says −1=0-1=0, impossible. Hence y=0y=0, and the circle gives x=±2x=\pm2. This checks every case without silently dividing by a variable.

Compare the actual objective values

Compare 00, 11 and 99. On the whole disk, the global minimum is 00 at (1,0)(1,0), and the global maximum is 99 at (−2,0)(-2,0). The boundary minimum of 11 is not the minimum on the filled disk. Restricting the problem to the circle would discard the true minimum.

For a region bounded by several smooth edges or arcs, inspect each boundary piece, its endpoints, corners and intersections. For example, a triangle requires its three edges and three vertices in addition to feasible interior stationary points. The circle calculation is not a complete recipe for every possible boundary. This lesson does not introduce general inequality-multiplier conditions.

Shaded closed disk of radius two. Interior point (1,0) has objective value zero; boundary point (2,0) has value one; opposite boundary point (−2,0) has value nine. The whole-disk minimum is the interior point.
For f=(x−1)2+y2f=(x-1)^2+y^2 on the filled disk, the interior point (1,0)(1,0) beats every boundary value. The boundary minimum at (2,0)(2,0) only answers the problem restricted to the circle.

6. A zero constraint gradient needs separate attention

The Lagrange conclusion above relies on ∇g≠0\nabla g\ne\mathbf0. When this fails, do not conclude that no extremum exists.

Consider f(x,y)=xf(x,y)=x with g(x,y)=y2−x3=0g(x,y)=y^2-x^3=0. The constraint implies x≥0x\ge0, and (0,0)(0,0) is feasible. Consequently the unique global minimum is 00 at the origin. Yet

∇f(0,0)=(1,0),∇g(0,0)=(0,0),\begin{gathered}\nabla f(0,0)=(1,0),\\\nabla g(0,0)=(0,0),\end{gathered}

so no λ\lambda satisfies ∇f=λ∇g\nabla f=\lambda\nabla g there. A feasible parametrization (x,y)=(t2,t3)(x,y)=(t^2,t^3), t∈Rt\in\mathbb R, gives f=t2f=t^2, confirming the minimum and showing that no global maximum exists. The zero constraint gradient marked a point that needed a direct check.

The chosen equation can also create a problem. Writing the line x+y=5x+y=5 as (x+y−5)2=0(x+y-5)^2=0 leaves the feasible set unchanged, but the new constraint gradient vanishes everywhere on it. Return to the regular equation x+y=5x+y=5 or substitute directly. A failed regularity hypothesis is not a verdict on the optimization problem.

7. A stationary candidate can still fail to be an extremum

On the regular constraint y=0y=0, take f(x,y)=x3+y2f(x,y)=x^3+y^2. Lagrange gives 3x2=03x^2=0, 2y=λ2y=\lambda, y=0y=0, so (0,0)(0,0) is a candidate. Restricted to the line, however, f(x,0)=x3f(x,0)=x^3. Arbitrarily near the origin there are positive and negative values. The candidate is neither a local minimum nor a local maximum along the line, and there is no global extremum on that line.

For comparison, h(x,y)=x4+y2h(x,y)=x^4+y^2 on the same line has h(x,0)=x4h(x,0)=x^4, so the origin is its unique global minimum. Both reduced functions have second derivative zero at the origin. A zero second derivative is inconclusive; it does not mean “no extremum.” Use a sign comparison, a higher-order argument or another valid test.

Likewise, applying an unconstrained Hessian test without accounting for allowed directions does not classify a constrained problem. A constraint can remove directions used in an unconstrained comparison. For that distinct skill, use the existing unconstrained stationary-point practice and Hessian classification example, then return to the feasible set here. Those examples are on McGill course pages; they are supplementary topic links, not a claim of course equivalence.

8. Make the last line of the solution defensible

Before writing “minimum” or “maximum,” check:

  1. Is the point feasible for every condition, including strict inequalities and the objective’s domain?
  2. What guarantees existence, or what direct argument replaces that guarantee?
  3. Have you included all relevant interior candidates, boundary pieces, endpoints, corners and points where a derivative or regularity condition fails?
  4. Did your algebra keep all cases, including zero coordinates or zero multipliers?
  5. Are you comparing values of the original objective, rather than multiplier values?
  6. Does your argument establish a local result or a global one? If a bound is only approached, say it is not attained.

Try the guided practice, then return to MAST 218 tutoring. Bring the feasible-set sketch, your complete candidate list and the sentence that justifies your conclusion. A tutor can inspect those decisions before working through more algebra.

Course scope reference: Concordia’s current MAST 218 calendar description. The examples and teaching sequence above are original; the calendar is used only to establish topic scope.

Useful for

Work on the step you’re missing.

Tell us the subject and your preferred time. Nablio confirms the details by text or email.

Request a lesson