<s>[INST] Range of $\frac{x-y}{1+x^2+y^2}=f(x,y)$ I have a function $\frac{x-y}{1+x^2+y^2}=f(x,y)$. And, I want to find the range of it. I analyzed this function by plotting it on a graph and found interesting things. Like if the level curve is $0=f(x,y)$, then I get $y=x$ which is a linear function. But if the level curve is something not 0, then the level curve becomes a circle. And for big values of level curves, the circle disappears. Is there something I can use to find the range of this function?
 [/INST] Let $k\in\mathbb{R}$. It is enough to find the $(x,y)$ in the domain of $f$ (all $\mathbb{R}^2$) for which the equality is true
$$\frac{x-y}{1+x^2+y^2}=k$$
It is clear that the equality is true when $k=0$ (in this case $\frac{x-y}{1+x^2+y^2}=0\Longleftrightarrow x-y=0\Longleftrightarrow x=y$). Suppose that $ k\neq 0$. Then
\begin{align}
\frac{x-y}{1+x^2+y^2}=k &\Longleftrightarrow x-y= k(1+x^2+y^2)\\ &\Longleftrightarrow x-y=k+kx^2+ky^2\\&\Longleftrightarrow kx^2+ky^2-x+y=-k \\&\Longleftrightarrow (kx^2-x)+(ky^2+y)=-k\\&\Longleftrightarrow k\left(x^2-\frac{x}{k}\right)+k\left(y^2+\frac{y}{k}\right)=-k\\&\Longleftrightarrow k\left(x^2-\frac{x}{k}+\frac{1}{4k^2}-\frac{1}{4k^2}\right)+k\left(y^2+\frac{y}{k}+\frac{1}{4k^2}-\frac{1}{4k^2}\right)=-k\\&\Longleftrightarrow k\left(x^2-\frac{x}{k}+\frac{1}{4k^2}\right)-\frac{1}{4k}+k\left(y^2+\frac{y}{k}+\frac{1}{4k^2}\right)-\frac{1}{4k}=-k\\& \Longleftrightarrow k\left(x-\frac{1}{2k}\right)^2+k\left(y+\frac{1}{2k}\right)^2=-k+\frac{1}{4k}+\frac{1}{4k}\\& \Longleftrightarrow k\left(x-\frac{1}{2k}\right)^2+k\left(y+\frac{1}{2k}\right)^2=\frac{1-2k^2}{2k}\\& \Longleftrightarrow \left(x-\frac{1}{2k}\right)^2+\left(y+\frac{1}{2k}\right)^2=\frac{1-2k^2}{2k^2}
\end{align}
since the left side of this equality is the sum of two squares, it makes sense if and only if \begin{align}
\frac{1-2k^2}{2k^2}\geq 0 & \Longleftrightarrow 1-2k^2\geq 0 \\& \Longleftrightarrow  1\geq 2k^2 \\& \Longleftrightarrow \frac{1}{2}\geq k^2 \\& \Longleftrightarrow |k|\leq \frac{1}{\sqrt{2}}.
\end{align}
It is concluded that the range of $ f $ is $\left[-\frac{1}{\sqrt{2}},\frac{1}{\sqrt{2}}\right].$
</s>