Question 1143014
If x+y+z=16 then find the maximum value of (x-3)(y-5)(z-2). Given that
(x-3)>0, (y-5)>0, (z-2)>0
<pre>
We wish to maximize 

{{{f(x,y^"")=(x^""-3)(y^""-5)(z^""-2)}}} 

So we solve x+y+z=16 for z and substitute:

{{{z=16-x-y}}}

{{{f(x,y^"")=(x^""-3)(y^""-5)(16-x^""-y-2)}}} 

{{{f(x,y^"")=(x^""-3)(y^""-5)(14-x^""-y)}}}

Next we find both partial derivatives and set them equal to zero:

{{{f[x]=(y^""-5)((x-3)(-1)^"" + (1)(14-x-y)^"")) }}}

{{{f[x]=(y^""-5)(-x+3 + 14-x-y^"") }}}

{{{f[x]=(y^""-5)(-2x-y^""+17) }}}

Setting that equal to zero gives:

y-5=0;  -2x-y+17=0

Since y-5 > 0 we ignore the first

-2x-y+17=0

{{{f(x,y^"")=(x^""-3)(y^""-5)(14-x^""-y)}}}

{{{f[y]=(x^""-3)((y-5)(-1)^"" + (1)(14-x-y)^"")) }}}

{{{f[y]=(x^""-3)(-y+5 + 14-x-y^"") }}}

{{{f[y]=(x^""-3)(-2y-x^""+19) }}}

x-3=0;  -2y-x+19=0

Since x-3 > 0 we ignore the first.

-2y-x+19=0

So we solve this system:

{{{system(-2x-y+17=0,-2y-x+19=0)}}}

That has solution (x,y)=(5,7)

Substituting in

{{{f(x,y^"")=(x^""-3)(y^""-5)(14-x^""-y)}}}
{{{f(x,y^"")=(5^""-3)(7^""-5)(14-5^""-7)}}}
{{{f(x,y^"")=(2)(2)(2)=8}}}

So the maximum value of (x-3)(y-5)(z-2) is 8.

Edwin</pre>