<s>[INST] Quadratic inequality with negative roots Assume the following quadratic inequality: $$0\lt x^2+4x-100$$ The solutions are: $$
x\lt -2-\sqrt{104},\qquad x\gt-2+\sqrt{104}
$$
In this case, the positive root keeps the original direction of the inequality ($\gt$), but the negative root inverts it.
However, for the general case: $0\lt ax^2+bx+c$, how do I know which root have which inequality direction? Can I say: "if the root is positive the inequality direction of the solution is the same as the original inequality, or the inverted direction otherwise"? Or does it actually depend on the signs and/or values of $a$, $b$ and $c$? and what about $\geq$? What about quadratic inequations where all of their roots are positive or negative?
 [/INST] You can tackle this by completing the square. Notice that
$$
\begin{align}
0&<ax^2+bx+c \\ 
&=a\left(x^2+\frac{b}{a}x + \frac{b^2}{4a^2} - \frac{b^2}{4a^2}\right)+c \\
&=a\left(x+\frac{b}{2a}\right)^2-\frac{b^2}{4a}+c
\end{align}
$$
which means that
$$a>0 \implies \left(x+\frac{b}{2a}\right)^2>\frac{b^2-4ac}{4a^2} \implies
\left|x+\frac{b}{2a}\right|>\frac{\sqrt{b^2-4ac}}{2a}
$$
$$a<0 \implies \left(x+\frac{b}{2a}\right)^2<\frac{b^2-4ac}{4a^2} \implies
\left|x+\frac{b}{2a}\right|<\frac{\sqrt{b^2-4ac}}{2a}
$$
From there, you simply choose between one of the following inequalities for absolute values:
$$|a|<b \implies -b<a<b$$
$$|a|>b \implies a>b \ \  \text{ or } \ a<-b$$
and you're set to isolate $x$.
</s>