I know that I'm trying to maximize/minimize $f(x,y)=x^2+y^2$ with the constraint $g(x,y)=x^2+xy+2y^2-1=0$
Here are the partial derivates:
$f_x=2x \qquad$
$f_y=2y \qquad$
$g_x=(2x+y)\lambda \qquad$
$g_y=(4y+x)\lambda$
Setting them up to solve:
$\frac{2x}{2y} = \frac{(2x+y)\lambda}{(4y+x)\lambda}$
Cancel $2$ on the left side and $\lambda$ on the right side and I get:
$\frac{x}{y} = \frac{(2x+y)}{(4y+x)}$
I am unable to solve further.
The book says that the answers are min: $0.6731$ and max: $1.1230$
Any help would be appreciated. Thanks!
Best Answer
Let $$d=\sqrt{x^2+y^2}$$ $$f(x,y)=x^2+y^2$$
$$g(x,y)=x^2+xy+2y^2-1=0$$ Using Lagrange Multiplier $$\frac{2x}{2x+y}=\frac{2y}{x+4y}=k$$
$$x(x+4y)=y(2x+y)$$$$\implies x^2+4xy=y^2+2xy$$ $$\implies x^2+2xy+y^2=y^2+y^2$$ $$\implies(x+y)^2=2y^2$$ $$x=y(-1\pm\sqrt2)$$
Note : I've added following part due to OP's unwillingness towards accepting answer
After solving we get solutions as $$(1.04,-0.43),(0.26,0.62),(-1.04,0.43),(-0.26,-0.62)$$
And As your book says we get following values
Here's image showing suck condition