Simple constraint problem bit confused

1. Jan 12, 2014

noelo2014

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

Find the maximum value of the function f(x, y) = x + y subject to the con-
straint xy = 16, x > 0, y > 0.

2. Relevant equations

f(x, y) = x + y
xy = 16

3. The attempt at a solution

I attempted this first using substitution, then using LaGrange multipliers. Both times I got an answer of 8. I entered it into Wolfram Alpha, got an answer of 8. But I'm convinced the answer should be 17 since f(16,1)=16+1=17 which also fits the constraint 16.1=16

???

2. Jan 12, 2014

Dick

What you got is that x=y=4 is the only critical point. Getting a critical point doesn't automatically tell you it's a maximum. And I don't think 17 is what you are after either. 16=160*(1/10) as well.

3. Jan 12, 2014

noelo2014

Thanks for the reply. I see your point but still don't know how to do the problem, anyway I'm going to bed now, I'll look at it tomorrow with fresh eyes.

4. Jan 12, 2014

Dick

Sure, but my point was just that you might want to think about whether your problem even has a maximum.

5. Jan 13, 2014

noelo2014

Well if 160*(1/10)=16 the value of the function is 160+(1/10), if 16000000*(1/1000000)=16 the value is 16000000+(1/10), so I can see that it tends toward infinity

Still I'm not sure why the method of Lagrange doesn't work, and why does it give the answer (4,4). I know the gradients are in the direction at this point but I'm not sure what kind of point this is: Intuitively it's not a saddle point, or local max or local min.

Finally what way should I answer this question in an exam situation?

6. Jan 13, 2014

Dick

Why do you think (4,4) isn't a local min? In an exam I'd find the critical points and then give an argument like that to show there is no maximum.

7. Jan 13, 2014

Ray Vickson

Basically, you are just facing a two-dimensional version of a familiar one-dimensional phenomenon. Take, for example, the simple function f(x) = x^2 in 1-d. If you set f'(x) = 0 you get x = 0 as the (only) stationary point. However, x = 0 is a minimum---the global minimum in this case---and there is NO maximum at all.

The "theorems" about solving for max and or min by finding stationary points will (if stated properly) have hypotheses about the max and/or min actually existing in the region of interest. Just having a stationary point does not guarantee having an optimum, certainly not in a problem where there is no optimum. Example: f(x) = x^3 has no max and no min, but x = 0 is a stationary point.

In your example, the point (x,y) = (4,4) is a (constrained) global min; there are second-order tests to ascertain this fact, but they tend to be a bit lengthy for use on a short class-quiz: they involve looking at the Hessian matrix of the Lagrangian in the tangent subspace of the constraint! However, in your case you can reduce the whole problem to a 1-d case by putting y = 16/x and then looking at max/min f(x) = (x + 16/x), x>0.

8. Jan 15, 2014

noelo2014

Yeah, I just did it again... came out with x=y=λ=4. Doing the second-partials test would give an answer of 0 for D, meaning it's inconclusive. This is as far as the scope of my calculus course goes for these types of problems. I guess this is one they threw in just to see who the smart people were.

9. Jan 15, 2014

Ray Vickson

Your second-order test is wrong: in a constrained problem you need to look at the Hessian matrix of the Lagrangian, not of the function you are maximizing or minimizing. In this case your Lagrangian is
$$L = x+y + \lambda(xy-16).$$
The Hessian matrix of L is the matrix of second partial derivatives:
$$H = \pmatrix{\frac{\partial^2 L}{\partial x^2} & \frac{\partial^2 L}{\partial x \partial y} \\ \frac{\partial^2 L}{\partial y \partial x}& \frac{\partial^2 L}{\partial y^2}} = \pmatrix{0 & \lambda\\ \lambda & 0 }$$
We must project $H$ down into the tangent subspace of the constraint at the soluton point, and examine whether that lower-dimensional matrix is positive-definite, negative-definite, or indefinite; it turns out to be positive-definite, so the point (x,y) = (4,4) is a strict local minimum. As I already stated in my previous post, this is all a bit much for a quick class-quiz. However, the important lesson is that you were doing the wrong type of optimality test.

You still have not dealt with the other issue several people have put to you: what about the maximum? Why does the Lagrange multiplier method fail to find it (if any)?