# Help with Maximize

1. May 20, 2006

### tony873004

Maximize P=xyz with x+y=30, y+z=30, and x,y, and z >= 0.
$$\begin{array}{l} { \\ y = 30 - x \\ \\ z = 30 - y\,\, \Rightarrow \,\,z = 30 - 30 - x = - x \\ \end{array}$$
This is a problem, because if z is negative x according to the question, they must both be 0 or positive. This isn't a problem if x = 0, and that's what I get as 1 of two solutions by differentiating P when written in terms of x, and setting it to 0.
$$\begin{array}{l} P = x(30 - x)( - x) = \left( { - x} \right)^2 (30 - x) = - 30x^2 + x^3 \\ P = x^3 - 30x^2 \\ \\ P' = 3x^2 - 60x \\ P' = x(3x - 60) \\ \end{array}$$
$$x = 0$$
and
$$3x - 60 = 0\,\, \Rightarrow \,\,3x = 60\,\, \Rightarrow \,\,x = \frac{{60}}{3} = 20$$
The z=-x isn't a problem in the x=0 solution, but it is a problem in the x=20 solution. This gives me x=20, y=10, z=-20 P=xyz=-4000.

The back of the book gives x=20, y=10, z=20 P=4000.

If z >= 0 and I get -20 for z, I can't just switch it to positive, can I? Don't I have to discard that solution?

2. May 20, 2006

### nrqed

Watch out!!! 30-y is NOT 30-30-x!!
(you will go when you will see what I mean)

;-)

Pat

3. May 20, 2006

### tony873004

30-(30-x)
30-30+x

4. May 20, 2006

### nrqed

Yes...so z=x (which was clear from x+y = 30 and z+y = 30, wasn't it? :shy: )

5. May 20, 2006

### tony873004

yes it was, thanks!!