$\left\lfloor\frac{x+1}2\right\rfloor=\left\lfloor\frac{2x+1}3\right\rfloor$ I want to find the solutions in $\mathbb R$ of $\left\lfloor\frac{x+1}2\right\rfloor=\left\lfloor\frac{2x+1}3\right\rfloor$, where $\lfloor x\rfloor$ is the unique integer such that $\lfloor x\rfloor\leq x<\lfloor x\rfloor+1$.
I solved it as follows. Let $\left\lfloor\frac{x+1}2\right\rfloor=n$. By the definition, $n\leq\frac{x+1}2<n+1$. Then $2n-1\leq x<2n+1$, $4n-2\leq2x<4n+2$, $4n-1\leq 2x+1<4n+3$, and finally, $\frac{4n}3-\frac13\leq \frac{2x+1}3<\frac{4n}3+1$. $(1)$.
Now I analyzise $n$ modulo $3$.
If $n=3k$, then $(1)$ becomes $4k-\frac13\leq\frac{2x+1}3<4k+1$. Then either $\left\lfloor\frac{2x+1}3\right\rfloor=4k-1$, or $\frac{2x+1}3=4k$. From the equation itself, it follows that $3k=4k-1$, or $3k=4k$, so $k=0$ or $k=1$. It's easy to turn this into 2 intervals for $x$.
Similarly, I can continue for $3k+1$ and $3k+2$. This seems to lead to a solution, but is there perhaps a better way? Thank you for any ideas/verification of my solution.
 A: First collect all like terms on both sides to get
$$\left\lfloor \frac{x+1}{2}\right\rfloor-\left\lfloor \frac{2x+1}{3}\right\rfloor=0$$
Since $n-1\leq\left\lfloor n\right\rfloor\leq n$, we have that
$$\frac{x+1}{2}-1-\frac{2x+1}{3}\leq\left\lfloor \frac{x+1}{2}\right\rfloor-\left\lfloor \frac{2x+1}{3}\right\rfloor\leq \frac{x+1}{2}-\frac{2x+1}{3}+1$$
$$\frac{x+1}{2}-1-\frac{2x+1}{3}\leq 0\leq \frac{x+1}{2}-\frac{2x+1}{3}+1$$
We can split this into two inequalities:
$$\frac{x+1}{2}-\frac{2x+1}{3}-1\leq 0$$
$$\frac{x+1}{2}-\frac{2x+1}{3}+1\geq 0$$
Solving the first inequality yields
$$\frac{3x+3-4x-2-6}{6}\leq 0$$
$$-x-6\leq 0$$
$$x\geq -6$$
Solving the second inequality yields
$$\frac{3x+3-4x-2+6}{6}\geq 0$$
$$-x+7\geq 0$$
$$x\leq 7$$
So we have bounded our solutions to
$$-6\leq x\leq 7$$
Now, we will substitute $u=2x$ (which has bounds $-12\leq u\leq 14$), this is because we have the $2x$ term in the numerator of $\frac{2x+1}{3}$.
Our fractions are now
$$\frac{x+1}{2}=\frac{u+2}{4}$$
$$\frac{2x+1}{3}=\frac{u+1}{3}$$
Note that the critical values of $\left\lfloor \frac{u+2}{4}\right\rfloor$ occur when $u\equiv 2\mod 4$ and the critical values of $\left\lfloor \frac{u+1}{3}\right\rfloor$ occur when $u\equiv 2\mod 3$.
The critical values on the interval $[-12,14]$ are
$$\{-10,-7,-6,-4,-2,-1,2,5,6,8,10,11,14\}$$
While somewhat tedious (you can expedite the process by making a table), we can test all of these for solutions to our original equation
$$\left\lfloor \frac{u+2}{4}\right\rfloor=\left\lfloor \frac{u+1}{3}\right\rfloor$$
We get that the solutions are
$$u\in\{-7,-4,-1,2,6,10\}$$
Hence the solutions must be the intervals
$$u\in [-7,-6)\cup [-4,-2)\cup [-1,2)\cup [2,5)\cup [6,8)\cup [10,11)$$
Note that $[-1,2)\cup [2,5)=[-1,5)$
Now substituting $u=2x$, we have our final solution as the intervals
$$\boxed{x\in [-3.5,-3)\cup [-2,-1)\cup [-.5,2.5)\cup [3,4)\cup [5,5.5)}$$
