Differentiable function that has minimum when all the variables are equal

20 Views Asked by At

I want to find a function $f:R^n\rightarrow R$, such that $f$ has minimum when $x_1=x_2=...=x_n$.

I came up with this one, but this is not differentiable, do you have any ideas? $$f(x)=\sum_{i=1}^n \sum_{j=1}^n |x_i-x_j|$$

1

There are 1 best solutions below

0
On BEST ANSWER

You may take square to your terms. Then it will be differentiable and still have the minimum at the same point.