Supremum of $x^2y^2(x^2+y^2)$ Let $S$ be the set of all tuples $(x, y) $ with $x, y$ non-negative real numbers satisfying $x+y=2n$,for a fixed $n\in \Bbb{N} $. Then the supremum value of $x^2y^2(x^2+y^2)$ on the set $S$ is

*

*$3n^2$

*$2n^6$

*$4n^6$

*$n^6$
My thinking : take $f(x, y) =x^2y^2(x^2+y^2)$ then express $f(x, y) $ as a function of $x$ by putting $y=2n-x$. Then applying calculus we can find the maximum for some value of $x$.
But calculation will be cumbersome. Is there any smart way?
Thanks in advance.

This is a good opportunity to use Lagrange's multipliers method:
Let $g(x,y)=x+y-2n$. We have
$$\nabla g=\langle 1,1\rangle \textrm{ and }\nabla f = \langle 2xy^2(y^2+2x^2), 2yx^2(x^2+2y^2)\rangle$$
At a maximum, $\nabla f$ and $\nabla g$ are parallel, so $xy^2(y^2+2x^2)=yx^2(x^2+2y^2)$. If $x=0$ or $y=0$, we have $f(x,y)=0$, which his the minimum value, so we can assume that $x\neq 0$ and $y\neq 0$. Therefore,
$$ y(y^2+2x^2)=x(x^2+2y^2) \iff y^3+2yx^2=x^3+ 2xy^2 \iff y^3-x^3=2xy^2-2yx^2$$
so $$ (y-x)(y^2+xy+y^2)=2xy(y-x)$$
This means that $x=y$ or $y^2+x^2-xy=0 \iff (y-\frac{x}{2})^2+\frac{3}{4}x^2=0 \iff x=y=0$, which we excluded.
Therefore, $x=y$ at the maximum, so $(x,y)=(n,n)$. Substituting, the maximum value is $f(n,n)=2n^6$.
Note: to be totally rigorous, Lagrange's method only says that, if the maximum value exists, then $\nabla f$ and $\nabla g$ are parallel at the maximum. The maximum actually exists here because $\{ (x,y) | x\ge 0, y\ge 0, x+y=2n \}$ is compact.
