Proof of quadratic inequality using AM-GM Proof of quadratic inequality using AM-GM

we have to show that $$x^2y^2+x^2+y^2+4-6xy\geq 0$$ dividing by $x^2+1$ gives
$$y^2-\frac{6xy}{x^2+1}+\frac{4+x^2}{x^2+1}\geq 0$$ this is equivalent to
$$\left(y-\frac{3x}{x^2+1}\right)^2+\frac{(4+x^2)(x^2+1)-9x^2}{(x^2+1)^2}\geq 0$$
and this is equivalent to $$\left(y-\frac{3x}{x^2+1}\right)^{ 2 }+\frac{(x^2-2)^2}{(x^2+1)^2}\geq 0$$
which is true.
