TITLE: Find all real $x$ such that $1990[x] +1989[-x]=1$ (where $[x]$ is the floor function for $x$).
QUESTION [7 upvotes]: Find all real $x$ such that $1990[x] +1989[-x]=1$ (where $[x]$ is the
  floor function for $x$).

My effort
Rearranging our equation we have : 
\begin{array}{c}
1990[x]+1989[-x]&=1 \\
1989([x]+[-x])+[x] &=1 \\
\end{array}
Supposing  that $x$ is an integer ,I have that $[x]+[-x]=0$ and the problem breaks down to 
$$[x]=1$$ 
which has the only solution $x=1$
Else ,$x$ is a real number with nonzero fractional part and $[x]+[-x]=-1$ which yields in our case
\begin{array}{c}
-1989 + [x] &= 1 \\
[x] &=1990 \\
\end{array}
For this to happen we must therefore have that $x \in (1990,1991)$

Question
Is my effort complete and correct ?What would have been other ways to
  approach the problem ?

REPLY [2 votes]: More generally, for $m,n,a \in \mathbb Z$, we look at the problem of determining all $x \in \mathbb R$ such that
$$ m \lfloor x \rfloor + n \lfloor -x \rfloor = a. $$
Write $x=\lfloor x \rfloor + \{x\}$, with $\lfloor x \rfloor \in \mathbb Z$ and $0 \le \{x\}<1$. Thus, $x \in \mathbb Z$ if and only if $\{x\}=0$.
If $\{x\}=0$, then $x \in \mathbb Z$, and so $-x \in \mathbb Z$. Thus, $\lfloor -x \rfloor=-\lfloor x \rfloor$ in this case.
If $\{x\}>0$, then $-x=(-\lfloor x \rfloor -1)+(1-\{x\})$, where $-\lfloor x \rfloor -1 \in \mathbb Z$ and $0<1-\{x\}<1$. Thus, $\lfloor -x \rfloor=-\lfloor x \rfloor-1$.
We combine these two cases as
$$ \lfloor x \rfloor + \lfloor -x \rfloor = \begin{cases} 0 & \:\mbox{if}\: x \in \mathbb Z; \\ -1 & \:\mbox{if}\: x \notin \mathbb Z. \end{cases} $$
So for $x \in \mathbb Z$,
$$ a = m \lfloor x \rfloor + n \lfloor -x \rfloor = n \left( \lfloor x \rfloor + \lfloor -x \rfloor \right) + (m-n) \lfloor x \rfloor = (m-n) \lfloor x \rfloor = (m-n)x. $$
and for $ x \notin \mathbb Z$,
$$ a = m \lfloor x \rfloor + n \lfloor -x \rfloor = n \left( \lfloor x \rfloor + \lfloor -x \rfloor \right) + (m-n) \lfloor x \rfloor = -n + (m-n) \lfloor x \rfloor. $$
We summarize the solution set as follows:
$\bullet$ If $m=n$, then
$$ \begin{cases} x \in \mathbb Z & \:\mbox{if}\: a=0, n \ne 0, \\ x \in \mathbb R & \:\mbox{if}\: a=0, n=0, \\ x \in \mathbb R \setminus \mathbb Z & \:\mbox{if}\: a \ne 0, a+n=0, \\ \text{no solution} & \:\mbox{if}\: a \ne 0, a+n \ne 0. \end{cases} $$
$\bullet$ If $m \ne n$, then
$$ \lfloor x \rfloor = \frac{a+n}{m-n}. $$
Additionally, if $x \in \mathbb Z$, then $x=\frac{a}{m-n}$.
The solution set in the particular case $n=m-1$, $a=1$ is
$$ x=1 \:\:\text{or}\:\: m < x < m+1. \quad \blacksquare $$