<s>[INST] The equation $x^2-3ax+b=0$ does not have distinct real roots, find the least possible value of $\frac{b}{a-2}$, where $a\gt2$. The following question is taken from JEE practice set.

The equation $x^2-3ax+b=0$ does not have distinct real roots, find the least possible value of $\frac{b}{a-2}$, where $a\gt2$.

My Attempt:
$$D\le0\\ \implies 9a^2-4b\le0\\ \implies9a^2-36\le4b-36\\ \implies9(a-2)(a+2)\le4(b-9)$$
Now, $a+2\gt4\implies 9(a-2)(a+2)\gt36(a-2)$
Also, $b\gt b-9\implies4b\gt4(b-9)$
Thus, $4b\gt9(a-2)+a+2)\gt36(a-2)$
Therefore, $\frac{b}{a-2}\gt9$
The answer given is $18$. How to do this?
 [/INST] We get from $9a^2\le4b$ that $a,b$ and $\frac b{a-2}$ are all positive. It is clear that raising $b$ does not violate the inequality but increases $\frac b{a-2}$, so for any $a$ we minimise $\frac b{a-2}$ by setting $b=\frac94a^2$.
Once that is fixed we then rewrite
$$\frac b{a-2}=\frac94\cdot\frac{a^2}{a-2}=\frac94\left(a+2+\frac{4}{a-2}\right)$$
and differentiate to get $$\frac94\left(1-\frac4{(a-2)^2}\right)=0\implies a=4$$
Hence the minimum of $\frac b{a-2}$ is $\frac94\cdot\frac{4^2}{4-2}=18$.
</s>