If $xyz=32$, find the minimal value of If $xyz=32;x,y,z>0$, find the minimal value of $f(x,y,z)=x^2+4xy+4y^2+2z^2$
I tried to do by $A.M.\geq M.G.$:
$\frac{x^2+4y^2+2z^2}{2}\geq\sqrt{8x^2y^2z^2}\to x^2+4y^2+2z^2\geq32$
But how can I maximaze 4xy?
 A: Your application of AM-GM is wrong. The statement for AM-GM states that for positive integers $a_1, a_2, \dots, a_n$:
$$\frac{a_1 + a_2 + \dots + a_n}{n} \geq \sqrt[n]{a_1a_2\dots a_n}$$
with equality at $a_1 = a_2 = \dots = a_n$. Observe that
$$\frac{x^2+2xy+2xy+4y^2+z^2+z^2}{6} \geq \sqrt[6]{16x^4y^4z^4} = 16 \implies x^2 + 4xy + 4y^2 + 2z^2 \geq 96.$$
Equality occurs when $x^2 = 2xy = 4y^2 = z^2 \implies (x,y,z)=(4,2,4)$.
A: $$\dfrac{a\cdot\dfrac{x^2}a+b\cdot\dfrac{4xy}b+c\cdot\dfrac{4y^2}c+d\cdot\dfrac{2z^2}d}{a+b+c+d}$$
$$\ge\sqrt[a+b+c+d]{\left(\dfrac{x^2}a\right)^a\left(\dfrac{4xy}b\right)^b\left(\dfrac{4y^2}c\right)^c\left(\dfrac{2z^2}d\right)^d}$$
$\left(\dfrac{x^2}a\right)^a\left(\dfrac{4xy}b\right)^b\left(\dfrac{4y^2}c\right)^c\left(\dfrac{2z^2}d\right)^d=\dfrac{x^{2a+b}y^{b+2c}z^{2d}}{\cdots}$
Set $2d=b+2c=2a+b=4$
WLOG $b=2, 2a=2c=4-b=?$
A: The  Alexey Burdin's hint gives the following substitution.
Let $x=4a$, $y=2b$ and $z=4c$.
Thus, $abc=1$ and by AM-GM we obtain:
$$x^2+4xy+4y^2+2z^2=16a^2+32ab+16b^2+32c^2=$$
$$=16(a^2+2ab+b^2+2c^2)\geq16\cdot6\sqrt[6]{a^4b^4c^4}=96.$$
The equality occurs for $a=b=c=1,$ which says that we got a minimal value.
