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?
$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.