Equation with absolute values (another)

55 Views Asked by At

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

There are 1 best solutions below

2
On

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.