# Proving the maximum value of a set of numbers given their sum

Say we have $$\sum_{i=1}^n x_n = C$$, i.e., $$x_1+x_2+...x_n=C$$ where C is a constant and $$x_1,x_2,...x_n$$ are nonnegative. Prove the product $$(x_1)(x_2)(x_3)...(x_n)$$ has a maximum if and only if $$x_1=x_2=x_3=...=x_n= \frac{c}{n}$$.

I’ve tried plugging in stuff like $$x_1=C-x_2-x_3-x_4...-x_n$$ into the product for each $$x$$ value to take the gradient to see if $$\frac{c}{n}$$ is a critical point but it ends up a really messy derivative that I don’t even know where to start on.

All help is appreciated, thank you.

Hint: Use that $$\frac{x_1+x_2+x_3+...+x_n}{n}\geq \sqrt[n]{x_1\cdot x_2\cdot x_3\cdots x_n}$$
• Do you come about this by setting up $$x_1*x_2*x_3*...*x_n\le(\frac{c}{n})^n$$ and rearranging by raising both sides to 1/n, and swapping out C with $x_1+x_2+...x_n$? I see where you’re going but I don’t know if this’ll work, since it relies on the assumption that $x_1=x_2=...=x_n=\frac{c}{n}$ yields the maximum for the product, which is what I’m trying to prove. – Bob Jackson Dec 5 '18 at 8:14
• This is the AM-GM inequality, and it is known that the equal sign holds for $$x_1=x_2=…=x_n$$ – Dr. Sonnhard Graubner Dec 5 '18 at 8:19