If $ax^2+2h xy+by^2=1$,prove that the maximum and minimum values of $x^2+y^2$ are given by the values of $r^2$ satisfying the relation
$\left(a-\frac{1}{r^2}\right)\left(b-\frac{1}{r^2}\right)=h^2$
For finding out the minimum and maximum values of an expression,we need to differenriate it but here $ax^2+2h xy+by^2=1$,in this equation we have 2 variables,Do i need to partial differentiate it or there is some other method to solve this question?
HINT: consider the function $$f(x,y,\lambda)=x^2+y^2+\lambda(ax^2+2hxy+by^2-1)$$ and solve the system $$f_x=0$$ $$f_y=0$$ $$f_{\lambda}=0$$