# Solve a system of equation with absolute value and rotation

Solve $$\begin{cases} \left|x_1-x_2\right|=\left|x_2-x_3\right|=...=\left|x_{2018}-x_1\right|,\\ x_1+x_2+...+x_{2018}=2018. \end{cases}$$

I think there must be such a way to solve systems of equation with the form of rotation and absolute value like this.

I have difficulty in solving the first equation. Since to me, there are quite a lot of cases to consider, for example, $$\left|x_1-x_2\right|=\left|x_2-x_3\right|$$ leads to $$x_1-x_2=x_2-x_3$$ and $$x_1-x_2=x_3-x_2$$ and so on.

• I observe that $x_{i} = 1$ for all $i$ is a solution (not sure if it is unique). Perhaps squaring the absolute sign can help a bit. – K_inverse Sep 27 '18 at 1:45
• Like what you've said, it may result in $x_1=x_2=...=x_{2018}=1$. But actually, I think squaring the absolute sign still remains the same. I mean there is no difference between $|x_1-x_2| = |x_2-x_3|$ and $(x_1-x_2)^2=(x_2-x_3)^2$. – Martin Tr Sep 27 '18 at 1:58

Let $$|x_{1} - x_{2}| = C \geq 0$$ and note that \begin{align} |x_{1} - x_{2}| = C \implies x_{1} = \pm C + x_{2} \end{align} Similarly, we have \begin{align} x_{1} &= \pm C + x_{2} \\ x_{2} &= \pm C + x_{3} \\ & \; \; \vdots \\ x_{2017} &= \pm C + x_{2018} \\ x_{2018} &= \pm C + x_{1} \\ \end{align} Keep substituting, we obtain \begin{align} x_{1} &= \pm C + x_{2} \\ &= \pm C \pm C + x_{3} \\ & \; \; \vdots \\ &= \pm C \pm C \pm \cdots \pm C + x_{1} \end{align} Thus, we have \begin{align} \pm 2018C = 0 \implies C = 0 \end{align} It means that $$x_{1} = x_{2} \cdots = x_{2018}$$ and let them be $$A$$.
So now, we use the second equation \begin{align} x_{1} + x_{2} + \cdots + x_{2018} &= 2018 \\ 2018A &= 2018 \\ A &= 1 \end{align}
Conclusion: $$x_{1} = x_{2} \cdots = x_{2018} = 1$$
• There is no reason why all your $\pm$ signs must be the same. So $\pm C\pm C\pm\cdots\pm C$ could be for example $C-C+C-C+\cdots$ which is always zero and does not prove that $C$ is zero. – David Sep 27 '18 at 2:49
• Here is another solution: $x_1=0$, $x_2=2$, $x_3=0$, $x_4=2$,... – David Sep 27 '18 at 2:53
• Thank you a lot for your detailed solution. The idea $|x_1-x_2|=C$ is great. However, your solution could be true if there were odd amounts of variables $x_i$ (that will definitely lead to $C=0$). – Martin Tr Sep 27 '18 at 2:56
• @David, oh yes you are right. So, there should be multiple solutions depending on how $C$'s are cancelled out, right? – K_inverse Sep 27 '18 at 2:59