Read this lesson as text
Lagrange Multiplier Examples
Optimization · Axiom Academy
Optimizing functions subject to constraints using the method of Lagrange multipliers When optimizing a function f( ) subject to a constraint g( ) = c , we construct the Lagrangian : The optimal point satisfies: f = g and g( ) = c The multiplier represents the sensitivity of the optimal value to changes in the constraint. Example 1: Maximize xy subject to x + y = 10 From the first two equations: y = and x = Substitute x = y into x + y = 10 : Interpretation: If we increase the constraint from 10 to 11, the maximum value increases by approximately ^* = 5 units. Verification: x + y = 11 x = y = 5.5 f(5.5, 5.5) = 30.25 Change: 30.25 - 25 = 5.25 5 (accurate for small changes) Example 2: Minimize x² + y² + z² subject to x + y + z = 1 All three equations give us: x = y = z = 2 This makes sense geometrically: by symmetry, the closest point should be equidistant in all coordinates. Substitute into x + y + z = 1 : Therefore: x^* = y^* = z^* = 3 Minimum value: f ( 3 , 3 , 3 ) = 3 ( 3 )^2 = 3 The multiplier ^* = 3 tells us how the minimum distance changes with the constraint. Interpretation: If we change the constraint to x + y + z = c , the minimum value is approximately 3 + 3 (c - 1) For example, if c = 2 : x = y = z = 3 , giving f = 3 9 = 3 Change: 3 - 3 = 1 = 3 (2-1) (exact due to quadratic objective) Example 3: Maximize Utility Subject to Budget Constraint From the first equation: = 0.5x^ -0.5 y^ 0.5 2 = y^ 0.5 4x^ 0.5 From the second equation: = 0.5x^ 0.5 y^ -0.5 3 = x^ 0.5 6y^ 0.5
This is the written version of the interactive lesson above. See the full Optimization course.