I have this assignment given to me with $f: \mathbb{R}^2 \rightarrow \mathbb{R}, \ f(x,y)=xy-y^2$ to find $f^{-1}([0,1])$.
I started by finding the edge cases for $x$ where $f(x,y)=0 \Leftrightarrow x = y$ and $f(x,y)=1 \Leftrightarrow x = \dfrac{1}{y}+y$. I end up with $y \leq x \leq \dfrac{1}{y}+y$.
I just do not know how to formulate the answer because I know that $f^{-1}([0,1])$ generates a set or an interval.
This question is related to another assignment where I have to prove (or disprove) its surjection.
We factor $f$ as $f(x,y)=(x-y)y$. Clearly if $y=0$, then $x$ can be anything. Pick $y\neq0$. Then $(x-y)$ must be between $0$ and $\frac{1}{y}$, so $x$ is between $y$ and $y+\frac{1}{y}$. We write this simply as $$f^{-1}([0,1])=\{(x,y)\in \mathbb{R}^2:0<y\leq x\leq y +\frac{1}{y}\}\cup \{(x,y)\in \mathbb{R}^2:0>y\geq x\geq y +\frac{1}{y}\}\cup\mathbb{R}\times\{0\}$$