Maximum product when the sum is constant and the variables are positive integers Today I came across an olympiad problem which after some time translated into a simple problem. I was supposed to prove that given $x+y+z = 73$ and $x,y,z ∈ I^+$. Show that the maximum value of $xyz = 14400$.
Now using the AM-GM inequality one can establish that the maximum value of the product for real values of the variable would be $≈ 14408.037037$. However we have the added clause that x,y,z must be positive integers. 
Intuitively, it seems that whenever$$\sum_{i=1}^n |\frac{x}{n}-x_{i}|$$
is minimised for the general case, the product $x_{1}x_{2}....x_{n}$ is maximized. So 24,24,25 is the case in which the value of the above expression for positive integral values of the variables is minimized and hence the product is maximized. But I would like a proof of the above result.

Let
$$x + y + z = c \tag{A}$$
and
$$f(x,y,z) = xyz$$
then using (A) to sub we have
\begin{align}
f(x,y) &= xy(c - x - y) \\
&=xyc - x^2y - xy^2
\end{align}
Take partial derivatives
\begin{align}
f_x(x,y) &= yc - 2xy - y^2 \tag{1}\\
f_y(x,y) &= xc - 2xy - x^2 \tag{2}
\end{align}
to find critical points of the 3d surface. So, set (1) and (2) equal to zero then subtract (2) from (1) to get
\begin{align}
(y-x)c + x^2 - y^2 &= 0 \\
(y - x)c - (y - x)(x+y) &= 0 \\
(y-x)(c - (x + y) &= 0\\
(y-x)(z) &= 0
\end{align}
So one stationary point when $z = 0$, which is clearly not a maximum for $xyz$, and a second stationary point for $y = x$. Taking second partials on (1) and (2), in order to verify this is an extremum in the plane $y = x$
\begin{align}
f_{xx}(x,y) &= -2x \\
f_{yy}(x,y) &= -2y \\
f_{xy}(x,y) &= c - 2(x + y)
\end{align}
we find that $f_{xx} < 0$ for all positive $x,y$ and
\begin{align}
D(x,y=x) &= f_{xx}(x,x)f_{yy}(x,x) - f_{xy}^2(x,x) \\
&= 4x^2 - (c^2 - 4cx + 4x^2) \\
&= c(4x - 1)
\end{align}
so $D > 0$ for all $c > 0$, and positive integers $x$. Therefore when $x,y \geq 1$, $x = y$, and $c > 0$ we have an extremum.
Now we can simplify the problem to $f(x,y = x,z) = f(x,z) = x^2z$ subject to
\begin{align}
x + x + z = 2x + z = c
\end{align}
So $z = c - 2x$, and subbing that we have $f(x,z = c - 2x) = f(x) = x^2(c-2x)$.
Take a good old fashion derivative to get
\begin{align}
f'(x) &= 2cx - 6x^2 \\
&= 2x(c - 3x)
\end{align}
So the max occurs when $x = c/3 = y$, which we can now use to say $z = c/3$ too.
We can see that our original function $f(x,y,z) = xyz$ is continuous. Secondly, we can see that the entire problem is symmetric in $x,y,z$ meaning our test for extrema would be the same for any subbing and pairing of $x,y,z$. That symmetry means that the identified extrema, $x=y=z=c/3$, is a local maximum along any approach in our plane $x + y + z = c$, meaning the shape of our function is concave along the part of plane $x + y + z = c$ of which we are concerned — and, importantly, that behavior was shown to not change for $x,y,z > 1$. Because of that concavity all we have to do is pick the closest integers to $c/3$ that satisfy x + y + z = c. In our case thats $24.33\dots$ so the closest numbers are is $24, 24, 25$.
In other words, if $x,y,z$ minimize their distance to $c/3$ in the plane $x + y + z = c$ then their product will necessarily be closer to the vertex of the paraboloid(s).
Similar to how $x = 6, 7$ maximizes the $2D$ version of this problem in the parabola defined by $xy$ in the plane $x + y = 13$. In this case $6,7$ are the closest satisfying integers to $6.5$. Visual:
https://www.desmos.com/calculator/z9jhl3fjpq
