# Lagrange undetermined multipliers

1. Jul 24, 2012

### unscientific

1. The problem statement, all variables and given/known data

This section describes the "Lagrange undetermined multipliers" method to find a maxima/minima point, which i have several problems at the end.

3. The attempt at a solution

Why are they adding the respective contributions d(f + λg), instead of equating df = λdg ?

Imagine f(x,y) as the function in the 2nd picture attached, and g(x,y) = c as an equation of a circle. We know that the constraint is g(x,y) = c so therefore all possible points (x,y) from the origin must follow g(x,y) = c.

Then somewhere in f(x,y) there is a minima point (Point B) that also lie on g(x,y). We know that:

=> This point B must satisfy df = (∂f/∂x)dx + (∂f/∂y)dy = 0 and must satisfy g(x,y) = c

To solve for this point B, we simply equate df = λdg.

Why are they adding them? It's like adding the graph of y = sin x + cos x to find the intersection between them, instead of equating sin x = cos x.

#### Attached Files:

File size:
45.5 KB
Views:
73
• ###### lagrange2.jpg
File size:
24.3 KB
Views:
72
2. Jul 24, 2012

### ehild

df=λdg is equivalent to d(f-λg) =0. The value of lambda would be the negative of the one, obtained with d(f+λg) =0.
(When I learned about the method of Lagrange multiplier, we used the form d(f-λg) =0.)

ehild

3. Jul 24, 2012

### unscientific

YES! i knew it! thanks so much! it made more sense to equate than to add them, right? (adding them is only for special cases when both = 0)

4. Jul 24, 2012

### ehild

Well, both of them should be zero. The point moves along g=const, so dg=0, but at the same time it must be an extreme, so df=0...

ehild

Last edited: Jul 24, 2012
5. Jul 24, 2012

### HallsofIvy

Staff Emeritus
No, with the restriction g= constant, neither df nor dg is necessarily 0.

More correctly, rather than "df" we have $\nabla f$, the gradient vector. For any f, $\nabla f$ points in the direction of fastest increase, so if we want to go to the point of maximum f, we should move in that direction, moving until $\nabla f= 0[/tex] so there is no "direction" in which to move. But if we are required to stay on the surface g(x,y,z)= constant, we can't do that. We can, rather, argue that we could move in the direction of the projection of [itex]\nabla f$ on the surface. We can do that until there is no such direction- when $\nabla f$ is perpendicular to the surface. Since $\nabla g$ is perpendicular to g(x,y,z)= constant at every point, that means we must have $\nabla f$ parallel to $\nabla g$- hence $\nabla f$ is a multiple of $\nabla g$.

6. Jul 24, 2012

### ehild

HallsofIvy,

dg is meant the change of g along the curve g=const, not the gradient of g which is perpendicular to g=const. Naturally dg=0. df is the change of f when a point (x,y) shifts by (dx,dy). (See the OP where df were defined: the dot product of the gradient(f) with the vector (dx,dy).) If f has an extreme on g df must be zero with the appropriate (dx,dy). As you pointed out, grad(f) must be perpendicular to g(x,y)=const, that is grad (f)=λgrad(g) instead of df=λdg.

ehild

Last edited: Jul 24, 2012
7. Jul 24, 2012

### Ray Vickson

It does not matter whether we write df - λdg = 0 or df + λdg = 0; they just use λ of opposite signs. It DOES matter when usinig the interpretation of λ in a post-optimality analysis (which is often as important as the solution itself). In the problem max/min f, subject to g = c, the λ in the df = λdg form represents the *rate of change of the optimal value as a function of c*; that is, if we regard the problem as having a solution x(c), giving a value F(c) = f(x(c)), then λ = dF/dc at the original value of c. If we use the df+λdg = 0 form, we have λ = -dF/dc.

Also: in _inequality_ constrained problems, the sign of the Lagrange multiplier is determined (so having a λ of the wrong sign tells you your point is not optimal---an important test used in optimization algorithms for numerical solution). Of course, you need to write the correct form of optimality condition so that the sign of λ is properly examined.

RGV