# Find Maximum and Minimum distance from origin to $f(x,y)$ using the Lagrange method.

"By using Lagrange's method, find the points on the curve $$10x^2 + 12xy + 10y^2 = 1$$ that are nearest and farthest from the origin."

I've used $$f(x,y) = x^2+y^2$$from the distance formula $$d$$ $$=$$ $$\sqrt{(x-x_1)^2+(y-y_1)^2}$$ $$F(x,y) = λ G (x,y)$$ where $$G$$ is the curve from the question.

And I've ended up with these 3 equations after partial derivating and etc.

1. $$2x = λ(20x+12y)$$

2. $$2y = λ(12x+20y)$$

3. $$10x^2 +12xy + 10y^2 -1 = 0$$

And from there I've solved for $$x$$ and ended up with $$x^2 = y^2$$ and $$x = \pm \sqrt{\frac{1}{32}}$$, which gives $$y = \pm \sqrt{\frac{1}{32}}$$.

But that only solves for the closest distance from origin and I can't figure out how to find the point furthest away and also how do I know which combinations of $$x,y$$ are valid?

You've done fine to conclude that $$x^2=y^2.$$ That means $$x=y$$ or that $$x=-y.$$ Plug each of those into your curve's equation. You should find four distinct points of two distinct distances from the origin.
Note that this method relies heavily on the AM-GM inequality,but you can connect it with your Lagrage Multiplier method to sort out the points that lie furthest from the origin. For the farthest, observe that $$(x+y)^2 \ge 0 \implies xy \ge -\dfrac{x^2+y^2}{2}\implies 1=10x^2+12xy + 10y^2 \ge 10(x^2+y^2)-6(x^2+y^2)=4(x^2+y^2)\implies x^2+y^2 \le \dfrac{1}{4}$$ with $$=$$ occurs at $$x+y = 0$$ or $$x = -y\implies 20x^2 - 12x^2 = 1\implies 8x^2 = 1\implies x = \pm \dfrac{1}{2\sqrt{2}}, y = \mp \dfrac{1}{2\sqrt{2}}$$. For the nearest, note that $$(x-y)^2 \ge 0 \implies 2xy \le x^2+y^2\implies 1 = 10(x^2+y^2)+12xy \le 10(x^2+y^2) +6(x^2+y^2)=16(x^2+y^2)\implies x^2+y^2 \ge \dfrac{1}{16}$$. $$=$$ occurs at $$x = y = \pm \dfrac{1}{4\sqrt{2}}$$.