Background info: I am trying to randomly generate quadratics on a graph with roots between -5 and 5. $$ 0=ax^2+bx+c \Rightarrow x=\frac{-b\pm \sqrt{b^2-4ac}}{2a}$$
If I keep "a" constant at 1 for simplicity then I end up with: $b-10\le \pm \sqrt{b^2 -4c} \le b+10 $
I thought I could square everything to continue rearranging the inequality but that doesn't appear to work. I end up with $$ -25-5b\le c \le -25+5b $$
Playing around with a quadratic plotter https://www.desmos.com/calculator/pfdwlq5qht
$$ y=x^2+5x-6$$ satisfies this inequality but does not have roots between -5 and 5.
I think my error is related to Should the sign be reversed if I square both sides of an inequality? but I am unsure how to proceed. Any help would be appreciated. Thanks in advance.