Artificial intelligent assistant

How to find extreme values of an $f(x,y)$ function? I need this for my semester exams, unfortunately I was absent the day this topic was "talked about". My function is the real-valued $$f(x,y)=x-xy+x^2+y^2$$, interpreted on $\mathbb{R}^2$. Single-valued functions could be handled easily by derivations, but what to do with two variables?

To find the extrems of a function of two (or more) variables, you need:

1. Look for the critical points, that is, points for which $\
abla f(x,y)=(0,0)$.



In your case, $\
abla f(x,y)=(1-y+2x,-x+2y)=(0,0) \iff x=-2/3,\ y=-1/3$.

2. Determine if the critical poitn is a maximum, minimum or saddle point, for example, you can find the Hessian matrix and look whether it is positive definite, negative definite or indefinite.



In your case, $H(x,y)=\begin{pmatrix}2&-1\cr -1&2\end{pmatrix}$.

$Det(H(1,1))=5>0$ and $\frac{d^2f}{dx^2}(1,1)=2>0$, so it is definite positive and you get a minimum.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy e8fb80f01f910fc60ce1b58dc48b6689