I need to find max and min (if they exist) of the following function: $f(x, y, z) = x^3+y^2+z^2$
On the set $C = \{(x, y, z) ∈ R^3: x^2+y^2+z^2\leq 1\}$
I have checked that the Lagrange theorem assumptions hold, so that I can find the critical points solving the following system
$3x^2-2x\lambda z=0$
$2y-2y\lambda=0$
$2z-2z\lambda=0$
$\lambda(x^2+y^2+z^2-1)=0$
$x^2+y^2+z^2\leq 1$
Then I found the critical points $x_1=(0,0,0)$, $x_2=(0,y,z)$ s.t. $y^2+z^2=1$, $x_3=(x,0,z)$ s.t $x^2+z^2=1$,$x_4=(x,y,0)$ s.t $x^2+y^2=1$. Clearly the constrain set is compact so that the function f has a min and max in it. However how do I evaluate the function f at $x_4=(x,y,0)$ s.t $x^2+y^2=1$ or $x_3=(x,0,z)$ s.t $x^2+z^2=1$?
You first look for critical points in the interior. This is not about Lagrange multipliers: you just look for the partial derivatives to be zero. That is, $$ 3x^2=0, \ \ 2y=0,\ \ \ 2z=0. $$ So the only critical point on the interior is $(0,0,0)$.
On the boundary, you apply Lagrange multipliers under the constraint $x^2+y^2+z^2=1$. You get the system $$ \begin{array} 3x^2=2\lambda x\\ 2y(1-\lambda)=0\\ 2z(1-\lambda)=0\\ x^2+y^2+z^2=1 \end{array} $$ We split in some cases
$x=0$. This satisfies the first equation. From the fourth one we get that at least one of $y,z$ is not zero; so $\lambda=1$ and all points $(0,y,z)$ with $y^2+z^2=1$.
$x\ne0$. The first equation is $3x=2\lambda$. This gives us subcases depending on $\lambda$:
$\lambda=1$. This gives $x=2/3$, and we are free two choose $y,z$ according to the fourth equation: so we have critical points $(\tfrac23,y,z)$ with $y^2+z^2=1-\tfrac49=\tfrac59$.
$\lambda\ne1$. This gives $y=z=0$, and so $x=\pm1$. Critical points $(\pm1,0,0)$.
Now you evaluate your function on the critical points:
$f(0,y,z)=y^2+z^2=1$ in the first case.
$f(\tfrac23,y,z)=\left(\tfrac23\right)^3+y^2+z^2=\left(\tfrac23\right)^3+\tfrac59=\tfrac{23}{27}$ in the second case.
$f(1,0,0)=1$, $f(-1,0,0)=-1$ in the last case.
The interior contributes $f(0,0,0)=0$. So the maximum is $1$ and the minimum is $-1$.