If the range of the function $$f(x)=\frac{x^2+ax+b}{x^2+2x+3}$$ is $[-5,4]$ then what is the value of $a^2+b^2$ ?
[$a,b$ are natural numbers]
What will the correct approach to this problem?
I tried using the general method as follows: $({x^2+2x+3})y={x^2+ax+b}$
or,$x^2(y-1)+x(2y-a)+(b-3y)=0$
Then since $x$ is real the discriminant should be greater than equal to 0.
But this method isn't very efficient and quick for this problem.Any shortcuts possible?
Both the quadratic equations $$ f(x)=-5 $$ and $$ f(x)=4 $$ must have double roots. If these equations have no roots, then the corresponding value is not in the range. But if either has two roots, then in between them the function will go outside the prescribed range.
So the discriminants $\Delta_1$ of both $(x^2+ax+b)+5(x^2+2x+3)$ and $\Delta_2$ of $(x^2+ax+b)-4(x^2+2x+3)$ must both vanish. In other words $$ \begin{aligned} 0&=\Delta_1=a^2+20a-260-24b,\\ 0&=\Delta_2=a^2-16a-80+12b. \end{aligned} $$ This system is easy to solve. There are two solutions $(a,b)=(-10,-15)$ and $(a,b)=(14,9)$.