Why D≥0 while finding the range of rational functions 
To find the range of a rational expression $f(x)=y$,
a) We first make a quadratic in $x$ in terms of $y$.
b) Make the discriminant $\Delta ≥ 0$
c) Solve the resulting inequality to get the range of $y$.

I am having trouble in the second step.
I searched online and this is the explanation I got:
For real values of $y$, the given equation has real roots. So $\Delta≥0$
But I don't find this convincing.
Say we had to find the range of $$y= f(x)=  \frac{x^2−3x−4 }{x^2−3x+4}$$
I can solve this question to this step:
$$(y−1)x^2−3(y−1)x+4(y+1)=0 $$

Can you please explain why $\Delta≥0$?

Don't solve the question entirely, just help me with this doubt.

First of all, for $a,b,c\in\mathbb R$ where $a\not=0$, 
$$ax^2+bx+c=0\tag1$$
can be written as
$$(\Delta=)\ b^2-4ac=\left(2ax+b\right)^2$$
Since $(2ax+b)^2\ge 0$ for $x\in\mathbb R$, we can see that
$$\text{$(1)$ has at least one real root $x$}\iff \Delta\ge 0\tag2$$
Now for your example, we have
$$\begin{align}y=f(x)=\frac{x^2-3x-4}{x^2-3x+4}&\iff y(x^2-3x+4)=x^2-3x-4\\&\iff (y-1)x^2-3(y-1)x+4(y+1)=0\tag3\end{align}$$
with $x^2-3x+4=(x-3/2)^2+7/4\gt 0$ and $y-1\not=0$. 
So, $(3)$ is a quadratic equation in $x$ in terms of $y$.
That $y=y_0$ is in the range of $y=f(x)$ means that there exists at least one $x=x_0$ such that $y_0=f(x_0)$. So, there exists at least one $x$ such that $y=f(x)$, i.e. $(3)$ for every $y$ in the range.
Hence, we want to find the condition that $(3)$ has at least one real root $x$. This is $\Delta\ge 0$ from $(2)$.
