# How to determine maximum and minimum for Lagrange Multiplier?

1. Nov 10, 2011

### DrunkApple

1. The problem statement, all variables and given/known data
Find the minimum and maximum values of the function subject to the given constraint
f(x,y) = x^2 + y^2, 2x + 3y = 6

2. Relevant equations
$\nabla$f, $\nabla$g

3. The attempt at a solution
After doing all the calculation, x value and y value came out to be ($\frac{12}{13}$,$\frac{18}{13}$). After plugging them into f(x,y), my answer came out as $\frac{468}{169}$. I thought it was maximum. But when I checked the answer, it said it was minimum and maximum value doesn't exist. I thought if the value was positive, it was maximum and if negative, it was minimum, but apparently I am wrong. Would anyone tell me how to correctly determine if the value is maximum or minimum?
Thank you

2. Nov 10, 2011

### Office_Shredder

Staff Emeritus
Think back to single variable calculus. You had to use the second derivative of the function to determine if you have a minimum or a maximum. Similarly, there's a matrix called the Hessian

$$H= \left( \begin{array}{cc} \frac{\partial^2 f}{\partial x^2} & \frac{\partial^2 f}{\partial x \partial y} \\ \frac{\partial^2 f}{\partial x \partial y} & \frac{\partial^2 f}{\partial y^2} \end{array} \right)$$

The eigenvalues of the Hessian determine whether you have a minimum or a maximum

EDIT: I don't know why my tex is failing :(
Mod edit: it's fixed, now.

Last edited by a moderator: Nov 10, 2011
3. Nov 10, 2011

### DrunkApple

I am going to be honest. I don't even know what this is... Is this even in calc 3? And I can't read the equation :((( How come it's not in my lagrange multiplier section?

4. Nov 10, 2011

### Ray Vickson

The Lagrange multiplier rule is a _neccessary_ condition for a max or a min. In general it not a _sufficient_ condition. In other words, IF a maximum exists we can find it using Lagrange multiplier methods. However, that does not apply when a mac does not exist. For example, in 1D the function f(x)=x^2 has a minimum at x=0, and the derivative = 0 at that point; but it has no maximum.

RGV

5. Nov 10, 2011

### DrunkApple

So if I use lagrange multiplier, I'll know only know the value of maximum, not minimum?

6. Nov 10, 2011

### HallsofIvy

Staff Emeritus
Well, yes, "Lagrange multipliers" is a Calc 3 type problem. You said "for Lagrange Multiplier". Do you know what that means?

The problem asks you to find those numbers, x and y, out of those that satisfy 2x+ 3y= 6, that give minimum values for $x^2+ y^2$. Note that 2x+3y= 6 is the straight line through (3, 0) and (0, 2) while $x^2+ y^2= r^2$ with center at (0, 0) and radius r.

But you don't need "Lagrange multipliers" for this problem- you really just need secondary school geometry and maybe a little "PreCalculus".

There are no such numbers that make $x^2+ y^2$ a maximum. We can have arbitrarily large circles that pass through the line 2x+ 3y= 6 so there exist arbitrarily large |x| and |y| on that line that will make $x^2+ y^2$ arbitrarily large.

However, a very small circle may miss that line altogether. Geometrically, the circle with smallest radius that includes any point on that line is tangent to the line. The line itself, which we can write as y= 2- (2/3)x, has slope -2/3. The line through the origin (the center of the circle) perpendicular to that has equation y= (3/2)x. The point where those two line intersect is the point on the circle $x^2+ y^2= r^2$ that minimizes $r^2$.

The "Lagrange multiplier" method says that points satifying the "constraint" g(x,y)= constant, that minimize or maximize f(x,y), must have gradient vectors parallel: $\nabla f(x,y)= \lambda \nabla g(x,y)$ where the constant, $\lambda$, is the "Lagrange multiplier".

Here, $f(x,y)= x^2+ y^2$ so $\nabla f(x,y)= 2x\vec{i}+ 2y\vec{j}$ and $g(x,y)= 2x+ 3y$ so $\nabal g(x,y)= 2\vec{i}+ 3\vec{j}$. $\nabla f(x,y)= \lambda \nable g(x,y)$ becomes $2x\vec{i}+ 2y\vec{j}= \lambda(2y\vec{i}+ 3\vec{j}$ which gives the two equations $2x= 2\lambda$ and $2y= 3\lambda$.

You can eliminate "$\lambda$", which is not really part of the solution, by dividing one equation by the other. That will give you one equation in x and y. Remember that they must also satisfy 2x+ 3y= 6.

7. Nov 10, 2011

### HallsofIvy

Staff Emeritus
That's pretty close to being the opposite of what Ray Vickerson said!

8. Nov 10, 2011

### DrunkApple

OHHHHHH so the purpose of lagrange is to calculate the value for the minimum??? ok I see that x^2 + y^2 is circle equation, but what if there is more complex equation and I can't visualize it and get two values, let's say -41 and 41. How would I know which one is minimum or maximum?

9. Nov 10, 2011

### HallsofIvy

Staff Emeritus
Do you not notice that -41 is smaller than 41?

10. Nov 10, 2011

### DrunkApple

OHHHHHHHH ok so if there are two values and one is smaller than the other, THEN you can determine maximum and minimum?

11. Nov 10, 2011

### Ray Vickson

In this problem there is NO maximum, so "finding" it is an empty exercise. In some other problems there are _both_ maxima and minima, and both can be found using the Lagrange multiplier method. It depends on the problem!

RGV

12. Nov 10, 2011

### Ray Vickson

It depends on the problem. One could be the max and the other could be the min, or neither could be max or min, because the problem may not have a max or a min, but may have so-called "saddle points".

There second-order necessary (and slightly different) sufficient conditions for a constrained max or constrained min; these involve checking for definiteness of a matrix A, which is the Hessian of the Lagrangian projected on the tangent plane of the constraints.

RGV