I am trying to solve the below problem in pre-calculus, I give below the steps I followed , I am stuck as it gets very complicated , need help in solution.
A function $f : \mathbb R \to \mathbb R$ is defined by $$f(x) = \frac{kx^2+6x-8}{k+6x-8x^2}.$$ Find the intervals of values of $k$ such that $f$ is onto. The answer given in the book is $2 \leq k \leq14$.
I started by trying to find the range of the function and find the values of k such that the range is = $\mathbb R$ ( that is range = co domain , in this case co domain is $\mathbb R$ and hence has to prove that range = $\mathbb R$)
Let $$y = \frac{kx^2+6x-8}{k+6x-8x^2}$$ Rearranging and grouping gives $$(k+8y)x^2 + 6(1-y)x - (8+ky) = 0.$$ This is quadratic in $x$ and for $x$ to be real $det(x) \geq 0$, which requires $$36(1-y)^2+4(k+8y)(8+ky) \geq 0.$$
Rearranging and grouping this equation gives $$(36+32k)y^2+(4k^2+184)y+(36+32k) \geq 0.$$ Now I have to find the range of values of $k$ such that the above expression is $\geq 0$. Totally stuck here. Please help. Also, is there any other easier way of arriving at the range of $k$ ?