Find $\max(x^2y+y^2z+z^2x+xyz)(x^2z+y^2x+z^2y+xyz),$ where $x+2y+3z=4.$ 
Let $x$, $y$ and $z$ be non-negative numbers such that $x+2y+3z=4.$ Find:
   $$\max(x^2y+y^2z+z^2x+xyz)(x^2z+y^2x+z^2y+xyz).$$

I took this problem here: https://dxdy.ru/topic18767-30.html a last post.
This problem is a similar to many contests problems.
On one of Canadians olimpiads was $x^2y+y^2z+z^2x\leq4$ for non-negatives $x$, $y$ and $z$ such that $x+y+z=3.$
Also, $x^2y+y^2z+z^2x+xyz\leq4$ with the same conditions.

My attempts: 

For $(x,y,z)=(2,1,0)$ we get a value $8$, which looks as a maximal value.
I solved this problem for $x=\min\{x,y,z\}$ and for $y=\min\{x,y,z\}$.
But for $z=\min\{x,y,z\}$ we need to prove that
$$(x+2y+3z)^6\geq512(x^2y+y^2z+z^2x+xyz)(x^2z+y^2x+z^2y+xyz),$$ which after substitution $x=z+u$, $y=z+v$ gives something very hard:
$$38464z^6+64(473u+1202v)z^5+16(447u^2+3068uv+4092v^2)z^4+$$
$$+32(7u^3+234u^2v+1044uv^2+952v^3)z^3+$$
$$+4(7u^4-200u^3v+808u^2v^2+3040uv^3+2032v^4)z^2+$$
$$+4(9u^5-38y^4v-152u^3v^2+208u^2v^3+592uv^4+288v^5)z+$$
$$+(u-2v)^2(u^4+16u^3v+120u^2v^2+64uv^3+16v^4)\geq0.$$
Thank you! 

Solution by Tran Quoc Anh.
We need to prove
$$8\left(a^{2} b+b^{2} c+c^{2} a+a b c\right)\left(a b^{2}+b c^{2}+c a^{2}+a b c\right) \leqslant \left(\frac{a+2 b+3 c}{2}\right)^{6} .$$
By the AM-GM inequality we have
$$ \text{LHS} \leqslant \left[a^{2} b+b^{2} c+c^{2} a+a b c+2\left(a b^{2}+b c^{2}+c a^{2}+a b c\right)\right]^{2}.$$
and
$$(a+2 b)(b+2 c)(c+2 a)=2\left[\left(a^{2} b+b^{2} c+c^{2} a\right)+2\left(a b^{2}+b c^{2}+c a^{2}\right)+3 a b c\right]+3 a b c$$
$$ \geqslant 2\left[\left(a^{2} b+b^{2} c+c^{2} a\right)+2\left(a b^{2}+b c^{2}+c a^{2}\right)+3 a b c\right],$$
and
$$\begin{aligned}
(a+2 b)(b+2 c)(c+2 a) &=\frac{1}{4} \cdot(a+2 b) \cdot 4(b+2 c) \cdot(c+2 a) \\
& \leq \frac{1}{4}\left[\frac{(a+2 b)+4(b+2 c)+(c+2 a)}{3}\right]^{3} \\
&=\frac{1}{4}(a+2 b+3 c)^{3}.\end{aligned}$$
Therefore
$$\left(a^{2} b+b^{2} c+c^{2} a\right)+2\left(a b^{2}+b c^{2}+c a^{2}\right)+3 a b c \leq \frac{1}{8}(a+2 b+3 c)^{3}.$$
The proof is completed.
