The answer provided is that there is an absolute max of 3 at (-1,2) and min of 0 at (-2,5), (2,1)
I first found the critical points of the function inside the triangle and did indeed find (-1,2) has a value of 0.
After this i parameterized the line between (-2,5) and (2,1) giving $g(t) = (2+t, 1-t)$ and when finding the derivative of $f(g(t))$ found that the critical point is (0,3). When plugging this value into f(x,y) this yields 4, which is larger than the supposed absolute max of 3. Just by looking at the function even without taking any derivatives it is obvious that (0,3) lies on the line between (-2,5) and (2,1) and that plugging it into f(x,y) gives 4.
What am I missing here?
Thanks
This is as pretty a picture as i could manage. I am illustrating $$ xy-2x+y+1 = (x+1)(y-2) + 3 \; . $$ The places where this is equal to $3$ are the two lines in purple dots, since either $x=-1$ or $y = 2.$ I also show some hyperbolas where your function takes constant values, one above $3$ and one below $3.$