<s>[INST] Write $x$ in terms of $y$ in inequality ${x}^{2}+x\le y$ How can I write the inequality ${x}^{2}+x\le y$ such that $?\le x\le ?$ (in terms of $y$) where $-2\le y\le 1$ ?
I tried $x(x+1)\le y\Rightarrow x\le \frac{y}{x+1}$ then became stuck.
Any help will be appreciated.
 [/INST] Rewrite the inequality $$x^2 + x \le y $$ as follows: $$ x^2 + x - y \le 0 $$ Then, by discriminant formula we get $$x_{1,2} = \frac{-1 \pm \sqrt{1+4y}}{2} $$ and therefore $$\left(x - \frac{-1 + \sqrt{1+4y}}{2}\right)\left(x - \frac{-1 - \sqrt{1+4y}}{2}\right) \le 0$$ Thus, $$\frac{-1 - \sqrt{1+4y}}{2} \le x \le \frac{-1 + \sqrt{1+4y}}{2}$$
</s>