1. ## Correct but backwards?

I'm trying to find the points on $x^2+8xy+7y^2=225$ which are nearest the origin.

Let:

$D^2=f(x,y)=x^2+y^2$

$g(x,y)=x^2+8xy+7y^2-225=0$

So:

$f_x+\lambda g_x=0\Longrightarrow 2x+\lambda(2x+8y)=0 \Longrightarrow \lambda = -\frac{x}{x+4y}$

$f_y+\lambda g_y=0\Longrightarrow 2y+\lambda(8x+14y)=0 \Longrightarrow \lambda = -\frac{y}{4x+7y}$

Hence:

$\frac{x}{x+4y}=\frac{y}{4x+7y} \Longrightarrow 4x^2+6xy-4y^2=0 \Longrightarrow (x+2y)(2x-y)=0$

Which yields: $x=-2y,y=2x$

Inserting x=-2y into g(x,y) gives imaginary solutions which are ignored.

Inserting y=2x into g(x,y):

$x^2+16x^2+28x^2=225 \Longrightarrow x=\pm \sqrt 5$

So the solutions are $(\sqrt 5, 2\sqrt 5), (-\sqrt 5, -2\sqrt 5)$

The problem is when I look at the graph the solutions seem to be:

$(2\sqrt 5, \sqrt 5), (-2\sqrt 5, -\sqrt 5)$

Any ideas?