<s>[INST] Maximum and minimum of $z=\frac{1+x-y}{\sqrt{1+x^2+y^2}}$ Find the maximum and minimum of the function
$$z=\frac{1+x-y}{\sqrt{1+x^2+y^2}}$$
I have calculated 
$\frac{\partial z}{\partial x}=\frac{1+y^2+xy-x}{(1+x^2+y^2)^{\frac{3}{2}}}$
$\frac{\partial z}{\partial y}=\frac{-1-x^2-xy-y}{(1+x^2+y^2)^{\frac{3}{2}}}$
I have problem to solve the system of equations:
$$1+y^2+xy-x=0$$
$$1+x^2+xy+y=0$$
 [/INST] Another solution for solving your two equations $$1+y^2+xy-x=0$$ $$1+x^2+xy+y=0$$ From the first, you can extract $$x=-\frac{y^2+1}{y-1}$$ and put it in the second, which after vsimplification reduces to $$\frac{2 \left(y^3+1\right)}{(y-1)^2}=0$$ So, $y=-1$ and back to the definition of $x$, $x=1$.
</s>