<s>[INST] The maximum and minimum of a function How can I find the maximum and minimum of $$L=\sqrt{1-x^2}+\sqrt{1-y^2}+\sqrt{1-z^2},$$
given that $x^2+y^2+z^2=1$?
I worked on some basic algebra, but it doesn't get me anywhere, so I'm stuck on it.
 [/INST] By using lagrange multipliers $$ f(x,y,z) = \sqrt{1 - x^2} + \sqrt{1 - y^2} + \sqrt{1 -  z^2} $$ subject to $$ g(x,y,z) = x^2 + y^2 + z^2 - 1 = 0 $$
$$ F(x,y,z,\lambda) = f + \lambda g = \sqrt{1 - x^2} + \sqrt{1 - y^2} + \sqrt{1 -  z^2} + \lambda( x^2 + y^2 + z^2 - 1) $$
$$ F_x = \frac{-2x}{2\sqrt{1-x^2}} + 2\lambda x = 0 $$
$$ F_y = \frac{-2y}{2\sqrt{1-y^2}} + 2\lambda y = 0  $$
$$ F_z = \frac{-2z}{2\sqrt{1-z^2}} + 2\lambda z = 0  $$
$$ F_{\lambda} = x^2 + y^2 + z^2 - 1 = 0 $$
now solve this system of equations :-)
</s>