Given 9 real numbers $x_1, x_2, ... , x_9\in [-1,1]$ such that $x_1^3+x_2^3+...+x_9^3=0$. Find the maximum value of $S=x_1+x_2+...+ x_9$.
I have tried ordering the numbers from smallest to largest and then dividing the set of integers $\{x_1, x_2, ... , x_9 \}$ into two subsets of only negative numbers and only positive numbers. In particular,
$S_1 =\{ x_1, x_2,..., x_j \}$ and $S_2 =\{ x_{j+1}, x_{j+2},..., x_9 \}$ such that all the elements in $S_1$ are negative and all the elements in $S_2$ are positive.
From there, letting $-(x_1^3+ x_2^3+... x_j^3)= x_{j+1}^3+ x_{j+2}^3+... x_9^3=P$ and evaluating some inequalities, I got:
$maxS=\sqrt[3]{(9-j)^2P}-[\left\lfloor P \right\rfloor+\sqrt[3]{P-\left\lfloor P \right\rfloor}]$
This answer was impossibly complicated and I can't seem to find the maximum of S with respect to $j$ and $P$.
Is there a better solution to this? If not, how do I find the maximum of S?
Notice that for $-1\leq x \leq 1$ there exists a number $t$ such that $\cos(t)=x$. We have: $$ 4\cos^3(t)-3\cos(t) = \cos(3t) \geq -1\\ \Rightarrow 4x^3 - 3x \geq -1\\ \Rightarrow x\leq \frac{4x^3+1}{3}$$ Or you can prove by showing that $4x^3-3x+1\geq0$. Applying this to our sum, we obtain: $$\sum_{i = 1}^9 {x_i} \leq \frac{4}{3}\sum_{i = 1}^9 {x_i^3} + \frac{9}{3} = 3$$ The equal sign happens when $x_i \in \{1/2, -1\}$ and the constraint $\sum_{i = 1}^9 {x_i^3} = 0$ is satisfied. It is possible by letting: $$x_1=x_2=...=x_8=\frac{1}{2},x_9 = -1$$