Find the maximum value of $x^2y$ given constraints Find the maximum value of $${ x }^{ 2 }y$$ subject to the constraint $$x+y+\sqrt { 2{ x }^{ 2 }+2xy+3{ y }^{ 2 } } =k$$ where k is a constant.
I tried it by substituting value of x and then differentiating w.r.t $x$ but not able to proceed further.

$$g(x,y)=x+y+\sqrt { 2{ x }^{ 2 }+2xy+3{ y }^{ 2 } }= x+y + Q(x,y) = k \tag1$$
for the object function
$$f(x,y)=x^2y $$
By Lagrange multiplier method
$$\dfrac{g_x}{g_y}= \dfrac{f_x}{f_y} $$
$$\dfrac{2y}{x}=1+\dfrac{(4x+2y)}{2Q}=1+\dfrac{(2x+6y)}{2Q}$$
simplifying
$$Q(2y-x)= 2x^2-xy-6y^2$$
has a common factor $ (2y-x)$ to cancel
$$=(x-2y)(2x+3y)\rightarrow Q=(2x+3y)$$
Squaring
$$ Q^2=4x^2+12 x y+9y^2=2x^2+10 xy+6y^2$$
simplifying to find roots of quadratic
$$x^2+5 x y+3 y^2=0;\quad  \dfrac{y}{x}=\dfrac{-5\pm \sqrt{13}}{6}; $$
which are a pair of straight lines.
If $(p,q)$ are these roots say $ y=px,\;y=qx\;$  Plug in the first of two roots into (1)
$$ k = x( 1+p+ \sqrt{2+2p+3p^2}) =C x\;$$ say, then the maximum value is
$$x^2y=x^3\cdot\dfrac{y}{x}=p  k^3/C^3=\dfrac{pk^3}{( 1+p+ \sqrt{2+2p+3p^2})^3}$$
where
$$p=\dfrac{\sqrt{13}-5}{6}$$
The minimum value can be found by $y=qx$ in a similar fashion.
