<s>[INST] Minimize $x + y + z$ subject to $x^2 + y^2 + z^2 \le 1$ and $x \ge 0$ I'm trying to solve this problem by KKT's condition:

$$\begin{align*}
\text{min} & \quad x + y + z \\
\text{s.t} & \quad x^2 + y^2 + z^2 &&\le 1 \\
           & \quad x &&\ge 0
\end{align*}$$

The linear independence constraint constraint qualification - LICQ is

The gradients of the active inequality constraints and the gradients of the equality constraints are linearly independent at $x^{*}$.

The Mangasarian-Fromovitz constraint qualification - MFCQ is

The gradients of the equality constraints are linearly independent at $x^{*}$ and there exists a vector $v \in \mathbb{R}^{n}$ such that $\langle \nabla g_{i}\left(x^{*}\right), v \rangle<0$ for all active inequality constraints and $\langle \nabla h_{j}\left(x^{*}\right), v\rangle=0$ for all equality constraints.

Could you please verify if I correctly apply the KKT's theorem? Thank you so much for your help!

$\textbf{My attempt:}$
Let $f = x + y + z$, $g_1 = x^2+y^2 + z^2-1$, $g_2 = -x$, and $$\mathcal K= \{(x,y,z) \in \mathbb R^3 \mid g_1(x,y,z) \le 0 \text{ and } g_2(x,y,z) \le 0\}$$
Because $\mathcal K$ is compact and $f$ is continuous, the problem has a solution.
Moreover, $\nabla f (x,y,z) = \begin{pmatrix} 1 \\ 1 \\ 1 \end{pmatrix}$, $\nabla g_1 (x,y,z) = \begin{pmatrix} 2x \\ 2y \\ 2z \end{pmatrix}$, and $\nabla g_2 (x,y,z) = \begin{pmatrix} -1 \\ 0 \\ 0 \\ \end{pmatrix}$. Consider the system $$\begin{cases}
 \mu_1 \nabla g_1 (x,y,z) + \mu_2 \nabla g_2 (x,y,z) &=0 \\
  g_1(x,y,z) &= 0\\
  g_2(x,y,z) &=0
\end{cases}
\iff 
\begin{cases}
 \mu_1  \begin{pmatrix} 2x \\ 2y \\ 2z \end{pmatrix} + \mu_2 \begin{pmatrix} -1\\ 0 \\ 0 \\ \end{pmatrix} &= \begin{pmatrix} 0\\ 0 \\ 0 \\ \end{pmatrix} \\
 x^2 + y^2 + z^2 &= 1\\
 -x   &= 0
\end{cases}$$
$$\iff \begin{cases}
x &= 0\\
\mu_2 &= 0 \\
\mu_1 y &= 0 \\
\mu_1 z &= 0\\
y^2+z^2   &= 1
\end{cases}
\implies
\mu_1 = \mu_2 = 0 
$$
Hence LICQ is satisfied. It follows from KKT's theorem that the solution satisfies
$$\begin{cases}
\mu_1,\mu_2 &\ge 0\\
\mu_1  g_1(x,y,z) &= 0\\
\mu_2  g_2(x,y,z) &=0 \\
\nabla f (x,y,z) + \mu_{1} \nabla  g_1(x,y,z) + \mu_{2} \nabla  g_2(x,y,z)&=0
\end{cases}
\iff
\begin{cases}
  \mu_1, \mu_2 &\ge 0\\
  \mu_1 (x^2+y^2 + z^2-1) &=0\\
  \mu_2 x   &= 0 \\
 \begin{pmatrix} 1 \\ 1 \\ 1 \end{pmatrix} +\mu_1  \begin{pmatrix} 2x \\ 2y \\ 2z \end{pmatrix} + \mu_2 \begin{pmatrix} -1\\ 0 \\ 0 \\ \end{pmatrix} &= \begin{pmatrix} 0\\ 0 \\ 0 \\ \end{pmatrix}
\end{cases}$$
$$\iff
\begin{cases}
  \mu_1, \mu_2 &\ge 0\\
  \mu_1 (x^2+y^2 + z^2-1) &=0\\
  \mu_2 x &=0 \\
  1+ 2 \mu_1 x   &= \mu_2 \\
  1+ 2 \mu_1 y  &=0 \\
  1+ 2 \mu_1 z  &=0
\end{cases}
\iff
\begin{cases}
  \mu_1 &> 0\\
  \mu_2 &\ge 0\\
  \mu_2 x &=0 \\
  x^2+y^2 + z^2   &= 1 \\
 1+ 2 \mu_1 x   &= \mu_2 \\
  1+ 2 \mu_1 y  &=0 \\
  1+ 2 \mu_1 z  &=0
\end{cases}$$
$$\iff\begin{cases}
  \mu_1 &= 1/\sqrt{2}\\
   \mu_2   &= 1 \\
  x &=0 \\
 y  &=-1/\sqrt{2} \\
 z  &=-1/\sqrt{2}
\end{cases} \qquad
\text{or} \qquad\begin{cases}
 \mu_1 &= \sqrt{3}/2 \\
 \mu_2 &= 0 \\
 x &= -1/\sqrt{3}  \\
 y &= -1/\sqrt{3} \\
 z &= -1/\sqrt{3}
\end{cases}$$
Comparing the values at these points, we get the solution is $(x,y,z) = (-1/\sqrt{3},-1/\sqrt{3},-1/\sqrt{3})$.
 [/INST] Alternate Solution :
$x^2 + y^2 + z^2 \le 1 $ represents a solid sphere of radius 1
Now, we need to find a point on sphere such that the value of $x+y+z$ is minimum
It is also given that, $x \ge 0 $ , So we need to only consider the 4 octants out of 8
Now, out of these 4 octants, a minimum occurs when both $y$ and $z$ are negative, so we need to consider only 5th octant. Since $y$ and $z$ are negative a minimum occurs on the surface of the sphere i.e $y^2 + z^2 = 1$
Since $y$ and $z$ are already chosen to be negative, all it remains is what values of x make the result minimum, it is simply at x = $0$
All we need to find is a point on the sphere such that $x = 0$, $y$ and $z$ are negative. It doesn't take a lot of work to think that it occurs simply at $y = z$
$\implies y^2 + y^2 = 1 \implies y = z = \frac{-1}{\sqrt{2}} $
So, we can conclude that a minimum occurs at $(0,\frac{-1}{\sqrt{2}}\frac{-1}{\sqrt{2}})$
and hence the minimum value is $-\sqrt{2}$
Hope this helps.
</s>