Maximize the function

59 Views Asked by At

If $x+y+z=21$ then what is the maximum value of $(x-6)(y+7)(z-4)$?

My attempt:

The value of $(x-6)(y+7)(z-4)$ will be maximum iff $$x-6=y+7=z-4=k$$ Now, substituting $x=k+6, \ y=k-7, \ z=k+4$, $$k+6+k-7+k+4=21$$ this gives us $k=6$ so the maximum value of $(x-6)(y+7)(z-4)$ $$6\cdot6\cdot6=216$$

I am not sure whether my answer is correct. Can somebody please help me or suggest me if I am wrong? Thanks you very much.

3

There are 3 best solutions below

5
On

I think your answer is not correct.

Try $x=100$, $y=-45$ and $z=-34$.

The correct answer: The maximum does not exist.

3
On

if we assume that $$x,y,z\geq 0$$ we get that $$(x-6)(y+7)(z-4)\le 672$$ and the equal sign holds if $$x=0,y=21,z=0$$

0
On

As pointed by Michael and the others, the maximum does not exist.

The following clarifications might help you find your mistake.

  • The constraint $x+y=z=21$ or in general $x+y+z>0$ forces at least one of $x,y,z$ to be greater than $0$.
  • Now if $x>6,y>-7,z>4$, then your the equality holds by AM-GM iff $x-6=y+7=z-4$. This gives a maximum value of $216$ at the point $(12,-1,10)$.

Question: But what about the other cases? See Michael's counterexamples.

Note: AM-GM Inequality holds only when you have nonnegative variables.


Claim: If $x,y,z \geq 0$, then $(x-6)(y+7)(z-4) \leq 672$

Proof: Note that $(x-6)(y+7)(z-4) \geq 0$ iff $x\geq 6, z \geq 4$ or $x\leq 6,z \leq 4$.

For the first case, let $x=6+a$ and $y=4+b$ for some $a,b \geq 0$, we get

$(x-6)(y+7)(z-4)=ab(18-a-b) \leq \left(\frac{18-a-b+a+b}{3}\right)^3 =216 $ by AM-GM Inequality as attempted by you.

By our hypothesis the second case simplifies to $0 \leq x\leq 6,0 \leq z \leq 4$.

Let $x=6-a$ and $y=4-b$ for $0 \leq a \leq 4,0 \leq b \leq 6$

$(x-6)(y+7)(z-4)=ab(18+a+b) \leq 6 \cdot 4 \ (18+6+4) = 672$