maximum and minimum value of $\frac{x^2+y^2}{x^2+xy+4y^2}$ 
If $x,y\in\mathbb{R}$ and $x^2+y^2>0.$ Then maximum and minimum value of $\displaystyle \frac{x^2+y^2}{x^2+xy+4y^2}$

Plan
Let $$K=\frac{x^2+y^2}{x^2+xy+4y^2}$$
$$Kx^2+Kxy+4Ky^2=x^2+y^2\Rightarrow (4K-1)y^2+Kxy+(K-1)x^2=0$$
put $y/x=t$ and equation is $(4K-1)t^2+Kt+(K-1)=0$
How do i solve it Help me plesse
 A: $K=\frac{1+t^2}{1+t+4t^2}$  To find min and max, set $K'(t)=0$ or $t^2-6t-1=0$ and solve for $t$. Answer $t=3\pm \sqrt{10}$ leading to max and min $K=\frac{20\pm 6\sqrt{10}}{80\pm 25\sqrt{10}}$. or $1.088303688022443$ and $0.245029645310883$
Corrected (stupid error in solving quadratic).
A: Let $v = (x,y)$,
$$
A = \begin{bmatrix} 1 & \frac{1}{2} \\ \frac{1}{2} & 4 \end{bmatrix}
$$
and define the Rayleigh cuocient.
$$
R_A(v) = \frac{v^T A v}{v^Tv}.
$$
Then, it is clear that
$$
\frac{x^2+y^2}{x^2+xy+4y^2} = \frac{1}{R_A(v)}.
$$
It is well-known (Linear Algebra result) that $\operatorname{min}_{v \neq 0} R_A(v) = \lambda_{\operatorname{min}}$ and $\operatorname{max}_{v \neq 0} R_A(v) = \lambda_{\operatorname{max}}$, where $\lambda_{\operatorname{min}}$ and $\lambda_{\operatorname{max}}$ are the smallest and largest eigenvalues of $A$, respectively.
In this case $\lambda_{\operatorname{min}} = \frac{1}{2} \left(5-\sqrt{10}\right)$ and $\lambda_{\operatorname{max}} = \frac{1}{2} \left(5+\sqrt{10}\right)$. Therefore,
$$
\min_{x,y\neq 0} \frac{x^2+y^2}{x^2+xy+4y^2} = \frac{1}{\max_{v\neq 0} R_A(v)} = \frac{1}{\frac{1}{2} \left(5+\sqrt{10}\right)} = \frac{2}{15}(5+\sqrt{10})
$$
and
$$
\max_{x,y\neq 0} \frac{x^2+y^2}{x^2+xy+4y^2} = \frac{1}{\min_{v\neq 0} R_A(v)} = \frac{1}{\frac{1}{2} \left(5-\sqrt{10}\right)} = \frac{2}{15}(5-\sqrt{10}).
$$
A: From the restriction $x^2+y^2>0$, we get that $x,y$ are not both zero.

If $x=0$, then $K={\large{\frac{1}{4}}}$.

Suppose $x\ne 0$.

Letting $t={\large{\frac{y}{x}}}$, and following your approach, we get
$$(4K-1)t^2+Kt+(K-1)=0$$
which has a real solution for $t$ if and only $K={\large{\frac{1}{4}}}$ or the discriminant
$$K^2-4(4K-1)(K-1)$$
is nonnegative.

Equivalently, either $K={\large{\frac{1}{4}}}$ or
$$-15K^2+20K-4\ge 0$$
With the restriction $K\ne{\large{\frac{1}{4}}}$, the quadratic inequality solves as
$$\frac{10-2\sqrt{10}}{15}\le K\le \frac{10+2\sqrt{10}}{15},\;\;K\ne{\large{\frac{1}{4}}}$$
Noting that 
$$\frac{10-2\sqrt{10}}{15}<\frac{1}{4}<\frac{10+2\sqrt{10}}{15}$$
it follows that 


*

*The minimum value of $K$ is ${\large{\frac{10-2\sqrt{10}}{15}}}\approx .2450296455$.$\\[8pt]$

*The maximum value of $K$ is ${\large{\frac{10+2\sqrt{10}}{15}}}\approx 1.088303688$.

