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 !
 A: 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.
A: Substitute $x = u - v$ and $y = u + v$ (thus $x^2 + y^2 = 2u^2 + 2v^2$). We extremize $$xy - yz + xz = u^2 - v^2 - 2vz = u^2 - (v + z)^2 + z^2$$
subject to the constraints $2u^2 + 2v^2 \leq z \leq 1$. Denote this rewritten function $f(u, v, z)$.
Analysis of the minimum.
If $v$ and $z$ are fixed, then $f$ is minimized at $u=0$. Minimizing $f$ for a fixed $z$ (but not $v$) is thus equivalent to maximizing $(v + z)^2$ over $0 \leq v \leq \sqrt{z/2}$. This happens when $v$ is as large as possible, giving a minimum for fixed $z$ of $f(0, \sqrt{z/2}, z) = - \sqrt{2} z^{3/2} - \frac{z}{2}$. The minimum over the whole region is thus $-\frac{1}{2} - \sqrt{2}$, attained at $(u, v, z) = (0, \sqrt{1/2}, 1)$, viz. $(x, y, z) = (-\sqrt{1/2}, \sqrt{1/2}, 1)$.
Analysis of the maximum.
The maximum of $f(u, v, z)$ for fixed $z$ is on the boundary $u^2 + v^2 = z/2$; otherwise, we could increase $f$ by making $|u|$ larger. Thus we can substitute $u^2 = z/2 - v^2$ in
\begin{align*}
f(u, v, z) &= u^2 - v^2 - 2vz \\
&= \frac{z}{2} - 2v^2 - 2vz \\
&= -2 \left(v + \frac{z}{2} \right)^2 + \frac{z^2 + z}{2}.
\end{align*}
For a fixed $z$, the maximum of $f$ is $\frac{z^2 + z}{2}$, given at $v = -z/2$. (This point always falls within the constraints: $v^2 = z^2/4 < z/2$ for all $z \in [0, 2]$.) The maximum over the entire region, therefore, is $1$, given by $(u, v, z) = (1/2, -1/2, 1)$, viz. $(x, y, z) = (1, 0, 1)$.
