Finding range of $y=\frac{2x^2+2x-4}{x^2+x}$ analytically (using discriminant) I am trying to find the range of the function
$$
y=\frac{2x^2+2x-4}{x^2+x}
$$
analytically using the discriminant trick (there's a somewhat helpful post here about that). Here's what I have so far:
\begin{align}
y=\frac{2x^2+2x-4}{x^2+x}
&\iff yx^2+yx=2x^2+2x-4\\[1em]
&\iff x^2(y-2)+x(y-2)+4=0\\[1em]
&\iff (y-2)^2-4(y-2)(4)\geq0\tag{$*$}\\[1em]
&\iff (y-2)(y-18)\geq0.
\end{align}
My temptation is to write that the range of the function is $(\infty,2]\cup[18,\infty)$, but the range is actually $(-\infty,2)\cup[18,\infty)$. How can I determine that from my work above? 
My thought was I do not have a strict inequality for $(*)$ above because my function can equal $0$. But I am confused as to how I am supposed to know that $2$ is not included in the range. The link posted above mentions how the discriminant will be zero at any max or min $y_0$, but I imagine the discriminant is not $0$ otherwise then? I realize $y=2$ is a horizontal asymptote for my function, but I also know one can easily cross a horizontal asymptote before "settling on it" as $x\to\pm\infty$. Can someone explain how to use my work above to determine the proper range as well as explain what is going on concerning max and min as they relate to the discriminant here? In retrospect, my reasoning for not using a strict inequality in $(*)$ seems flawed--it seems like it has more to do with the presence or absence of a max or min perhaps? 
 A: 
$x^2(y-2)+x(y-2)+4=0\iff (y-2)^2-4(y-2)(4)\geq0$

This way of writing is not good for your understanding. 
Adding some words should help you understand the point as the following : 
$y=Y$ is in the range of $y=\frac{2x^2+2x-4}{x^2+x}$
$\iff $ There is at least one real $x$ such that $$Y=\frac{2x^2+2x-4}{x^2+x}$$
$\iff $ There is at least one real $x$ such that $x^2+x\not=0$ and $$Y(x^2+x)=2(x^2+x)-4\tag1$$
(note here that $x$ satisfying $x^2+x=0$ are not solutions of $(1)$, so...)
$\iff $ There is at least one real $x$ such that $$(Y-2)x^2+(Y-2)x+4=0\tag2$$
(Looking at the coefficient of $x^2$, we see that, for $Y=2$, there is no real $x$ satisfying $(2)$. So, we have $Y\not=2$ from which we see that $(2)$ is a quadratic equation on $x$, so...)
$\iff $ $Y\not=2$, and the quadratic equation $(2)$ has at least one real solution.
$\iff Y\not=2$, and $(Y-2)^2-4\times (Y-2)\times 4\ge 0$
$\iff Y\in (-\infty,2)\cup [18,\infty)$
A: If $y=2$ we don't have quadratic equation but linear. And it is also easy to see that equation $$ \frac{2x^2+2x-4}{x^2+x} =2$$ doesn't have a solution. 
One more similar problem: $$ y=\frac{2x^2+2x-4}{-2x^2+x} $$
You get $$2(y+1)x^2 +x(2-y)-4=0$$ 
If you want to calculate discriminant then $y\ne -1$. Yet this doesn't mean that $-1$ is not in a range. Then proceed like before. Note that boundary values you get for $y$ (in previous case 2 and 18) are only candidates for local extrem values.    
