If $\frac{x^2+ax+3}{x^2+x+a}$ takes all real values, prove $4a^3+39<0$ If $\frac{x^2+ax+3}{x^2+x+a}$ takes all real values for possible real values of $x$, then prove that $4a^3+39<0$. Here is how I approached it.
Let $$\frac{x^2+ax+3}{x^2+x+a}=y$$
Then, $$(y-1)x^2+(y-a)x+(ay-3)=0$$
We want all those $y$, for which there is a real $x$, that is, we want $y$ such that this quadratic has real roots. So, the discriminant $\Delta \geq 0$.
$$(y-a)^2-4(y-1)(ay-3) \geq 0$$
On simplifying, we obtain $$(1-4a)y^2+(2a+12)y+(a^2-12) \geq 0$$
We want to find those $a$ for which this is true for all $y$. So, the discriminant $\Delta \leq 0$ (so that the parabola never crosses the $x$ axis.) and $(1-4a)>0$ (so that it faces upwards and is always above the $x$ axis.)
This gives  $$(2a+12)^2-4(1-4a)(a^2-12) \leq 0$$
$$(a+6)^2-(1-4a)(a^2-12) \leq 0$$
which simplifies to  $$a^3-9a+12 \leq 0$$ which is not what I set out to achieve. Where did I go wrong? 
And is there any other method to do this? (Perhaps Calculus based?)
 A: I would argue that $4a^3+39<0$ is wrong, for example $a=-3$ satisfies it, however the function, that follows from that value for $a$, does not span all real numbers.
First note that both the numerator and the denominator of the given function are polynomials of order two, with the same coefficients, which means that both limits of $x$ to plus or minus infinity will go to 1. So in order for the function to go to $\pm\infty$ the denominator has to become zero, so the poles of the function have to have real solutions
$$
x=\frac{-1\pm\sqrt{1-4a}}{2}\to a\leq\frac{1}{4}.
$$
In order for the function to be equal to zero the numerator has to become zero, so the zeros of the function have to have real solutions
$$
x=\frac{-a\pm\sqrt{a^2-12}}{2}\to a^2\geq 12.
$$
Combining these two constraints for $a$ yields
$$
a\leq-2\sqrt{3}.
$$
This does not yet ensure that the function covers all real values, namely one of the zeros has to lie between the two poles, such that the function will span all real numbers between the two poles (it will either go from $-\infty$ to $\infty$ or the other way around). Solving this does indeed yield $a^3-9a+12\leq 0$.
So your solution is correct and the given answer (partially) incorrect. Namely when your implicit solution is true, then the given implicit relation is also true. Because for real values of $a$, then your solution can also be approximated as $a\leq-3.5223$ and the given relation as $a<-2.1363$.
