Wrong result through Lagrange multipliers

169 Views Asked by At

Problem I was trying to solve is $f(x,y)=xy-x+y-1$ with the constraint $x+y=1$. If I just take the constraint and plug $y=1-x$ in the original function and get $f(x)=-x-x^2$, from which I get that the original function has a maximum in the point $[-\dfrac{1}{2},\dfrac{3}{2}]$.

If I use Lagrange multipliers I obtain the same critical point, but when I calculate the second order partial derivatives I get the result that there is a saddle point.

How can I obtain two different results? What am I doing wrong?

2

There are 2 best solutions below

0
On

$f(x,y) = xy -x + y - 1 = (x+1)(y-1)$ describes a hyperbolic paraboliod.

It does not have a minimum or a maximum.

It has a saddle point at $(-1,1)$

However when we constrain the function by $x+y = 1$ the intersection of the two surfaces forms a parabola, and there will be a maximum.

0
On

To expand on Daniel Robert-Nicoud’s comment above, when you constrain the function to the curve $x+y=1$, you’re effectively working with a single-variable function. Just as you find critical points of a single-variable function by looking for points at which its derivative vanishes, you find the critical points of this restricted function by looking for points at which its derivative in the direction of the curve—in other words, in a direction tangent to the curve—vanishes. These points might not bear any relation at all to the critical points of the unrestricted function since at every point at which the function is differentiable, the directional derivative is zero in some direction.