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.
 A: 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\,$.
A: After substitution $y=3-x$ we get:
$$M=-11x^4+66x^3-139x^2+120x$$
$$M'(x)=2(3-2x)(11x^2-33x+20),$$
which gives a maximal value $\frac{400}{11}$ for $x=\frac{3+\sqrt{\frac{19}{11}}}{2}$.
A: $x^{4}y+x^{3}y+x^{2}y+xy+xy^{2}+xy^{3}+xy^{4}=xy+xy(x+y)+xy(x^{2}+y^{2})+xy(x^{3}+y^{3})=xy+3xy+xy((x+y)^{2}-2xy)+xy((x+y)^{3}-3x^{2}y-3xy^{2})=4xy+xy(9-2xy)+xy(27-3xy(x+y))=13xy-2(xy)^{2}+xy(27-9xy)=40xy-11(xy)^{2}.$
Now take $xy=k$ and you have $k\leq \frac{9}{4}$. Now our expression is $40k-11k^{2}$. Using derivative calculate $k$ such that the expression is maximum and check that the value of $k$ is less than $\frac{9}{4}$
