I want to solve the following optimization problem: (over $x_1,\dots,x_n,\beta$, where $n,c$ are constants) $$ \max \sum_{i=1}^n x_i (n-i)\\ \text{s.t. } \sum_{i=1}^n x_i =1, \\ x_1\leq \dots\leq x_{\frac n 2}\leq \beta \leq x_{\frac {n+1}{ 2}}\dots \leq x_n ,\\ \sum_{i=1}^n |x_i-\beta|=c. $$ Intuitively, if $c=0$, then the solution is $x_1=\dots=x_n=\frac 1 n $. When $c$ increases, I suspect the objective value decreases.
I could simulate this problem with different values of $c$ and find some structure in the output, but I wonder whether there's a nice and elegant analysis I fail to see. Any ideas?
Edit: added a constraint on $\beta$.
Thanks!
If you drop the last restriction, the optimal solution is given by $x_1=x_2=\cdots = x_n = \frac 1n$. Back tooth original problem, if $c<0$, there is no solution. If $c\ge 0$ you can solve for beta and get $\beta= \frac{1 \pm c}{n}$.
For these values of $\beta$ we are able to match the maximum in the larger set (without the last restriction), which will obviously be also the maximum in the original admissible region.
IMPORTANT: The OP was edited and the second restriction now includes $\beta$ (and $n$ seems to be even). In this case $\beta$ cancels out in the last restriction and it can be replaced by
$$ - x_1 - \cdots - x_{\frac{n}{2}} + x_{\frac{n}{2}+1}+ \cdots x_n = c $$
The optimal solution is now given by $x_1=x_2= \cdots = x_{\frac n2} = \frac{1-c}{n}$ and $x_{\frac n2 + 1} = \cdots = x_{n} = \frac{1+c}{n}$ and $\beta = \frac 1n$.