1

How many roots (finite number) can equation have? $$ \sum\limits_{i = 1}^{40}|a_i - x| = \sum\limits_{i = 1}^{40}|b_i - x|.$$ I think there is at most one, but I don't know how to prove it. Any ideas?

  • 1
    Welcome to stackexchange. You are more likely to get help if you edit the question to show us what you have tried and where you are stuck. Can you answer the question when you change $40$ to $1$ or $2$? – Ethan Bolker Mar 18 '18 at 15:10
  • Are there any restrictions on $a_i$ and $b_i$? – CY Aries Mar 18 '18 at 15:13
  • @CYAries, no, any real numbers – Konstant Mar 18 '18 at 15:14
  • Technically, if you take $a_i=b_i$ then you have infinitely many solutions – asdf Mar 18 '18 at 15:17
  • @asdf I fixed the question. – Konstant Mar 18 '18 at 15:22
  • @EthanBolker, I'll take that, thank you – Konstant Mar 18 '18 at 15:24
  • $|x-2|+|x-3|=|x-1|+|x-0|$ has only one solution. But $|x-2|+|x-(-1)|=|x-1|+|x-0|$ has infinitely many solutions. – CY Aries Mar 18 '18 at 15:26
  • 3
    @CYAries, the question is how many roots can equation have if the number of roots is finite number – Konstant Mar 18 '18 at 15:30
  • @Konstant: It would improve the Question if you added this condition to the body text in a more robust way, e.g. assume that the following equation has a finite number of roots.... It would also help to show Readers you've digested the problem to illustrate one or more cases where there are infinitely many roots. – hardmath Mar 18 '18 at 20:34
  • $|1-x|+|5-x|+|6-x|=|2-x|+|2-x|+|9-x| $ has $3$ roots – asdf Mar 19 '18 at 13:45

1 Answers1

1

If $\sum_{i=1}^{40}a_i=\sum_{i=1}^{40}b_i$ for large enough $x$ we have $$\sum_{i=1}^{40}x-a_i=\sum_{i=1}^{40}x-b_i\to0=0$$which means that under such assumption we can have infinitely many answers. Generally the number of answers depends on the values of $\{a_i\}$ and $\{b_i\}$ and has no closed form.

Mostafa Ayaz
  • 31,924
  • OP proposed that the equation either has infinitely many solutions or has not more than one solution. Can anybody give a counter-example? – CY Aries Mar 18 '18 at 17:41
  • $|1-x|+|5-x|+|6-x|=|2-x|+|2-x|+|9-x|$ has $3$ roots – asdf Mar 19 '18 at 13:46