Find the minimum value of x^2+y^2+z^2 when x+y+z=3a^2.
The quickest way to do this is by geometry. The question is asking about the point in the plane x+y+z=3a^2 that is closest to the origin. More precisely, you want the square of this minimum distance. It's easy enough to see that the minimum occurs when x=y=z=a^2. So the minimum value of x^2+y^2+z^2 is 3a^4.
Construct $\displaystyle L = x^2 + y^2 + z^2 + \lambda (x + y + z - 3a^2)$.
Calculate the partial derivatives with respect to x, y, z and $\displaystyle \lambda$ and solve the following four equations simultaneously:
$\displaystyle \frac{\partial L}{\partial x} = 0$ .... (1)
$\displaystyle \frac{\partial L}{\partial y} = 0$ .... (2)
$\displaystyle \frac{\partial L}{\partial z} = 0$ .... (3)
$\displaystyle \frac{\partial L}{\partial \lambda} = 0 \Rightarrow x + y + z = 3a^2$ .... (4)