<s>[INST] Using Lagrange multiplier , find minimum value of $xy(x^2 + y^2) +4$ , given that $x^2 + y^2 +xy -1 = 0 , x,y \in \mathbb R$ Using Lagrange multiplier , find minimum value of $$f(x,y)=xy(x^2  + y^2) +4$$ , Given that $g(x,y)=x^2 + y^2 +xy -1 = 0 , $for all values of $  x,y \in \mathbb R$.
My attempt
So i formed a function $$F(x,y , \lambda ) = f(x,y) + {\lambda}g(x,y)  $$ , where $\lambda$ is the Lagrange multiplier .
I then solved the partial derivatives w.r.t $x,y$ and $\lambda$.
$${{\partial {F} } \over {\partial x}} = 3x^2 y + y^3 + 2x{ \lambda} + y{\lambda} = 0 
\space ....(1)$$
$${{\partial {F} } \over {\partial y}} = 3y^2 x + x^3 + 2y{ \lambda} + x{\lambda} = 0 
\space ....(2)$$
$${{\partial {F} } \over {\partial \lambda}} = x^2 + y^2 +xy -1 = 0  \space ....(3).$$
Solving equations (1) ,(2) and (3) , I got  $$xy = \frac12$$
Therefore , putting value of $xy$ in $x^2 + y^2 + xy -1 = 0$ I got $$x^2 + y^2 = \frac12$$.
And hence ,putting these value in $f(x,y)$  I got the value $$f_{min} (x,y) =\frac{17}{4}$$
However , this is not the correct answer , the correct answer is 2 . Please help me out and tell where am I going wrong  in the method . I know a trigonometric solution to this question , but I want a solution using Lagrange multipliers .
Any help is appreciated .
 [/INST] We should expect a high degree of symmetry in the solution points since both the function  $ \ F(x,y) \ = \ xy(x^2 + y^2) + 4 \ $ and the constraint (rotated) ellipse $ \ x^2 + y^2 +xy - 1 \ = \ 0 \ \ $ are unaltered by an "exchange" of the coordinate variables.  So we may anticipate extremal points of the form $ \ (\pm x \ , \ \pm x) \ \ $ and $ \ (\pm x \ , \ \mp x) \ \ . $
Another way to work with the Lagrange equations is to solve them for $ \ \lambda \ \ $ in order to "eliminate" it:
$$ 3x^2 y \ + \ y^3 \ \ = \ \  (2x \ + \ y)·\lambda \ \ \ , \ \ \  x^3 \ + \ 3xy^2 \ \ = \ \  (x \ + \ 2y)·\lambda  $$
$$ \Rightarrow \ \ \lambda \ \ = \ \ \frac{3x^2 y \ + \ y^3}{2x \ + \ y} \ \  = \ \ \frac{x^3 \ + \ 3xy^2}{x \ + \ 2y} \ \ $$
$$ \Rightarrow \ \ 3x^3 y \ + \ xy^3 \ + \ 6x^2 y^2 \ + \ 2y^4 \ \ = \ \ 2x^4 \ + \ 6x^2y^2   + \ x^3y \ + \ 3xy^3  $$
$$ \Rightarrow \ \   2x^4 \ - \ 2y^4 \  + \ 2xy^3 \ - \ 2x^3 y  \ \ = \ \ 0 \ \ \Rightarrow \ \ (x^2 \ + \  y^2)·(x^2 \ - \  y^2) \  + \  xy·(y^2 \ - \ x^2)  \ \ = \ \ 0 $$
$$ \Rightarrow \ \ (x^2 \ + \  y^2 \ - \ xy)·(x^2 \ - \  y^2)  \ \ = \ \ 0 \ \ . $$
So we are led to the relations $ \ x^2 + y^2 \ = \ xy \ \ $ or $ \ \ x^2 \ = \ y^2 \ \Rightarrow \ y \ = \ \pm x \ \ . $
On inserting the first of these into the constraint equation, we obtain (as you did) $ \ xy + xy = 1 \ \Rightarrow \ xy \ = \ \frac12 \ \ . $  However, this is deceptive:  when we attempt to determine which points on the constraint ellipse are so described, we find
$$ y \ = \ \frac{1}{2x} \ \ \Rightarrow \ \ x^2 \ + \ \frac{1}{4x^2} \ + \ \frac12 \ \ = \ \ 1 \ \ \Rightarrow \ \ 4x^4 \ - \ 2x^2 \ + \ 1 \ \ = \ \ 0 \ \ , $$
a biquadratic equation which proves to have no real solutions. [This corresponds to the "impossible" $ \ \lambda \ $ equation in user's answer.]
We do get meaningful results for the "diagonal" conditions
$ \mathbf{y \ = \ x \ \ :} \quad x^2 + x^2 + x^2 \ = \ 1 \ \ \Rightarrow \ \  x^2 \ = \ \frac13 \ \ \Rightarrow  \ \ x \ = \ y \ = \ \pm \frac{1}{\sqrt3} $
$$ \Rightarrow \ \ f \left(\pm \frac{1}{\sqrt3} \ , \ \pm \frac{1}{\sqrt3} \right) \ \ = \ \ \left(\pm \frac{1}{\sqrt3}\right)·\left(\pm \frac{1}{\sqrt3}\right) · \left( \frac{1}{ 3} \ + \ \frac{1}{ 3} \right) \ + \ 4 \ \ = \ \ \frac{1}{ 3}·   \frac{2}{ 3}   \ + \ 4 \ \ = \ \ \frac{38}{9} \ \ ;  $$
$ \mathbf{y \ = \ -x \ \ :} \quad x^2 + x^2 - x^2 \ = \ 1 \ \ \Rightarrow \ \  x^2 \ = \ 1 \ \ \Rightarrow  \ \ x \ = \ -y \ = \ \pm 1 $
$$ \Rightarrow \ \ f (\pm 1 \ , \ \mp 1 ) \ \ = \ \ (\pm 1)· (\mp 1) · ( 1 \ + \ 1  ) \ + \ 4 \ \ = \ \ (-  2)   \ + \ 4 \ \ = \ \ 2 \ \ .  $$
The graphs below present the geometrical situation for the problem, with the constraint ellipse in blue and the level-curves for $ \ f(x,y) \ $ in red. The (tangential) extremal points for the absolute maximum and absolute minimum of the function, respectively, are evident.  The orange curve in the graph below right represents $ \ xy \ = \ \frac12 \ \ , $ showing that there are no points (real solutions) on the constraint ellipse satisfying that condition.

</s>