<s>[INST] Find the maximum and minimum value of $2x^2 + y^2 + z^2$ subject to $x + y + z = 10$. I am working on inequality problems for mathematical olympiads. I have come across this problem:

Find the maximum and minimum value of $2x^2 + y^2 + z^2$ subject to $x + y + z = 10$, with $x,y,z \ge 0 $

I found the minimum using Cauchy-Schwarz: $$100 = \left(\frac 1 {\sqrt 2} \left(\sqrt 2 x\right) + y + z\right)^2 \le \left(\left(1/\sqrt 2\right)^2 + 1^2 + 1^2\right) \left(\left(\sqrt 2 x\right)^2 + y^2 + z^2\right)=2.5\left(2x^2 + y^2 + z^2\right)$$
so $2x^2 + y^2 + z^2 \ge 40$ with equality if $x=2$ and $y=z=4$.
I am not sure how to find the maximum though. Could I have a hint? Ideally I would like to do it without using calculus, though if it is easy to do with calculus feel free to share the method.
 [/INST] For a calculus-based method that delivers both solutions, you want a Lagrange multiplier. Let: \begin{align*}f\left(x,y,z\right) &= 2x^2 + y^2 + z^2 \\ g\left(x,y,z\right) &= x + y + z - 10\end{align*} The condition for an extremum is $$\vec{\nabla} f\left(x,y,z\right) = \lambda \vec{\nabla} g\left(x,y,z\right)$$ Calculating this out, we have a system with four equations and four unknowns: \begin{align*}4x &= \lambda \\ 2y &= \lambda \\ 2z &= \lambda \\ 0 &= x+y+z-10\end{align*}
Solving for $\lambda$ first is easiest: $$0 = \frac{\lambda}{4} + \frac{\lambda}{2} + \frac{\lambda}{2} - 10 \hspace{2.00cm} \rightarrow \hspace{2.00cm} \lambda = 8$$ With $\lambda=8$ figured out, we know one extreme point to be: $$x = 2  \hspace{2.54cm} y = 4 \hspace{2.54cm} z = 4$$

So what about the maximum? The best hint, which undoubtedly drives the other solutions to this, is the factor of $2$ in front of $x^2$, meaning this term grows faster than its counterparts. It only makes sense to try $y=z=0$, so that $x=10$ is evident from inspection. This makes the whole $\lambda$-apparatus somewhat useless, but at least the form is there in case the problem was trickier than it looked.
</s>