So I have a question which goes like : The number of real values that the function $\frac {x^2-3x+2}{x^2+x-6} $ can't take is ?
My attempt: So let us assume the given function equal to $y $ then we have $(y-1)x^2+x (y+3)-2 (3y+1)=0$ Now since $x$ is real, the discriminant of the above quadratic is greater than or equal to $0$. Applying that condition gives $(5y-2)^2 \ge 0$ which is true for all $y $. So according to this method this function is able to assume all real values.
But this is not the actual answer. If we graph the function, we observe that there is a missing point discontinuity at $x=2$ and the function tends to reach $1$ as $x $ tends to $\infty $ but it never equals $1$.
So my question is: why does the analytical method not work? Is there any other method besides graphing the function which can be used to answer the given question?
I want to know because we can easily observe these points in this particular question,but we might not be able to do so in case of some other crazy function. So I want to know the correct method for this if it exists.
Hint: for $x \ne 2$ we have $\frac {x^2-3x+2}{x^2+x-6}=\frac {x-1}{x+3}.$