supremum of $x^2y^2(x^2+y^2)$ on $S=\{(x,y)\in \mathbb{R}^2 : x>0, y>0 : x+y=2n\}$ Question is to find :
supremum of $x^2y^2(x^2+y^2)$ on $S=\{(x,y)\in \mathbb{R}^2 : x>0, y>0 : x+y=2n\}$
Options for this are :


*

*$3n^6$

*$2n^6$

*$4n^6$

*$n^6$


by choosing $x=y=n$ I could see that $x^2y^2(x^2+y^2)=n^4(2n^2)=2n^6$
So, supremum can not be $n^6$. So, i can neglect option $n^6$.
I could not think of a better choice to find supremum.
I tried considering $\frac{df}{dx}=0$ and $\frac{df}{dy}=0$ considering $f(x,y)=x^2y^2(x^2+y^2)$ but that is not helping much as i need to be take care of the condition $x+y=2n$ also...
I tried taking conditional extremum but it is also not giving much.
$\phi (x,y,\lambda)=x^2y^2(x^2+y^2)+\lambda(x+y-2n)$
we have $\frac{d\phi (x,y,\lambda)}{dx}=0,\frac{d\phi (x,y,\lambda)}{dy}=0$ with condition $x+y=2n$ 
this is also giving nothing.
I would be thankful if some one can suggest me a way to clear this.
Thank you :)
 A: Are you not supposed to solve the mathematical question itself rather than try to guess the correct answer by elimination and using the knowledge that all are wrong except one? In the present case, $x=nu$ and $y=n(2-u)$ for some $u$ in $(0,2)$ and the goal is to maximize $x^2y^2(x^2+y^2)=n^6a(u)$ with $$a(u)=u^2(2-u)^2(u^2+(2-u)^2),
$$
thus it suffices to compute the maximal value of $a$ on $(0,1)$. The logarithmic derivative of $a$ is
$$
\frac{a'(u)}{a(u)}=\frac2u-\frac2{2-u}+\frac{2u-2(2-u)}{u^2+(2-u)^2}=4(1-u)\left(\frac1{u(2-u)}-\frac1{u^2+(2-u)^2}\right).
$$ 
The parenthesis is always positive hence $a'(u)$ has the sign of $1-u$. In particular, $a(u)$ is maximal at $u=1$ and $a(1)=2$ hence the maximum of $x^2y^2(x^2+y^2)$ on $S$ is $2n^6$.
A: Well, if $f(x,y) = x^2 y^2 (x^2+y^2)$, then since $f(0,y) = f(x,0) = 0$, the problem can be written as $\max \{ f(x,y) | x\ge 0, y \ge 0, x+y = 2n \}$. Since
the constraint set is compact, there is a maximum (and the maximum does not occur at either $x=0$ or $y=0$).
It is easy to see that the problem is equivalent to $\max [( f(x,2n-x) | x \ge 0, x \le 2n \}$.
Letting $\phi(x) = f(x,2n-x)$, we get $\phi'(x) = 4x (x-2n) (x-n) \left( 3\,{x}^{2}-6\,n\,x+4\,{n}^{2}\right)$.
Since $\phi(0) = \phi(2n) = 0$, we can ignore those. Since $3\,{x}^{2}-6\,n\,x+4\,{n}^{2}$ has no real roots, this just leaves $x=n$. Hence the maximizer is $(n,n)$, and the value is $f(n,n) = 2 n^6$.
