# If $x^2+y^2+xy=1\;,$ Then minimum and maximum value of $x^3y+xy^3+4\;,$ where $x,y\in \mathbb{R}$

If $x,y\in \mathbb{R}$ and $x^2+y^2+xy=1\;,$ Then Minimum and Maximum value of $x^3y+xy^3+4$

$\bf{My\; Try::}$Given $$x^2+y^2+xy=1\Rightarrow x^2+y^2=1-xy\geq 0$$

So we get $$xy\leq 1\;\;\forall x\in \mathbb{R}$$

and $$x^2+y^2+xy=1\Rightarrow (x+y)^2=1+xy\geq0$$

So we get $$xy\geq -1\;\;\forall x\in \mathbb{R}$$

So we get $$-1\leq xy\leq 1$$

$$\displaystyle f(x,y) = xy(x^2+y^2)+4 = xy(1-xy)+4 = (xy)-(xy)^2+4 = -\left[(xy)^2-xy-4\right]$$

So $$\displaystyle f(x,y) = -\left[\left(xy-\frac{1}{2}\right)^2-\frac{17}{4}\right] = \frac{17}{4}-\left(xy-\frac{1}{2}\right)^2$$

So $$\displaystyle f(x,y)_{\bf{Min.}} = \frac{17}{4}-\left(-1-\frac{1}{2}\right)^2 = 2\;,$$ which is occur when $xy=-1$

But I did not understand how can i calculate $f(x,y)_{\bf{Max.}}$

Plz Help me, Thanks

• You're nearly there. Note that $a^2 \ge 0$ for all $a$. The smallest value of $(xy - 0.5)^2$ is then 0. Can $xy$ attain this? Oct 1, 2015 at 3:04
• thanks stochasticboy321 but wolframalpha show different answer.wolframalpha.com/input/… Oct 1, 2015 at 3:09
• Ah, sorry, didn't see that. The original solution had no points on the target ellipse :-/. Okay, now the closer $xy$ is to $0.5$, the lower the value. How close can $xy$ be to $0.5$? Assume it can be some $c$. This implies that $y = c/x$ if you feed this into the constraint $x^2 + xy + y^2 = 1$, this gives you a quadratic equation, which should have solutions. Can you go further from here? Oct 1, 2015 at 3:26
• Thanks stochasticboy321.. To Ekaveera Kumar Sharma actually $\bf{Max.}$ is wrong. Oct 1, 2015 at 4:09

You already showed that $$f(x,y) = xy(x^2+y^2)+4=xy(1-xy)+4,$$ which is a quadratic function in $xy$. It remains to find the exact range for $xy$. For which you showed that $xy\ge -1$, equality happens when $(x,y)=(1,-1)$ or $(x,y)=(-1,1)$.

The other restriction $xy\le1$, while correct, never reaches equality. Instead, note that $$xy\le \frac{x^2+y^2}2=\frac{1-xy}2.$$ So $xy\le \frac13$, equality happens when $x=y=\pm\frac1{\sqrt3}$.

Now, let $t=xy$, then $-1\le t\le \frac13$, and $$f =t-t^2+4.$$ Note that the derivative with respect to $t$ is $1-2t$ and is positive in the range $[-1,1/3]$. So $f_\min$ is at $t=-1$ and $f_\max$ is at $t=1/3$.

$$f(x,y) = \frac{17}{4} - (xy-\frac 12)^2$$

now let $\displaystyle xy=u$,

$x^2 + y^2 + xy = 1$ becomes $(x+y)^2 = 1+u$

Therefore $x,y$ are roots of the quadratic $k^2 \pm \sqrt(1+u) k + u = 0.$

If $x, y$ are real, discriminant is non negative, solving this gets $\displaystyle u\leq \frac{1}{3}$ therefore $\displaystyle xy\leq \frac{1}{3}.$

Minimum value of $f(x,y)$ occurs when $\displaystyle \left(xy-\frac{1}{2}\right)^2$ is minimum.

This occurs when $\displaystyle xy=\frac{1}{3}$ as shown above.

Therefore, max value $\displaystyle = \frac{17}{4} - \left(\frac{1}{3}-\frac{1}{2}\right)^2 = \frac{38}{9},$ which is what Wolfram Alpha says

• Thanks Rishi but wolframalpha show different answer.wolframalpha.com/input/… Oct 1, 2015 at 3:10
• Thanks for that @ juantheron. I see where my problem is. When xy=1/2, x and y turn out to be complex numbers. Oct 1, 2015 at 3:14