<s>[INST] if range of $f(x) = \frac{x^2+ax+b}{x^2+2x+3}$ is $[-5,4]$. Then $a$ and $b$ are If Range of $\displaystyle f(x) = \frac{x^2+ax+b}{x^2+2x+3}$ is $\left[-5,4\; \right]$ for all $\bf{x\in \mathbb{R}}$. Then values of $a$ and $b$.
$\bf{My\; Try}::$ Let $\displaystyle y=f(x) = \frac{x^2+ax+b}{x^2+2x+3} = k$,where $k\in \mathbb{R}$.Then $\displaystyle kx^2+2kx+3k=x^2+ax+b$
$\Rightarrow (k-1)x^2+(2k-a)x+(3k-b) = 0$
Now we will form $2$ cases::
$\bf{\bullet}$ If $(k-1)=0\Rightarrow k=1$, Then equation is $(2-a)x+(3-b)=0$
$\bf{\bullet}$ If $(k-1)\neq 0\Rightarrow k\neq 1$ means either $k>1$ or $k<1$
How can i solve after that
Help Required
Thanks 
 [/INST] Note that $x^2+2x+3\gt 0 $ for any $x\in\mathbb R$.
Hence, we have
$$-5(x^2+2x+3)\le x^2+ax+b\le 4(x^2+2x+3).$$
You can simplify this, and you have two quadratic inequality which will be easy to solve.
You'll have two inequality.
$$6x^2+(a+10)x+b+15\ge0$$
$$3x^2+(8-a)x+12-b\ge0.$$
This leads that each discriminant has to be equal or greater than $0$. So, we have
$$(a+10)^2-4\cdot 6\cdot (b+15)\le 0$$
$$(8-a)^2-4\cdot 3\cdot (12-b)\le 0.$$ 
</s>