Given the sum of $k$ numbers, what is the maximum value of their product?

50 Views Asked by At

Let $x_1,x_2,\ldots,x_k\in\mathbb{N}.$ Given that $x_1+x_2+\ldots+x_k=100,$ what is the maximum value of $P=x_1x_2\ldots x_k,$ and for what value of $k$ does this maximum occur?

This is a question from Tata Institute of Fundamental Research Grad School (TIFR GS) Exam $2023.$

My Attempt: From AM-GM, we know that $P\leq\left(\frac{100}{k}\right)^k.$ Now, consider the function $f(k)=\left(\frac{a}{k}\right)^k.$ It has a maxima at $k=\frac{a}{e}.$ Putting $a=100,$ we get that $P$ is maximised when $k$ is around $36.$ Also, from the equality condition of AM-GM, we know that each of the $x_i$s is equal. So, putting $x_1=x_2=\ldots=x_k=1,$ we get $k=100.$ $100$ is a far way from $36,$ so we ignore this. Similarly, putting $x_1=x_2=\ldots=x_k=2,$ we get $k=50.$ We ignore this as well. However, equating each $x_i$ to 3 gives $k=33.333\ldots,$ which seems promising. So my thinking is that we should be aiming to maximise the numbers of $3$s in the product. Note that $100=3\times33+1.$ This gives $P=3^{33}.$ Also, $100=3\times32+4.$ This gives $P=4\times3^{32}.$ We can also write $100$ as $3\times31+7.$ This gives $P=7\times3^{31}.$ Comparing each value of $P$ we get, we see that $P=4\times3^{32}$ is the largest one. This is the correct answer, but my solution is very hand-wavy and not rigorous at all. What is the correct way to solve this problem?