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 

To find the places where $f(x)$ is minimal and maximal, differentiate $f$ wrt $x$. Then solve $f'(x)=0$. Call the solution $x_0$ an $x_1$ (and so on if there are move). Now, you know for which $x$ $f(x)$ is minimal/maximal. Calculate $f(x_0)$ and $f(x_1)$. These should be equal to $-5$ and $4$. You only have to know which one is a minimum and which one a maximum, but you should be able to figure that out.
