<s>[INST] Find the limits between which $a$ must lie in order that $\frac{ax^2-7x+5}{5x^2-7x+a}$ can take all real values Find the limits between which $a$ must lie in order that $$\frac{ax^2-7x+5}{5x^2-7x+a}$$ may be capable of taking all real values for all possible real values that $x$ may take.
My Attempt:
Let $$y=\frac{ax^2-7x+5}{5x^2-7x+a}$$
$(5y-a)x^2-7(y-1)x+ay-5=0$
Since $x\in R$, we should have Discriminant $\geq 0$
$49(y-1)^2-4(5y-a)(ay-5)\geq 0$
which simplifies to
$(49-20a)y^2+2(2a^2+1)y+(49-20a)\geq 0$
For above to hold true for all real $y$ we must have $49-20a>0$
and Discriminant $\leq 0$
$4(2a^2+1)^2-4(49-20a)^2\leq 0$
which simplifies to
$(a-5)^2(a+12)(a-2)\leq 0$
Thus $-12\leq a\leq 2$
But for $a=-12$ and $a=2$ the Numerator and Denominator of $y$ develop common factors due to which $y$ assumes the form $\frac{Ax+B}{Cx+D}$ which obviously can't take all real values.
So $-12<a<2$
Can we not simply find value(s) of $a$ such that Numerator and Denominator have common factors and somehow justify that $-12<a<2$. I want to avoid the Discriminant part.
 [/INST] If $$y=\frac{f(x)}{g(x)}$$ where $f(x)$ and $g(x)$ are both quadratics.
If $y$ is of the form $$y=\frac{(x-a)(x-c)}{(x-b)(x-d)}$$ where $a<b<c<d$ then from the plot of graph it is clearly seen that $-\infty<y<+\infty$ when $x\in (b,d)$

It appears reasonable enough to say that if one root of numerator(denominator) lies between the roots of denominator(numerator) then $y$ can take all real values.
Let $x_{1}$ and $x_{2}$ be the roots of $5x^2-7x+a=0$
i.e.  $5x_{1}^2-7x_{1}+a=0$ and
$5x_{2}^2-7x_{2}+a=0$
Also, $x_{1}+x_{2}=\frac{7}{5}$ ; $x_{1}x_{2}=\frac{a}{5}$
Let $f(x)=ax^2-7x+5$
$$f(x_{1})=ax_{1}^2-7x_{1}+5=a\left(\frac{7x_{1}-a}{5}\right)-7x_{1}+5=\frac{(a-5)(7x_{1}-a-5)}{5}$$
Similarly, $$f(x_{2})=ax_{2}^2-7x_{2}+5=\frac{(a-5)(7x_{2}-a-5)}{5}$$
If exactly one root of numerator i.e. $ax^2-7x+5=0$ lies between $x_{1}$ and $x_{2}$ then
$$f(x_{1})f(x_{2})<0$$
$$\frac{(a-5)^2(7x_{1}-a-5)(7x_{2}-a-5)}{25}<0$$
$$49x_{1}x_{2}-7(a+5)(x_{1}+x_{2})+(a+5)^2<0$$
$$49(\frac{a}{5})-7(a+5)(\frac{7}{5})+(a+5)^2<0$$
$$(a+12)(a-2)<0$$
$$-12<a<2$$
</s>