Finding the max/min value of a function with a given constraint

38 Views Asked by At

I have a function $$f(x,y,z)=x^3+y^3+z^3$$ and it is subjected to the constraint $$g(x,y,z)=x^2+y^2+z^2-25$$ I need to find the maximal and minimal values of this function (with this constraint) and this is what I have so far: $$\nabla f=(3x^2, 3y^2, 3z^2), \nabla g=(2x,2y,2z)$$ $$x(3x-2\gamma)=0 => x=0, x=\frac {2\gamma} {3}$$ $$y(3y-2\gamma)=0 => y=0, y=\frac {2\gamma} {3}$$ $$z(3z-2\gamma)=0 => z=0, z=\frac {2\gamma} {3}$$ and now I am not sure how to proceed because I know I should use the constraint and do $x^2+y^2+z^2=25$ but I am not sure how to use it in this case as $x,y,z$ may be equal 0, there are so many possibilities.. please help.