Curiosity - maximising a product with a constraint 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 ?
 A: Hint: 
Note if $k> 0$, then  $a> b \iff (a-k)b > a(b-k)$.  
A: Case 1: $c<{{i}_{j}}\,for\,1\le j\le n$ and is subtracted from only one number.
Let $P=\underset{j=1}{\overset{n}{\mathop \Pi }}\,{{i}_{j}} \\ $ and ${{P}_{k}}=({{i}_{1}}+c)\underset{j=2}{\overset{n}{\mathop \Pi }}\,i_{j}^{'} \\ $ where
$\left. i_{j}^{'}=\begin{matrix}
   {{i}_{j}}-c\,if\,\,j=k  \\
   {{i}_{j}}if\,\,j\ne k  \\
\end{matrix} \right\} \\ $
Then $\frac{{{P}_{k}}}{({{i}_{k}}-c)}=({{i}_{1}}+c)\underset{j=2,j\ne k}{\overset{n}{\mathop \Pi }}\,{{i}_{j}} \\ $ and
$ \frac{{{i}_{k}}{{P}_{k}}}{({{i}_{k}}-c)}=({{i}_{1}}+c)\underset{j=2}{\overset{n}{\mathop \Pi }}\,{{i}_{j}}=P+c\underset{j=2}{\overset{n}{\mathop \Pi }}\,{{i}_{j}}=P+\frac{cP}{{{i}_{1}}} \\ $
So that
${{P}_{k}}=P\left( 1+\frac{c}{{{i}_{1}}} \right)\left( \frac{{{i}_{k}}-c}{{{i}_{k}}} \right)=P\left( 1+\frac{c}{{{i}_{1}}} \right)\left( 1-\frac{c}{{{i}_{k}}} \right) \\
$
This is maximized for k = 2 if the numbers are in descending order. I have no idea about the other cases of subtraction from several numbers.
