Course contentsShow
← Mathematics
Lesson 1884 of 3,12140. Multivariable OptimizationFree lesson

The Method with Two Constraints

Setting up the Lagrange system with two multipliers when optimizing subject to two constraint equations simultaneously.

The Method with Two Constraints

What You'll Learn

You'll learn how to extend Lagrange multipliers to handle optimization problems where two separate constraint equations must be satisfied simultaneously.

The Core Idea

When optimizing a function subject to two constraints, you need two Lagrange multipliers—one for each constraint. Think of it like balancing three competing forces: your objective function's gradient must align with the combined "pull" from both constraint gradients at the optimal point.

If you want to optimize f(x, y, z) subject to both g(x, y, z) = k₁ and h(x, y, z) = k₂, you're looking for points where:

∇f = λ∇g + μ∇h

This says the gradient of your objective function must be a linear combination of the two constraint gradients. The multipliers λ and μ tell you how much "weight" each constraint contributes.

Setting Up the System

The complete Lagrange system consists of five equations:

  1. ∂f/∂x = λ(∂g/∂x) + μ(∂h/∂x)
  2. ∂f/∂y = λ(∂g/∂y) + μ(∂h/∂y)
  3. ∂f/∂z = λ(∂g/∂z) + μ(∂h/∂z)
  4. g(x, y, z) = k₁ (first constraint)
  5. h(x, y, z) = k₂ (second constraint)

You solve this system for five unknowns: x, y, z, λ, and μ. The first three equations express the gradient condition; the last two enforce both constraints.

When You Need This

Two constraints arise naturally when optimizing along the intersection of two surfaces—like finding the hottest point on a curve formed where two planes intersect a temperature surface.

Key Takeaway: To optimize with two constraints, introduce two Lagrange multipliers and solve the system ∇f = λ∇g + μ∇h along with both constraint equations.