$$y=\frac {x^2+ ax-2}{x-a}$$
I have been told that the range of the function is set of all real values then I am told to find the set of values of a.
My attempt:
$(x-a)y=x^2+ax-2$
$x^2+x(a-y)+ ay-2=0$
Now putting D>=0 as I have assumed x belonging to real
$a^2 +y^2-6ay+8 \ge 0$
Now this equation is quadratic in $y$ and is positive therefore this should have discriminant less than $0$ as the graph will lie above x axis as leading coeffecient is positive .I get :
$36a^2-32-4a^2 \le 0$
Using this I got the set of values of a to be $[-1,1]$ but the values of a is given by $(-1,1)$......where am I doing wrong