Another optimization problem I am having trouble figuring out a next step in an optimization problem
the question is to find the max and min values of $f(x,y)=\frac{x+y}{2+x^2+y^2}$
I calculated $f_x$ and $f_y$ and set both them equal to zero, and the only possibility you get is x=y. I dont know how else to find it after this. But the back of the book says the answer is a max at $f(1,1)$ and a min at $f(-1,-1)$ but I dont know how?
$$f_x=\frac{-x^2-2xy+y^2+2}{(2+x^2+y^2)^2}$$
$$f_y= \frac{-y^2-2xy+x^2+2}{(2+x^2+y^2)^2}$$
Can anyone see why please?
Thankyou
 A: Setting $f_x=0$ and $f_y=0$ gives $-x^2-2xy+y^2+2=0$ and $-y^2-2xy+x^2+2=0$, so
subtracting these equations gives $2y^2-2x^2=0, \;\;y^2=x^2,\; $ and so $y=\pm x$.
1) If $y=x$, substituting into the first equation gives $x^2=1$ so $x=\pm 1$.
2) If $y=-x$, substituting into the first equation gives $x^2=-1$, so there is no real solution.
Therefore $(1,1)$ and $(-1,-1)$ are the only critical points.

Since $\;\displaystyle f_{xx}=(2+x^2+y^2)^{-2}(-2x-2y)-4x(-x^2-2xy+y^2+2)(2+x^2+y^2)^{-3}$,
$\;\displaystyle \hspace{.36 in}f_{xy}=(2+x^2+y^2)^{-2}(-2x+2y)-4y(-x^2-2xy+y^2+2)(2+x^2+y^2)^{-3}$,
$\;\displaystyle \hspace{.36 in}f_{yy}=(2+x^2+y^2)^{-2}(-2y-2x)-4y(-y^2-2xy+x^2+2)(2+x^2+y^2)^{-3}$, 
A) $\;D=f_{xx}f_{yy}-(f_{xy})^2=(-\frac{1}{4})(-\frac{1}{4})-0^2=\frac{1}{16}>0\;$ and $\;f_{xx}=-\frac{1}{4}<0$ at $(1,1)$,
$\hspace{1.4 in}$so $f$ has a relative maximum at $(1,1)$.
B) $\;D=f_{xx}f_{yy}-(f_{xy})^2=(\frac{1}{4})(\frac{1}{4})-0^2=\frac{1}{16}>0\;$ and $\;f_{xx}=\frac{1}{4}>0$ at $(-1,-1)$,
$\hspace{1.4 in}$so $f$ has a relative minimum at $(-1,-1)$.
A: Rewriting $\displaystyle \frac{x+y}{2+x^2+y^2}=t\;\;$ gives $\;\;tx^2-x+ty^2-y+2t=0$.
This will have a solution for $x$ if $b^2-4ac=1-4t(ty^2-y+2t)\ge0$, 
which gives $\;\;4t^2y^2-4ty+8t^2-1\le0$.
This will have a solution for $y$ if $b^2-4ac=16t^2-16t^2(8t^2-1)\ge0$.
Then $16t^2(2-8t^2)\ge0,\;\;$ so $8t^2\le2\implies t^2\le\frac{1}{4}\implies-\frac{1}{2}\le t\le \frac{1}{2}$.
Since $t=\frac{1}{2}\implies x^2+y^2-2x-2y+2=0\implies (x-1)^2+(y-1)^2=0\implies x=1 \text{ and } y=1$
and $t=-\frac{1}{2}\implies x^2+y^2+2x+2y+2=0\implies (x+1)^2+(y+1)^2=0\implies x=-1 \text{ and } y=-1$,
$f(1,1)=\frac{1}{2}$ is the maximum value for f and $f(-1,-1)=-\frac{1}{2}$ is the minimum value for f.
