How many solutions has this equation with a parameter?

86 Views Asked by At

How many solutions has an equation $$|x-1|+|x-2|+|x-3|+...+|x-2002|=a$$depending on an a parameter? In my opinion, an equation can have 0, 2 or infinite number solutions, but I don't know how to prove it.

2

There are 2 best solutions below

0
On BEST ANSWER

You may take the RHS (call it $f(x)$) as 2002 times mean deviation of first 2002 natural numbers about $x$. The mean deviation is known to be least if measured about the median. The medians of this data being 1001 and 1002. So $f(x)$ admits minimum value at every point on $x \in[1001,1002].$ So if $a=f[1001]=f[1002]=1002001$ this equation has infinitely many roots in $[1001,1002].$ If $a< 1002001$. The equation does not have a root. For $a>1002001$ the equation has exactly two real roots. Graphically $f(x)$ is an open polygon going to infinity on both sides of its minimum and it is constant (the minimum) in the domain [1001,1002].

0
On

The function on the left measures the total distance from the point $x$ to $2002$ other points. If $x\lt 1$ it is to the left of all the points and shifting to the right by $\epsilon$ reduces the sum by $2002\epsilon$.

In fact if there are $n$ points to the left of $x$ and $2002-n$ points to the right, increasing $x$ by $\epsilon$ increases the function by $n\epsilon-(2002-n)\epsilon=2\epsilon (n-1001)$. So while $n\lt 1001$ the function is decreasing, while $n=1001$ it is static and for $n\gt 1001$ it is increasing.

[Analysis of what happens at the actual points is trivial - $n$ changes and the behaviour is clear. It is obvious that the function is continuous].

So here the minimum possible value of $a$ for which there is a solution is given at the points for which $n=1001$ (and the endpoints of that interval). The function increases without limit, so any greater value of $a$ is achieved at two points.

Note that this analysis does not depend on the fact that the points have integer spacing - it just depends on the number of points either side of $x$.

Some people might want to fill in technical details, but I hope this helps.