<s>[INST] Find integer part of the maximum value of $x^4y+x^3y+x^2y+xy+xy^2+xy^3+xy^4$ for $x+y=3$ 
If $M$ is the maximum value of $x^4y+x^3y+x^2y+xy+xy^2+xy^3+xy^4$. Subject to $x+y=3$. Find the value of $\lfloor M \rfloor$.

I think the maximum of $M$ occurred when $x=y=3/2$. And I just put the value of that in M and found 34. What is the original answer with good solution ?? Somebody please help me.
 [/INST] Extended hint:  let $s=x+y, \,p=xy\,$, then $\,x^2+y^2=s^2-2p, \;x^3+y^3=s^3-3sp\,$ so:
$$
\begin{align}
x^4y+x^3y+x^2y+xy+xy^2+xy^3+xy^4 &= xy(x^3+x^2+x+1+y+y^2+y^3) \\
 &= xy(1+x+y+x^2+y^2+x^3+y^3) \\
 &= p(1+s+s^2-2p+s^3-3sp) \\
 &= p(40-11p)
\end{align}
$$
The maximum value is attained for $p=\cfrac{20}{11}\,$ and equals $\cfrac{400}{11}\,$, corresponding to the $x,y$ which are the roots of $z^2 - s z + p = 0  \;\iff\;z^2 - 3z + \cfrac{20}{11} = 0\,$.
</s>