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:
- ∂f/∂x = λ(∂g/∂x) + μ(∂h/∂x)
- ∂f/∂y = λ(∂g/∂y) + μ(∂h/∂y)
- ∂f/∂z = λ(∂g/∂z) + μ(∂h/∂z)
- g(x, y, z) = k₁ (first constraint)
- 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.