Find maximum and minimum of a function with constraint

I'm finding maximum and minimum of a function $f(x,y,z)=x^2+y^2+z^2$ subject to $g(x,y,z)=x^3+y^3-z^3=3$.

By the method of Lagrange multiplier, $\bigtriangledown f=\lambda \bigtriangledown g$ and $g=3$ give critical points. So I tried to solve these equalities, i.e.

$\quad 2x=3\lambda x^2,\quad 2y=3\lambda y^2,\quad 2z=-3\lambda z^2,\quad x^3+y^3-z^3=3$.

But it is too hard for me. Can anybody solve these? There is already an accepted answer, but I thought I'd leave some remarks since this is sort of a curious constraint surface. The function $\ f(x,y,z) \ = \ x^2 + y^2 + z^2 \$ can of course be thought of as the squared-distance from the origin to a point on the surface $\ x^3 + y^3 - z^3 \ = \ 3 \$ . Since this is an "open" surface, the function $\ f \$ has no absolute maximum value. The discussion by user112018 and mathlove shows that the choice of coordinate value for the location of extrema then are either zero or given by

$$\ \lambda \ = \ \frac{2}{3x} \ = \ \frac{2}{3y} \ = \ -\frac{2}{3z} \ \ \Rightarrow \ \ x \ = \ y \ = \ -z \ .$$

As mathlove has said, this offers eight possibilities, less one, since $\ ( 0, 0, 0) \$ is not on the surface. The three remaining categories are:

I -- two coordinates are zero

$$-z^3 \ = \ 3 \ \ \Rightarrow \ \ (0, 0, -3^{1/3}) \ , \ y^3 \ = \ 3 \ \ \Rightarrow \ \ (0, 3^{1/3}, 0) \ , \ x^3 \ = \ 3 \ \ \Rightarrow \ \ (3^{1/3}, 0, 0)$$

$$\Rightarrow \ \ f \ = \ 3^{2/3}$$

for all three points. These are found by following along each coordinate axis until it intersects the "dimple".

II -- one coordinate is zero

$$y^3 \ - \ z^3 \ = \ 3 \ , \ y \ = \ -z \ \Rightarrow \ \ 2y^3 \ = \ 3 \ \ \Rightarrow \ \ (0, \left( \frac{3}{2} \right)^{1/3} , -\left( \frac{3}{2} \right)^{1/3} ) \ ,$$

$$x^3 \ - \ z^3 \ = \ 3 \ , \ x \ = \ -z \ \ \Rightarrow \ \ ( \left( \frac{3}{2} \right)^{1/3} , 0 , -\left( \frac{3}{2} \right)^{1/3} ) \ ,$$

$$x^3 \ + \ y^3 \ = \ 3 \ , \ x \ = \ y \ \Rightarrow \ \ 2x^3 \ = \ 3 \ \ \Rightarrow \ \ (\left( \frac{3}{2} \right)^{1/3} , \left( \frac{3}{2} \right)^{1/3} , 0 )$$

$$\Rightarrow \ \ f \ = \ 2 \cdot \left( \frac{3}{2} \right)^{2/3} \ = \ 2^{1/3} \cdot 3^{2/3}$$

for all three points. These are located along diagonals, in each of the three coordinate planes, meeting the "dimple" .

III -- no coordinate is zero

$$x \ = \ y \ = \ -z \ \Rightarrow \ \ 3x^3 \ = \ 3 \ \ \Rightarrow \ \ (1, 1 , -1 ) \ \ \Rightarrow \ \ f \ = \ 3 \ .$$

This point lies on a "body diagonal" running to the "deepest corner of the dimple".

So, owing to the particular symmetries and anti-symmetries of this surface, the squared-distance function has three local and absolute minima [Category I] and what appear to be three additional (shallow) local minima [Category II] and a (very shallow) local maximum [Category III].

HINT : $$2x=3\lambda x^2\iff x(2-3\lambda x)=0\iff x=0\ \text{or}\ 2-3\lambda x=0$$ $$2y=3\lambda y^2\iff y(2-3\lambda y)=0$$ $$2z=-3\lambda z^2\iff z(2+3\lambda z)=0$$

• I tried that already but it is hard to proceed – user112018 Dec 31 '13 at 6:33
• Can you write your try? – mathlove Dec 31 '13 at 6:39
• If $x=y=0$, then $z=-3^\frac13$ and so $f=3^\frac23$. – user112018 Dec 31 '13 at 6:42
• If $x=0$ and $y=\frac2{3\lambda}$, then $z=\sqrt{3-\left ( \frac2{3\lambda} \right )^3}$. I'm stuck in here. – user112018 Dec 31 '13 at 6:43
• OK, continue it. There are 8 possibilities. But some don't satisfy the condition. For example, $(x,y,z)=(0,0,0)$ does not satisfy the condition. – mathlove Dec 31 '13 at 6:45