<s>[INST] If $x+2y+3z=10$ find the maximum value of $x^2y^2z^6$. If $x+2y+3z=10$ where x,y,z are postive real numbers, find the maximum value of $x^2y^2z^6$.
I started by trying to find some integer solutions. The first thing I found was $(x,y,z)=(1,3,1)$. But the value of $x^2y^2z^6$ was way too small (it was a multiple choice question in the paper I was solving).
The next thing I tried was setting $x=y=z$ because I thought the product of numbers would be highest if they were equal. And I got $x=y=z=\frac{5}{3}$. And so I got $x^2y^2z^6 = (\frac{5}{3})^{10}$
But this answer seems very weird and even my logic is not right, I merely went by intuition.
Please help me solve this.
 [/INST] I presume $x,y,z$ are non-negative integers. Otherwise, if they are allowed to be negative, we may choose their magnitude to be arbitrarily large.
Write : \begin{align*}
10 &= x + 2y + 3z\\
&= \frac{x}{2} + \frac{x}{2} + y + y + \frac{z}{2} + \frac{z}{2} + \frac{z}{2} + \frac{z}{2} + \frac{z}{2} + \frac{z}{2}\\
&\geqslant 10\cdot\sqrt[10]{\frac{x}{2} \cdot \frac{x}{2} \cdot y \cdot y \cdot \frac{z}{2} \cdot \frac{z}{2} \cdot \frac{z}{2} \cdot \frac{z}{2} \cdot \frac{z}{2} \cdot \frac{z}{2}}\\
&= 10 \cdot \sqrt[10]{\frac{x^2y^2z^6}{2^8}}\\
\end{align*}
We have used simple AM-GM in the first inequality step. Thus, $x^2y^2z^6 \leqslant 2^8 = 256$ , i.e. its maximum possible value is $256$.

The maximum value is attained when : $$\frac{x}{2}=y=\frac{z}{2}\quad\implies\quad x=2y=z\quad\implies\quad (x,y,z) = (2,1,2)$$
</s>