Quadratic formula in double inequalities I have the double inequality: 
$-x^2 + x(2n+1) - 2n \leq u < -x^2 + x(2n-1)$ 
and I am trying to get it into the form
$x \leq \text{ anything } < x+1$ 
Or at least solve for x as the smallest term. I know I need to use the quadratic formula but I don't understand how I can solve for two quadratics at once? How would this work?
 A: Manipulate original inequality to get:
$(x)(2n+1) - 2n \leq u + x^2 < 2nx -x $
Manipulate further to get:
$2n \geq (2n+1)x - x^2 - u > 0$
From the first inequality, we get:
$x^2 - (2n+1)x + u - 2n \geq 0$
Use quadratic formula on that and choose the solution or solutions that satisfy the second inequality $(2n+1)x - x^2 - u > 0$
I hope it's okay that we're not going for $x \leq anything < x + 1$ anymore?
A: If you write
$$f_1(x)=x^2-(2n+1)x+2n+u\ ,\quad f_2(x)=x^2-(2n-1)x+u$$
then you want to solve
$$f_1(x)\ge0\ ,\quad f_2(x)<0\ .$$
The important thing to notice is that
$$f_2(x)=f_1(x+1)\ .$$
Each quadratic has discriminant
$$\Delta=(2n-1)^2-4u\ .$$
Firstly, if $\Delta\le0$ then $f_2(x)$ cannot be negative, and so there is no solution.
Now consider graphing $y=f_1(x)$ and $y=f_2(x)$, both on the same axes.  (Please draw it yourself, I am not good at posting diagrams online.)  The graph of $f_1$ is just that of $f_2$, shifted $1$ unit to the right.  Suppose that $f_1$ has roots $\alpha_1<\alpha_2$ and $f_2$ has roots $\beta_1<\beta_2$.  Please mark these on your graph.  There are two cases.


*

*Case I: if $\Delta\le1$ then $\beta_2\le\alpha_1$ and from the graph you can see that the solution is $\beta_1<x<\beta_2$.

*Case II: if $\Delta>1$ then $\beta_2>\alpha_1$ and the solution is $\beta_1<x\le\alpha_1$.


So, the solutions are:


*

*if $\Delta\le0$, no solution;

*if $0<\Delta\le1$ then $n-\frac12-\frac{\sqrt\Delta}2<x<n-\frac12+\frac{\sqrt\Delta}2$;

*if $\Delta>1$ then $n-\frac12-\frac{\sqrt\Delta}2<x<n+\frac12-\frac{\sqrt\Delta}2$.


Putting the answer in the form you requested, this implies
$$x<n-\frac12|1-\sqrt\Delta|<x+1\ ,$$
provided that $\Delta>0$.
A: You don't solve two quadratics at once. You divide the double inequality into two separate ones:
$$-x^2+x(2n+1)-2n\le u$$
$$u<-x^2+x(2n-1)$$
From then on, you can use whatever method you want to isolate $x$. It looks like you already know how to do that. 
