Three-Variable Optimization with One Constraint
What You'll Learn
You'll learn how to extend the Lagrange multiplier method to optimize functions of three variables subject to a single constraint equation.
The Core Idea
When you need to find the maximum or minimum of a function f(x, y, z) while staying on a constraint surface g(x, y, z) = k, the same geometric principle applies: at optimal points, the gradient of f must be parallel to the gradient of g.
The beauty of Lagrange multipliers is that the technique scales naturally. Just as you did with two variables, you set:
∇f = λ∇g
But now each gradient is a three-component vector:
- ∇f = ⟨f_x, f_y, f_z⟩
- ∇g = ⟨g_x, g_y, g_z⟩
The Lagrange System for Three Variables
This vector equation expands into four equations with four unknowns (x, y, z, λ):
- f_x = λg_x
- f_y = λg_y
- f_z = λg_z
- g(x, y, z) = k (the constraint)
You solve this system simultaneously to find candidate points, then evaluate f at each to determine which gives the maximum or minimum.
Why This Works
Think of the constraint g(x, y, z) = k as a surface in 3D space (like a sphere or ellipsoid). The level surfaces of f are also 3D surfaces. Where they "just touch" without crossing—where they're tangent—their normal vectors (the gradients) point in the same or opposite directions. That's where f achieves its extreme values on the constraint surface.
Key Takeaway: The Lagrange multiplier method extends seamlessly to three variables: solve the system ∇f = λ∇g along with g(x, y, z) = k to find constrained extrema.