# Maximum of $x^3+y^3+z^3$ with $x+y+z=3$

It is given that, $x+y+z=3\quad 0\le x, y, z \le 2$ and we are to maximise $x^3+y^3+z^3$.

My attempt : if we define $f(x, y, z) =x^3+y^3 +z^3$ with $x+y+z=3$ it can be shown that,

$f(x+z, y, 0)-f(x,y,z)=3xz(x+z)\ge 0$ and thus $f(x, y, z) \le f(x+z, y, 0)$. This implies that $f$ attains it's maximum whenever $z=0$. (Is this conclusion correct? I have doubt here).

So the problem reduces to maximise $f(x, y, 0)$ which again can be shown that $f(x, y, 0)\le f(x, 2x,0)$ and this completes the proof with maximum of $9$ and equality at $(1,2,0)$ and it's permutations.

Is it correct? I strongly believe even it might have faults there must be a similar way and I might have made mistakes. Every help is appreciated

• Consider $F=x^3+y^3+(3-x-y)^3$ and show it is concave up on S=$0\le x\le 2, 0\le y\le2$. – i. m. soloveichik May 6 '17 at 14:27

You have correctly established that $z=0$. From there you have $y=3-x$ so substitute that into $f$. As $y\le2$ then $1\le x\le2$.

$$f(x,3-x,0)=x^3+(3-x)^3=9x^2+27x+27=9(x^2+3x+3)$$

$$=9\left(x-\frac{3}{2}\right)^2+\frac{27}{4}$$

This quadratic has minimum at $x=\frac{3}{2}$ and the maximum is only limited by the domain of $x$ which leads to the answer of $x=1$ or $x=2$ so the three numbers are $0,1,2$ and the maximum is $9$.

Let $x\geq y\geq z$.

Since $f(x)=x^3$ is a convex function and $(2,1,0)\succ(x,y,z)$, by Karamata we obtain: $$x^3+y^3+z^3\leq2^3+1^3+0^3=9$$ Done!

• "+1" this was really unexpected to solve it within a line !! Great and thanks for introducing to the majorization concept. – Aditya Narayan Sharma May 6 '17 at 15:34

Here is how I would solve it, First, I would eliminate x. \begin{eqnarray*} x &=& 3 - y - z \\ f(x,y,z) &=& (3 - y - z)^3 + y^3 + z^3 \end{eqnarray*} then I would apply the second derivative test. More information about the second derivative test can be found at the following URL:
http://faculty.csuci.edu/brian.sittinger/2nd_DerivTest.pdf

First, we find the partial derivatives: \begin{eqnarray*} f_y &=& -3(3 - y - z)^2 + 3y^2 f_z &=& -3(3 - y - z)^2 + 3z^2 f_yz &=& 6(3 - y - z) + 6y \\ f_yy &=& -6(3 - y - z) + 6y \\ f_zz &=& -6(3 - y - z) + 6z \end{eqnarray*} Now, we find the critical points: \begin{eqnarray*} -3(3 - y - z)^2 + 3y^2 &=& 0 \\ -3(3 - y - z)^2 + 3z^2 &=& 0 \\ 3y^2 - 3z^2 &=& 0 \\ y^2 &=& z^2 \\ \end{eqnarray*} Therefore, $y = z = 0$ is a critical point. However, it is a minimum not a maximum. We also have an infinity number of critical points, so I am not sure how to proceed.

Bob

• Thanks for the approach. I avoided it first in the fear of solving the partial derivative equations. – Aditya Narayan Sharma May 6 '17 at 14:14

Hint : Use :

$$(x+y+z)^3=x^3+y^3+z^3+3(x+y)(y+z)(z+x)$$

• Sure but it didn't help me. I have used that but that didn't get me to anywhere. Can you please elaborate on the method please to get to the conclusion – Aditya Narayan Sharma May 6 '17 at 13:57
• Aditya, The first step is to find the critical points. The critical points of the function will be were the partial derivatives are 0. That is, in this case, a point $(a,b)$ such that $f_y(a,b) = f_z(a,b) = 0$. Can you find those points? – Bob May 6 '17 at 14:26
• Sure Bob, I have did it using partial derivatives and even with the lagrange multipliers. But I am really in confusion with my attempt I have posted. Can you please put some light on that ? – Aditya Narayan Sharma May 6 '17 at 14:32

$$\begin{eqnarray} &(x+y+z)^3 &=& x^3 + y^3 + z^3 + 3(x+y)(y+z)(z+x)\\ \implies & x^3 + y^3 + z^3 &=& (x+y+z)^3 - 3(x+y)(y+z)(z+x)\\ && = & 27 - 3(x+y)(y+z)(z+x) \end{eqnarray}$$

Now, $x^3+y^3+z^3$ is maximum when $t = (x+y)(y+z)(z+x)$ is minimum. Now since $x$, $y$ and $z$ are each non-negative, therefore $t$ is non-negative. Also, $x,\,y,\,z \in [0,\,2]$. So, $t$ takes minimum value when the variables take values $0,\,1,\,2$. So, $t_\text{min} = (0+1)(1+2)(2+0) = 6$.

So $\max (x^3+y^3+z^3)=27-3\times6=9$.

• Why is it so that the expression is minimum when exactly $x, y, z$ are 0,1,2 and not something else. – Aditya Narayan Sharma May 6 '17 at 14:17
• $t$ is minimized when $x=y=z=0$ – Brevan Ellefsen May 6 '17 at 14:26
• Let us, for a moment, forget the condition $x,\,y,\,z\leq2$ and simply assume $x$, $y$ and $z$ to be non-negative reals. Then the term $t=(x+y)(y+z)(z+x)$ would also be non-negative. So, its minimum value would obviously be zero. But, the question has the condition $x,\,y,\,z\leq2$. So, we have to manually manipulate the values of the variables a bit. Clearly, one variable must be as large as possible, i.e. 2. The second variable must be as small as possible, i.e. 0. This gives the value of the third variable as 1. – Karan Karan May 6 '17 at 14:28
• Generally in these types of questions, the minimum value occurs when the variables are spread as far apart as possible. – Karan Karan May 6 '17 at 14:29
• I understand your logic but it is comlpetely upon assumption that one has to be as large as possible while another one has to be as small as possible. There is no mathematical justification of it. Since we have $x+y+z=3$ with the constraints we could have anything in between – Aditya Narayan Sharma May 6 '17 at 14:30