How do I find the points on the surface: $$x^3+y^3+z^3=1$$ such that the distance to the origin is minimized?
My Thoughts:
Perhaps we can minimize the distance squared? Not sure.
How do I find the points on the surface: $$x^3+y^3+z^3=1$$ such that the distance to the origin is minimized?
My Thoughts:
Perhaps we can minimize the distance squared? Not sure.
You want to minimise the function: $f(x,y,z) = x^2+y^2+z^2$ with the condition that $g(x,y,z) = 1- x^3-y^3-z^3 = 0$
Note that if $x^2+y^2+z^2$ is minimal so is $\sqrt{x^2+y^2+z^2}$
This is best done using Lagrange multipliers. You define $ F(x,y,z,\lambda ): = f(x,y,z) + \lambda\cdot g(x,y,z)$
Then the set of equations
$$ \frac{\partial F}{\partial x} = 0,\ \frac{\partial F}{\partial y} = 0,\ \frac{\partial F}{\partial z} = 0,\ \frac{\partial F}{\partial \lambda}= 0 $$
will give us the answer. We get $x=\lambda 3x^2$ same for $y,z$ plus $g(x,y,z) = 0$
(i) $x,y,z \ne 0$
We get: $2x=\lambda 3x^2 \Rightarrow \lambda = \frac{2}{3x}$
Inserting into the second and third equation: $x = y = z$
With the last equation: $3x^3 = 1 \Rightarrow x =y=z = \frac{1}{\sqrt[3]{3}}$
(ii) $x,y\ne 0$ and $z = 0$
$ 2x^3 = 1 \Rightarrow x =y = \frac{1}{\sqrt[3]{2}}, z = 0$
(iii) $x\ne 0, y,z = 0$
$ x^3 = 1 \Rightarrow x = 1, y = z = 0$ and $\lambda = \frac23$.
Because of symmetry we will get the last two cases three times for the permutations of $x,y,z$
Now we calculate the distances:
(i) $d = 3^{\frac{1}{6}} = 1,2...$
(ii) $d = 2^{\frac{1}{6}} = 1,1...$
(iii) $d = 1$
So the points with minimal distance are case (1) $ x = 1, y=z=0$ (2) $ y = 1, x=z=0$ (3) $ z = 1, x =y=0$.
To check if we have a local minimum we could also calculate the Hessian matrix on the tangent space of $\nabla g(x,y,z) = (-3, 0, 0)^T$ for say case (1):
\begin{align} \frac{\partial^2F}{\partial y^2} = \frac{\partial^2F}{\partial z^2} &= 2 - 6\lambda y = 2 \\ \frac{\partial^2F}{\partial x \partial y} &= 0 \end{align} That is $$ \nabla^2_{(y,z)} f(1,0,0) = \begin{pmatrix} 2 & 0 \\ 0 & 2 \end{pmatrix}.$$
This is obviously positive define, thus $x=1,y=z=0$ is a strict local minimum.
Here is an alternative solution for the minima argument, not sure if this is correct though:
If I vary $y,z$ to be slightly different from zero: $y = \epsilon$, $z = \delta$ then x is given by $x = (1-\epsilon^3 -\delta^3)^{\frac{1}{3}}$. Now checking the distance: $ d= (1-\epsilon^3 -\delta^3)^{\frac{2}{3}} + \epsilon^2 +\delta^2$ tayor expanding the first term $d= 1 - \frac{2}{3}\epsilon^3 - \frac{2}{3}\delta^3 + \epsilon^2 +\delta^2 = 1 + \epsilon^2(1- \frac{2\epsilon}{3}) +\delta^2(1- \frac{2\delta}{3}) > 1$
similarly for just varying one component. Thus the points are indeed local minima.
For any point $ \mathbf{P} = (x, y, z) $, the distance to the origin is given by $ d(x, y, z) = \sqrt{x^2+y^2+z^2}$. This is what you wish to minimize, given the constraint $ g(x, y, z) = x^3+y^3+z^3 = 1$. Luckily, a man named Lagrange found a clever way to do this problem. You instead solve the equation $ \nabla d(x, y, z) = \lambda \nabla g(x, y, z) $, where $ \nabla g(x) = \langle g_x, g_y, g_z \rangle $. The $(x, y, z) $ solutions will give you your min/max values.
If we take $x=\rho\sin\theta,y=\rho\cos\theta\sin\phi,z=\rho\cos\theta\cos\phi$, then we have to find the minimum of $\rho$ under the constraint:
$$ \rho^3(\sin^3\theta+(\sin^3\phi+\cos^3\phi)\cos^3\theta)=1 $$ or, by switching to the dual problem, the maximum of: $$ f(\theta,\rho) = \sin^3\theta+(\sin^3\phi+\cos^3\phi)\cos^3\theta.$$ The stationary points of $f(\theta,\rho)$ are given by: $$ \left\{\begin{array}{rcl}\frac{\partial}{\partial \theta}\,f(\theta,\phi)=-3\cos\theta\sin\theta\left(-\sin\theta+\cos^3\phi\cos\theta+\cos\phi\cos^3\theta\right)&=&0\\\frac{\partial}{\partial \phi}\,f(\theta,\phi)=-3\cos\phi\sin\phi\left(-\sin\phi+\cos^3\phi\cos\theta+\cos\phi\cos^3\theta\right)&=&0\end{array}\right.$$ so, at least in principle, we can locate them. Anyway, since: $$ 1-\left(\cos^3 x+\sin^3 x\right) = 4\sin^2\left(\frac{\pi}{4}-\frac{x}{2}\right)\sin^2\left(\frac{x}{2}\right)\left(2+\sqrt{2}\sin\left(\frac{\pi}{4}+x\right)\right)\geq 0$$
$$ 1+\left(\cos^3 x+\sin^3 x\right) = 4\sin^2\left(\frac{\pi}{4}+\frac{x}{2}\right)\cos^2\left(\frac{x}{2}\right)\left(2-\sqrt{2}\sin\left(\frac{\pi}{4}+x\right)\right)\geq 0$$ the range of $g(x)=\sin^3 x+\cos^3 x$ is $[-1,1]$, so the maximum of $f(\theta,\phi)$ is one and the minimum of $\rho$ is $\color{red}{1}$, too. Obviously, it is attained at $(1,0,0),(0,1,0),(0,0,1)$.
For non-believers, here it is a picture of the unit sphere with our surface being a nice hat:
