Getting the highest product from n terms In other words, you're looking for a partition a+b+c+d of a given quantity x such that the product abcd of the nonzero parts is maximum. Is this interpretation right?


I don't know how to phrase the title of the question because I don't know what I'm actually looking for. Here's the problem (and no it's not homework, it's just something I had to calculate and had no idea how to do it):

I have a set of positive numbers: a, b, c and d. The sum of the variables has to be a fixed value, let's call it x. Let's call the product of a*b*c*d=y

Now I want to find out the distribution of x between the variables a,b,c,d such that the product of a*b*c*d is the highest.

For a concrete example:
x=20, so I want to know at what values of a,b,c,d does y have the highest value?

From what I manually calculated, it seems that 5*5*5*5=625 is the highest I could get. I would like to know if this is true. Also I would like to know the formal name of what I'm describing here.
Suppose we place all the parts ($a_1+a_2+\cdots+a_n=x$) into the AM&ndash;GM inequality:
$$(a_1a_2\cdots a_n)^{1/n}\le\frac{a_1+a_2+\cdots+a_n}n$$
The right-hand side is fixed; it is equal to $\frac xn$. We also know that the inequality becomes an equality iff all $a_i$ are equal. Therefore the partition of $x$ that gives the highest product is the one whose parts are all equal to $\frac xn$, and the product is $(x/n)^n$.

In this case there are four parts, and thus the solution is $a=b=c=d=\frac x4$.
OK, here's a geometric solution. I'll explain it for three numbers $a,b,c,$ which may be easily generalised. The condition is the segment of a plane in the first octant. Indeed, it is an equilateral triangle cutting off equal lengths $k$ on each of the axes to get a tetrahedron with the vertex at the origin. The problem is to find the maximum volume $abc$ of the box one of whose vertices $(a,b,c)$ is always on the triangle defined by the condition. Clearly the biggest such box has the vertex touching the triangle at its centre (this may be seen by considering the two-dimensional case as well). This occurs when $a=b=c=k/3,$ which then gives $k^3/27$ as the maximum such product.

For four variables, we find the maximum to be $k^4/256,$ and for $n$ variables we get $k^n/n^n.$ Thus for the particular value $k=20$ which you picked the maximum product is given by the partition $5+5+5+5,$ which gives the product $5^4=625.$