# If $x+y+z=2$, what is the max value of $xyz^2$? [closed]

I have tried to find the max value of $xyz^2$ if $x+y+z=2$ using variation of $f(x,y,z)$, but I don't know how I can calculate the derivative of a function of three variable. If my idea is correct, then I want to ask if there is any simple way to do that.

Note: $x$, $y$, $z$ are real.

## closed as off-topic by Namaste, José Carlos Santos, mlc, Xander Henderson, SaadMar 13 '18 at 0:31

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "This question is missing context or other details: Please improve the question by providing additional context, which ideally includes your thoughts on the problem and any attempts you have made to solve it. This information helps others identify where you have difficulties and helps them write answers appropriate to your experience level." – Namaste, José Carlos Santos, mlc, Xander Henderson, Saad
If this question can be reworded to fit the rules in the help center, please edit the question.

• are the $x,y,z$ assumed to be positive? – Dr. Sonnhard Graubner Feb 18 '18 at 10:44
• Is it $x\cdot y \cdot z^2$ or $(xyz)^2$? – Landuros Feb 18 '18 at 10:44
• Without more restrictions, I think $f(x,y,z)$ couldn't have a maximum. – Dog_69 Feb 18 '18 at 10:51
• -1 People pointed out as soon as you posted the question that you need to require $x,y,z$ non-negative. Otherwise you can take $x=-N,y=-N,z=2N+2$ and get $xyz^2=4N^2(N+1)^2$ arbitrarily large. Please edit the question. – almagest Feb 18 '18 at 19:50

## 5 Answers

By AM-GM inequality twice: $xy \le \dfrac{(x+y)^2}{4} \implies xyz^2 \le \dfrac{(x+y)^2z^2}{4}= \dfrac{(2-z)^2z^2}{4} \le \dfrac{1}{4}\cdot \left(\dfrac{2^2}{4}\right)^2 = \dfrac{1}{4}$, and this is the max value you sought. It occurs at $z = 1, x = y = \dfrac{1}{2}$.

• you can not use $AM-GM$ the $x,y,z$ are assumed to be reals – Dr. Sonnhard Graubner Feb 18 '18 at 10:46
• What is AM-GM ? – user517526 Feb 18 '18 at 10:47
• i think it is a local maximum – Dr. Sonnhard Graubner Feb 18 '18 at 10:55
• You seem to believe that $z^2(2-z^2)^2\le 1$, which is obviously false. – egreg Feb 18 '18 at 11:24
• $z^2(2-z)^2\leqslant 1$ is unjustified, if $z \in \mathbb R$. For e.g. consider $z=-10$. – Macavity Feb 18 '18 at 11:28

The function has no maximum on that plane. Indeed, fix $y=1$, so $z=1-x$ and we have $$f(x,1,1-x)=x(1-x)^2$$ that has limit $\infty$ as $x\to\infty$. It has no minimum either, because the limit for $x\to-\infty$ is $-\infty$.

Note that for $x,y,z>0$ by AM-GM we have

$$\frac{x+y+\frac{z}2+\frac{z}2}4\ge \sqrt{\frac{xyz^2}{4}}$$

$$\iff2=x+y+\frac{z}2+\frac{z}2\ge 4\sqrt{\frac{xyz^2}{4}}$$

thus

$$xyz^2\le \frac14$$

and maximum occurs for $x=y=\frac{z}2=\frac14 \implies (x,y,z)=\left(\frac14,\frac14,\frac12\right)$.

Note also that for $xy<0 \implies f(x,y,z)<0$.

For $x, y$ both negative let $x=y=-t$ with $t>0$ we have $z=2-(x+y)=2+2t$ and then

$$xyz^2=t^2(2+2t)^2\to +\infty$$

Therefore $f(x,y,z)$ has not maximum in $\mathbb{R^2}$ and has maximum in the restriction to $\mathbb{R^2}\setminus \{(x,y)|x<0 \land y<0\}$.

• then it must be $$x>0,y>0,z>0$$! – Dr. Sonnhard Graubner Feb 18 '18 at 11:01
• Well, in fact it must be $\;xy\ge0\;$ ... – DonAntonio Feb 18 '18 at 11:05

Note that if $x=y=10$ and $z=-18$, then $x+y+z=2$ and $f(x,y,z) = 32,400.$ There is no maximum. Using Lagrange multipliers, it's easy to find the local max at $x=y=1/2$, $z=1$.

Let $$x=t, y=-1,z=2-t$$ then $$x+y+z=1$$ and$$xyz^2= -t(2-t)^2$$ which grows without bound.

Thus There is no maximum or minimum for this function.