Find $\min \Pi_{i=1}^n|x-a_i|$

51 Views Asked by At

Find $$\min \Pi_{i=1}^n|x-a_i|$$

The first thing I noticed is that taking the derivative of such product would be a headache. Let's try to think with two $a_i$ only:

$$\min |x-a_1||x-a_2| = \min |(x-a_1)(x-a_2)| = \min |x^2 +(-a_1-a_2)x + a_1a_2|$$

I can't even use the minimum of the parabola in this case because we're taking the modulus. If the minimum value of the parabola were $-1$ then it's not true that $1$ would be the minimum value of the absolute value of the parabola. At least for this small case I can take the derivative which would be also not useful.

However, when we think of the problem for $a_1,a_2,a_3$ we get a cubic equation. And for higher number of $a$'s we get even worse equations. So I think this is not a good way to think.

I think this is one of that problems where you get an intuition on how the minimizer should look and then prove analitically that that is true. However I don't have a good intuition on how it should look.

UPDATE:

it was supposed to be something like or related to the geometric mean. If we take the absolute values out, does it make sense?