<s>[INST] bound on $\biggr\rvert \frac{x+2y-2}{x^2+y^2+1} \biggr\lvert $? Question: How to get a good bound on $\biggr\rvert \frac{x+2y-2}{x^2+y^2+1} \biggr\lvert $?
Context: I want to show that $\frac{x+2y-2}{x^2+y^2+1}$ attains maximum and minimum value on $\Bbb R^2$. So I need to find some compact set $K$ which contains the minimum and maximum, and show that on $\Bbb R^2 - K$ , the absolute value of the function is small.
Attempt:
$\biggr\rvert \frac{x+2y-2}{x^2+y^2+1} \biggr\lvert 
\leq \frac{|x+2y-2|}{x^2+y^2+1} \leq \frac{\sqrt{x^2+y^2}+2(\sqrt{x^2+y^2})-2}{x^2+y^2+1} \leq \frac{3\sqrt{x^2+y^2}-2}{x^2+y^2}
$
This is good enough to bound the function when $x^2+y^2$ is large, but is there a better way?
But I am not sure how to get rid of the $-2$ in the numerator.
 [/INST] For the upper bound observe
\begin{align}
c(x^2+y^2+1)-x-2y+2 =&\ c\left(x^2-\frac{1}{c}x\right)+c\left(y^2-\frac{2}{c}y\right)+(2+c)\\
=&\ c\left(x-\frac{1}{2c} \right)^2+c\left(y-\frac{1}{c} \right)^2+2+\frac{4c^2-5}{4c} \geq 0
\end{align}
for all $x, y$ iff 
\begin{align}
2+\frac{4c^2-5}{4c}=0 \ \ \Leftrightarrow \ \ c=\frac{1}{2}.
\end{align}
Hence it follows
\begin{align}
x+2y-2 \leq \frac{1}{2}(x^2+y^2+1)  \ \ \Longleftrightarrow \ \  \frac{x+2y-2}{x^2+y^2+1}\leq \frac{1}{2}
\end{align}
for all $x, y$. Maximum is attained when $(x, y) = (1, 2)$.  
For the lower bound, we consider
\begin{align}
c(x^2+y^2+1)-x-2y+2 =&\ c\left(x^2-\frac{1}{c}x\right)+c\left(y^2-\frac{2}{c}y\right)+(2+c)\\
=&\ c\left(x-\frac{1}{2c} \right)^2+c\left(y-\frac{1}{c} \right)^2+2+\frac{4c^2-5}{4c} \leq 0
\end{align}
which needs to hold for all $x, y$. In particular, the inequality has to hold when $x=\frac{1}{2c}$ and $y=\frac{1}{c}$. Hence
\begin{align}
2+\frac{4c^2-5}{4c}\leq 0
\end{align}
if $c \in (-\infty, -5/2]$. Hence
\begin{align}
-\frac{5}{2} \leq \frac{x+2y-2}{x^2+y^2+1}.
\end{align}
</s>