I have integers greater than 4, for instance $i_1$, $i_2$, $i_3$, ..., $i_n$.
We have to change the greatest of these integers (for instance $i_1$ if they are ranked by descending order) by adding to it an integer constant $c$ but we need to change one or more other integers in the list $\{i_2, ..., i_n\}$ so that: (1) the sum of these integers is unchanged, that is, the sum is still equal to $\sum_{j=1}^n i_j$; (2) the product $\prod_{j=1}^n i'_j$ is maximized.
For instance we have $i_1=7$, $i_2=6$, $i_3=4$. We want to add $c=2$ to $i_1$. So we need to substract $2$ to $i_2$ or $i_3$, or to substract $1$ to $i_2$ and $i_3$, such that the sum is unchanged. It seems that the best solution is to substract $2$ to $i_2$. If we choose this solution, the product is maximized.
Is there a general method to do that ? Assuming the integers are ranked in descending order, if we want to add the constant $c$ to $i_1$ by satisfying the constraints (1) and (2) then I think the best general method is to substract $c$ to $i_2$ but how to prove this is the best solution ?
Hint:
Note if $k> 0$, then $a> b \iff (a-k)b > a(b-k)$.