# Maximizing a rectangle in R3

1. Jun 2, 2013

### miltzi

1. The problem statement, all variables and given/known data

I've been struggling to figure out how to do the following problem which I came across:

Find the volume of the largest rectangular box in the first octant with three faces
in the coordinate planes and one vertex in the plane x+2y+3z=6.

2. Relevant equations

N/A

3. The attempt at a solution

Volume will=xyz, since each side is as long as the face in that plane. We need to maximize this.

So we need to maximize xyz in the domain x+2y+3z=6

I tried getting x, y, and z by themselves with respect to each other and then subbing into the equation V=xyz. Then I would differentiate and set this equal to 0 to find the max. I don't think this is the correct way of doing it as it took huge amounts of time and became impossible to deal with owing to its complexity. At the moment in multivariable calculus we are learning minima/maxima, line integrals, double integrals, greens theorem etc.

2. Jun 2, 2013

3. Jun 2, 2013

### Staff: Mentor

You can ignore one parameter for a while (just assume that it is unknown and fixed) and find a relation between the other two first. This keeps the equations handy.

4. Jun 2, 2013

### miltzi

Thanks, i'll try use this to figure it out

5. Jun 2, 2013

### Ray Vickson

What you say you did sounds easy, not complex as you claim.

You can express x in terms of y and z; then V = xyz becomes a function v(y,z) that is not particularly messy, and can fairly easily be optimized. Alternatively, you could solve for y in terms of x and z or solve for z in terms of x and y. Lastly, you could use the Lagrange multiplier method, but maybe you have not seen that yet.

6. Jun 2, 2013

### HallsofIvy

Staff Emeritus
Have you had "Lagrange multipliers"? The idea is to maximize (or minimize) some function f(x, y, z) with the condition that g(x,y,z)= constant. (Here f(x,y,z)= xyz, g(x,y,z)= x+ 2y+ 3z= 6)

If we wanted to maximize f without any conditions we could find $\nabla f$ at some point. That always points in the direction of fastest increase so we can get a larger value by moving in the direction of $\nabla f$. And f will keep increasing until $\nabla f$ has no direction- that is, until $\nabla f= 0$ (which is, of course, the same as setting all partiall derivatives equal to 0).

But if we are constrained to stay on the surface g(x,y,z)= constant, we may not be able to move in the direction of $\nabla f$. The best we can do is take the projection of $\nabla f$ on the surface and follow that. And we do that until there is no such projection: that is, until $\nabla f[/tex] is perpendicular to the surface g(x,y,z)= constant. Of course [itex]\nabla g$ is perpendicular to the surface at each point so this condition is that $\nabla f$ is parallel to $\nabla g$: that $\nabla f= \lambda\nabla g$ for some constant $\lambda$ (the "Laplace multiplier).

Since f(x,y,z)= xyz, $\nabla f= <yz, xz, xy>$ and since g(x,y,z)= x+ 2y+ 3z, $\nabla g= <1, 2, 3>$, we must have $<yz, xz, xy>= \lambda<1, 2, 3>$ or $yz= \lambda$, $xz= 2\lambda$ and $xy= 3\lambda$. Those, together with x+ 2y+ 3z= 6 give four equations for x, y, z, and $\lambda$.

Since a specific value for $\lambda$ is not necessary for the solution, I find it often simplest to eliminate $\lambda$ first by dividing one equation by another.