prove that the product of three numbers is the greatest if the numbers are equal How could we prove that if the sum of three numbers is a constant (for example 30), then the product of the numbers would have its maximum value when the numbers are equal?
 A: This is a consequence of the A.M.-G.M. inequality, if the numbers are non negative.
Let $a+b+c=3k$. Then, by A.M. G.M. inequality, we get, 
$(abc)^{1/3} \leq k$, and so, $abc \leq k^3$. Also the equality is obtained if and only if $a=b=c$, which can be easily seen to be case from the proof of A.M.-G.M. inequality for instance.
A: Suppose the (say, positive) sum of the numbers is $S$, and we suppose that each of the summands is required to be positive (otherwise, by taking two of the summands to be large and negative and the third positive, we can make the product as large as we like).
If $$x, y, z$$ are three numbers whose sum is $S$, then $z = S - x - y$, so the product of the three numbers is
$$P = xyz = xy(S - x - y),$$
which we hence regard as a function of $(x, y)$ in the first quadrant $\{x, y > 0\}$.
Where this function has a local extremum, we have
$$0 = \frac{\partial P}{\partial x} = S y - 2 x y - y^2 ,$$
and by symmetry
$$0 = \frac{\partial P}{\partial y} = S x - 2xy - x^2 .$$

Solving this system gives that the unique extremum for which $x, y, z = S - x - y$ are all positive is $$x = y = \frac{S}{3}$$ and hence $$z = S - x - y = \frac{S}{3}.$$ It's easy to check that this extremum is a local (and hence by virtue of being the only extremum) global maximum.

A: Since $z=30-x-y$, we have
$xyz=xy(30-x-y)$.
Letting $x=-1$ gives $y^2-31y$, which is unbounded above, that is, no maximum value.
If you also require that $x,y,z$ be nonnegative, then we note that
the solution space is compact and so a maximum is attained.
Let $f(x,y,z) = xyz$. We have
$f(x,y,z) \ge 0$ for all feasible $x,y,z$. Furthermore $f(x,y,z) = 0$ if any of the $x,y,z$ are zero, and $f(10,10,10) >0$, so we know that at a maximum, none of the $x,y,z$ are zero.
Hence any maximizer is a solution to the problem $\min \{ f(x,y,z) | x+y+z = 30, x>0, y>0, z>0 \}$ and we can use Lagrange multipliers to characterize a maximizer. In particular, we have
$xy + \lambda = 0$, $ xz+ \lambda = 0$, $yz+ \lambda =0$ for some $\lambda$, and so we
have $xy=xz=yz$, dividing by $xy$ gives $1={z \over y} = { z \over x}$ and so $x=y=z$ at a solution.
Alternative solution:
Note that $f({x+y \over 2}, {x+y \over 2},z) - f(x,y,z) = {1 \over 4} z (y-x)^2$ (and similarly for other pairs of variables). Hence if the variables are non-negative, we can replace any pair of variables by their average without reducing the maximum. Hence the problem is to maximize $f(x,x,30-2x)= 2(15-x)x^2$ with the constraints $x \ge 0$ and $30-2x \ge 0$, that is $x \in [0,15]$. Differentiating $x \mapsto 2(15-x)x^2$ gives $6x(10-x)$, from which we see that $x=10$ is the maximizing value, and so the solution is $(10,10,10)$.
A: Let $f(x,y,z) = xyz$.
The region in $\mathbb{R}^3$ defined by $x, y, z \ge 0, x + y + z = 30$
is bounded, hence compact, so $f$ achieves its maximum.
Let $(a,b,c)$ be the point where $f$ has a maximum.
Using Lagrange multipliers, let $g(x,y,z) = x + y + z$, and we get that there is some $\lambda$ such that
$$
\nabla f(a,b,c) = \lambda \nabla g(a,b,c)
$$
i.e.
$$
(bc, ac, ab) = (\lambda, \lambda, \lambda)
$$
which has the solution either $\lambda = 0$ and two of $a,b,c$ are zero, or else $a = b = c$.
The latter case is not a maximum, and the boundary of the domain of $f$ (the places where $x, y, \text{ or } z$ are zero) also is not a maximum of $f$.
So $f$ attains a maximum when $a = b = c$, i.e. $x = y = z = 10$.
A: Suppose that $x + y + z = S$ and not all of them equal, then there i two of them that are not equal (say $x$ and $y$). You may replace them both with $\frac{x+y}{2}$. Sum will not change, but $\left(\frac{x+y}{2}\right)^2$ is more than $xy$
$$\left(\frac{x+y}{2}\right)^2 - xy = \frac{x^2 + 2xy + y^2 - 4xy}{4} = \frac {(x-y)^2}{4} >0 \iff x \ne y$$
