I'm trying to find a function $f(x)$ that results in a set of integers that adds up to $x$ and has the greatest possible product.
For example, $f(5) = (3,2)$ (or $(2,3)$) as the product of 3 and 2 is greater than any other product you can get from numbers that add up to 5.
So far I've been doing this by brute force, but I'm sure there's a better way.
Here's a summary of the basic argument. First it's clear one should not use a factor of $1$ [except if $x=1$ (trivial)].
Next one doesn't use any factor $f \ge 5$ because one could replace that $f$ by the two factors $f-3,3$ keeping the sum the same but $(f-3)\cdot 3>f$ provided $f \ge 5.$
Next one doesn't use two factors of $4$ because $4 \cdot 4<3 \cdot 3 \cdot 2.$ Finally one doesn't use three factors of $2$ because $2 \cdot 2 \cdot 2<3 \cdot 3.$
Then the rest of the proof is about formulating the breakdown, depending on whether it's possible to use all 3's, or all 3's and one 4, or all 3's and two 2's. I don't recall it more than that, will fill in later. But the idea is to use as many 3's as possible, and the above arguments rule out using higher or lower factors except as noted.
The article: Maximal Independent Sets and Separating Covers, by Vincent Vatter.
It appeared in the American Math. Monthly, vol 118 no.5 (May 2011) starting p 418. The Indroduction (on the first page) is about this maximal product problem, and shows (as outlined above) that for $x>1$ the max product $f(x)$ is $3^k$ if $x=3k,$ or $4 \cdot 3^{k-1}$ if $x=3k+1,$ or $2 \cdot 3^k$ if $x=3k+2.$ In the article mention is made of the equivalence of using one $4$ versus two $2$'s,since $4=2\cdot 2$ and $4=2+2.$ So one could always use only 2's and 3's. Another thing (not addressed but obvious) is that one does not ever use both a 2 and a 4, because $2 \cdot 4<3 \cdot 3.$