After fining the image of a function, why is it required to test if the image yields the domain?

16 Views Asked by At

I need to find the image of a function $f:\mathbb{R}\backslash ${1}$\rightarrow \mathbb{R}$ $f(x)=\frac{1}{x-1}$. We can start by looking at the outputs of a function when considering all $x\in \mathbb{R}\backslash ${1}. We can conclude the function will span $\mathbb{R}\backslash${0}. We can say we now have the image of the function but my textbook goes a step further doing next steps:
We take an arbitrary $y\in \mathbb{R}\backslash${0} and find the solution to the the equation $x=1+\frac{1}{y}$. The calculated $x$ exists for all $y\in \mathbb{R}\backslash${0} and $x\in \mathbb{R}\backslash${1} holds.
Why do we need to, after we have found the image, express $x$ in terms of $y$? This step seems to be some kind of test see that inputting values of a function image in $y$ yields $x$ which are a part of the domain, but why would we even need to test this in the first place since we found the image by only inputting $x$ which are part of the domain? Can you give me an example where we could somehow find the "worng" image?