$\left(a-\frac{1}{r^2}\right)\left(b-\frac{1}{r^2}\right)=h^2$ 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?

Let $M=\begin{pmatrix}a & h \\ h & b\end{pmatrix}$ and $v=(x,y)^T$. Assume that $M$ is positive definite, i.e. $a>0$ and $ab>h^2$.
We are looking for the minimum and maximum of $v^T v$ under the constraint $v^T M v = 1$, so, by the spectral theorem, we just need to find the eigenvalues of $M$. Since the characteristic polynomial of $M$ is $p(\lambda)=(a-\lambda)(b-\lambda)-h^2$, the claim follows. 
