<s>[INST] If $ f(x) = \frac{b+2x-x^2}{ax-1}\forall x \in \mathbb{R}$ and $\min(f(x)) = -5,$ Then $a+b$ 
If $\displaystyle f(x) = \frac{b+2x-x^2}{ax-1}\forall x \in \mathbb{R}$ and $\min(f(x)) = -5,$ Then $a+b=$

Let $$y = \frac{b+2x-x^2}{ax-1}\Rightarrow axy-y=b+2x-x^2$$
So $x^2+(ay-2)x-(y+b) = 0$
Now for real values of $y,$ Equation must have real roots. So $\bf{Discriminant \geq 0}$
So $(ay-2)^2+4(y+b)\geq 0\Rightarrow a^2y^2+4-4ay+4y+4b\geq 0$
So $a^2y^2-4(a-1)y+(4b+4)\geq 0$ Now if $a\neq 0,$ Then $\bf{Dicriminant \leq 0}$
So $$16(a-1)^2-4a^2(4b+4)\leq 0$$
Now how can i solve after that, Help required, Thanks
 [/INST] As $x \rightarrow \infty$, $f(x)$ will be dominated by the $x^2$ term in the numerator. Hence if $a > 0$, $f(x) \rightarrow -\infty$. Again, if $a < 0$, $f(x) \rightarrow -\infty$ as $x \rightarrow -\infty$. Thus $a=0$.
Now
$$f(x) = x^2-2x-b = (x-1)^2 -b-1 $$ and if the minimum of $f(x) = -5$, it follows that $b=4$. Thus $a+b= 4$.
</s>