<s>[INST] Absolute extrema of $f(x,y,z)=xy-yz+xz$ on the paraboloid $x^2+y^2 \leq z\leq1$ I'm asked to find the global (=absolute) extremas of the function $$f(x,y,z)=xy-yz+xz$$ on the domain $$x^2+y^2 \leq z\leq1$$ which is obviously a paraboloid.
First, I find the extremas in the inside of the domain $$\nabla f=(y,x-z,x-y)=(0,0,0)$$ and I get the trivial solution $$x=y=z=0$$. Then I thought about using Lagrange multiplier for the border with constraint $$g(x,y,z)=x^2+y^2-z$$ where where $z \leq 1$. So :
$$\nabla f=(y,x-z,x-y)=\lambda \nabla g=\lambda(2x,2y,-1)$$ and $$x^2+y^2=z$$ After a bit of solving, I get $y=\frac{x}{2x-1}$ and $z=x^2(1+\frac{1}{(2x-1)^2})$. 
At that point, the problem is that expecially the $x$ equivalence of $z$ seems a bit tricky, so I'm not sure if a made any mistake, took the wrong path or if there is an easier way to proceed in this situation. So my question is if my approach is correct, and if so, how should I proceed next, and also if there is an easier way to proceed on that conic domain than with Lagrange multiplier ?
Thanks for your help !
 [/INST] We first find any critical point in the interior of the domain, which is $x^2 + y^2 < 1.$ So we have $f'(x, y, z) = (y + z, x - z, x - y)$ and $f'(x, y, z) = 0$ can only happen when $x = y = z$ and $y = -z,$ so $x = y = z = 0,$ but this is not in the interior of the domain. Hence, there are no critical points.
Consider now one part of the frontrier, the one defined by $x^2 + y^2 = z = 1.$ Hence we have to maximise $u(x, y) = f(x, y, 1) = x + xy - y$ with $x^2 + y^2 = 1.$ Set $g(x, y) = x^2 + y^2 - 1.$ Since $g'(x, y) = (2x, 2y),$ the derivative of $g$ is never zero and the Lagrange multipliers method apply. We have to solve $u'(x, y) = \dfrac{\lambda}{2} g'(x, y),$ which signifies $(1 + y, x - 1) = \lambda (x, y).$ Observe that $x = 1$ implies $y = 0$ and so we can consider the point $(1, 0)$ as one of the critical points in the restriction. Putting it aside, we have (by division), $\dfrac{1 + y}{x - 1} = \dfrac{x}{y}$ or else $y + y^2 = x^2 - x = 1 -y^2 - x$ or $x = 1 - 2y^2 - y.$ From the relation $x^2 + y^2 = 1$ we get $1 + 4y^4 + y^2 - 4y^2-2y+y^2 = 1,$ that is, $4y^4-2y^2-2y=0$ which leads to $y = 0$ (and hence $x = 1$) or else $2y^3-y-1=0.$ By inspection, we can factor $(y - 1)(2y^2+2y+1) = 0$ and the only solution is $y = 1$ with $x = -3,$ which is not in the restriction. Hence, we got only one point so far $(1, 0, 1).$
We finally tackle the other part of the restriction, which is $x^2 + y^2 - z = 0.$ Here we solve $f'(x, y, z) = \lambda (2x, 2y, -1)$ and this leads to (upon summing) $y + x = 2\lambda(x + y)$ and $y - x = \lambda.$ If $x = -y,$ then $z = 2x^2 \leq 1$ and we are optimising $h(x) = f(x, -x, 2x^2) = 4x^3 - x^2$ for $|x| \leq \dfrac{1}{2}$ and the optimisers for $h$ are $x = -\dfrac{1}{\sqrt{2}}$ and $x = \sqrt{2} - \dfrac{1}{2},$ this allow deducing the critical points for $f$ to be $\left(-\dfrac{1}{\sqrt{2}}, \dfrac{1}{\sqrt{2}}, 1\right)$ and $\left(\dfrac{1}{\sqrt{2}}, -\dfrac{1}{\sqrt{2}}, 1\right).$ If $x \neq -y,$ then $\lambda = \dfrac{1}{2}$ and $y = x + \dfrac{1}{2}.$ Again, substituting $x^2 + y^2 = z \leq 1$ leads to the point (details ommited) $\left(-\dfrac{1+\sqrt{7}}{4}, \dfrac{1 - \sqrt{7}}{4}, 1\right).$
To terminate the problem, recall the region is compact and evaluate in each of the four points.
Take my calculations with a grain of salt, I did them and checked them twice, but with calculus of several variables, I always commit arithmetic errors.
</s>